Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- syntax = "proto3";
- package stream_changer;
- message Request{
- int32 fd = 1;
- // структура для отправки
- message scst_user_get_cmd {
- sint32 cmd_h = 1;
- sint32 subcode = 2;
- sint64 preply=3;
- message scst_user_sess{
- sint64 sess_h=1;
- sint64 lun=2;
- sint32 threads_num=3;
- sint32 rd_only=4;
- sint32 scsi_transport_version=5;
- sint32 phys_transport_version=6;
- string initiator_name=7;
- string target_name=8;
- }
- scst_user_sess sess=4;
- message scst_user_scsi_cmd_parse{
- sint64 sess_h=1;
- repeated sint32 cdb=2;
- sint32 cdb_len=3;
- sint64 lba=4;
- sint64 data_len=5;
- int32 bufflen=6;
- int32 out_bufflen=7;
- sint32 timeout=8;
- sint32 op_flags=9;
- sint32 queue_type=10;
- sint32 data_direction=11;
- sint32 expected_values_set=12;
- sint32 expected_data_direction=13;
- int32 expected_transfer_len=14;
- int32 expected_out_transfer_len=15;
- sint32 sn=16;
- }
- scst_user_scsi_cmd_parse parse_cmd=5;
- message scst_user_scsi_cmd_alloc_mem{
- sint64 sess_h=1;
- repeated sint32 cdb=2;
- int32 alloc_len=3;
- sint32 queue_type=4;
- sint32 data_direction=5;
- sint32 sn=6;
- }
- scst_user_scsi_cmd_alloc_mem alloc_cmd=6;
- message scst_user_scsi_cmd_exec{
- sint64 sess_h=1;
- repeated sint32 cdb=2;
- sint32 cdb_len=3;
- int64 lba=4;
- int64 data_len=5;
- int32 bufflen=6;
- int32 alloc_len=7;
- sint64 pbuf=8;
- sint32 queue_type=9;
- sint32 data_direction=10;
- sint32 partial=11;
- int32 timeout=12;
- sint64 p_out_buf=13;
- int32 out_bufflen=14;
- sint32 sn=15;
- sint32 parent_cmd_h=16;
- int32 parent_cmd_data_len=17;
- sint32 partial_offset=18;
- }
- scst_user_scsi_cmd_exec exec_cmd=7;
- message scst_user_scsi_on_free_cmd{
- sint64 pbuf=1;
- int32 resp_data_len=2;
- sint32 buffer_cached=3;
- sint32 aborted=4;
- sint32 status=5;
- sint32 delivery_status=6;
- }
- scst_user_scsi_on_free_cmd on_free_cmd=8;
- message scst_user_on_cached_mem_free{
- sint64 pbuf=1;
- }
- scst_user_on_cached_mem_free on_cached_mem_free=9;
- message scst_user_tm{
- sint64 sess_h=1;
- sint32 fn=2;
- sint32 cmd_h_to_abort=3;
- sint32 cmd_sn=4;
- sint32 cmd_sn_set=5;
- }
- scst_user_tm tm_cmd=10;
- message scst_user_ext_copy_remap{
- sint64 sess_h=1;
- sint64 src_sess_h=2;
- sint64 dst_sess_h=3;
- message scst_user_ext_copy_data_descr{
- sint64 src_lba=1;
- sint64 dst_lba=2;
- int32 data_len=3;
- }
- scst_user_ext_copy_data_descr data_descr=4;
- }
- scst_user_ext_copy_remap remap_cmd=11;
- }
- scst_user_get_cmd cmd=2;
- message vdisk_dev{
- int32 scst_usr_fd=1;
- sint32 block_size=2;
- sint64 nblocks=3;
- int32 block_shift=4;
- int64 file_size=5;
- //pthread_mutex_t dev_mutex; - видимо опустим это поле
- sint32 rd_only_flag=6;
- sint32 wt_flag=7;
- sint32 nv_cache=8;
- sint32 o_direct_flag=9;
- sint32 media_changed=10;
- sint32 prevent_allow_medium_removal=11;
- sint32 nullio=12;
- sint32 cdrom_empty=13;
- sint32 non_blocking=14;
- //#if defined(DEBUG_TM_IGNORE) || defined(DEBUG_TM_IGNORE_ALL)
- // unsigned int debug_tm_ignore:1;
- //#if defined(DEBUG_TM_IGNORE_ALL)
- // volatile int debug_tm_ignore_all;
- //#endif
- //#endif - это мы тоже не передаём
- message vdisk_tgt_dev{
- sint64 sess_h=1;
- }
- repeated vdisk_tgt_dev tgt_devs=15;
- string name=16;
- string file_name=17;
- string usn=18;
- int32 type=19;
- }
- vdisk_dev dev=3;
- sint32 may_need_to_free_pbuf = 4;
- message scst_user_reply_cmd{
- sint32 cmd_h=1;
- sint32 subcode=2;
- int32 result=3;
- message scst_user_scsi_cmd_reply_parse{
- sint32 status=1;
- //_________________________
- sint32 queue_type=2;
- sint32 data_direction=3;
- sint32 cdb_len=4;
- int64 lba=5;
- int64 data_len=6;
- int32 bufflen=7;
- sint32 op_flags=8;
- int32 out_bufflen=9;
- //_________________________
- sint32 sense_len=10;
- sint64 psense_buffer=11;
- }
- scst_user_scsi_cmd_reply_parse parse_reply=4;
- message scst_user_scsi_cmd_reply_alloc_mem{
- sint64 pbuf=1;
- }
- scst_user_scsi_cmd_reply_alloc_mem alloc_reply=5;
- message scst_user_scsi_cmd_reply_exec{
- int32 resp_data_len=1;
- sint64 pbuf=2;
- sint32 reply_type=3;
- sint32 status=4;
- //_________________________
- sint32 sense_len=5;
- sint64 psense_buffer=6;
- //_________________________
- sint32 ws_descriptors_len=7;
- sint64 ws_descriptors=8;
- }
- scst_user_scsi_cmd_reply_exec exec_reply=6;
- message scst_user_ext_copy_reply_remap{
- sint64 remap_descriptors=1;
- sint32 remap_descriptors_len=2;
- sint32 status=3;
- sint32 sense_len=4;
- sint64 psense_buffer=5;
- }
- scst_user_ext_copy_reply_remap remap_reply=7;
- }
- scst_user_reply_cmd reply=5;
- repeated sint32 sense = 6;
- };
- message Response{
- bool ok = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement