Create/use a number of extended value-strings;
Remove or comment out dups from several value-string arrays; Sort a number of value-string arrays; Reformat many hf[] entries; Remove some unneeded initializers; Add editor-modelines; Use consistent indentation; Reformat whitespace. svn path=/trunk/; revision=53968
This commit is contained in:
parent
c96d5a97ad
commit
1de89438f2
|
@ -293,6 +293,7 @@ static const value_string scsi_read_dvd_formats[] = {
|
|||
{0xff, "READ/SEND DVD STRUCTURE capability"},
|
||||
{0,NULL}
|
||||
};
|
||||
static value_string_ext scsi_read_dvd_formats_ext = VALUE_STRING_EXT_INIT(scsi_read_dvd_formats);
|
||||
|
||||
static const value_string scsi_data_mode_vals[] = {
|
||||
{0x01, "Mode 1 (ISO/IEC 10149)"},
|
||||
|
@ -329,6 +330,7 @@ static const value_string scsi_getconf_current_profile_val[] = {
|
|||
{0xffff, "Logical unit not conforming to a standard profile"},
|
||||
{0,NULL}
|
||||
};
|
||||
static value_string_ext scsi_getconf_current_profile_val_ext = VALUE_STRING_EXT_INIT(scsi_getconf_current_profile_val);
|
||||
|
||||
static const value_string scsi_feature_val[] = {
|
||||
{0x0000, "Profile List"},
|
||||
|
@ -374,6 +376,7 @@ static const value_string scsi_feature_val[] = {
|
|||
{0x010c, "Firmware Information"},
|
||||
{0,NULL}
|
||||
};
|
||||
static value_string_ext scsi_feature_val_ext = VALUE_STRING_EXT_INIT(scsi_feature_val);
|
||||
|
||||
static void
|
||||
dissect_mmc4_getconfiguration (tvbuff_t *tvb, packet_info *pinfo,
|
||||
|
@ -383,10 +386,10 @@ dissect_mmc4_getconfiguration (tvbuff_t *tvb, packet_info *pinfo,
|
|||
scsi_task_data_t *cdata)
|
||||
|
||||
{
|
||||
gint32 len;
|
||||
guint old_offset;
|
||||
tvbuff_t *volatile tvb_v = tvb;
|
||||
volatile guint offset_v = offset;
|
||||
gint32 len;
|
||||
guint old_offset;
|
||||
tvbuff_t *volatile tvb_v = tvb;
|
||||
volatile guint offset_v = offset;
|
||||
|
||||
if (tree && isreq && iscdb) {
|
||||
proto_tree_add_item (tree, hf_scsi_mmc_getconf_rt, tvb_v, offset_v+0, 1, ENC_BIG_ENDIAN);
|
||||
|
@ -442,7 +445,7 @@ dissect_mmc4_getconfiguration (tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
profile=tvb_get_ntohs(tvb_v, offset_v);
|
||||
proto_tree_add_item (tr, hf_scsi_mmc_feature_profile, tvb_v, offset_v, 2, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(it, "%s", val_to_str(profile, scsi_getconf_current_profile_val, "Unknown 0x%04x"));
|
||||
proto_item_append_text(it, "%s", val_to_str_ext(profile, &scsi_getconf_current_profile_val_ext, "Unknown 0x%04x"));
|
||||
|
||||
cur_profile=tvb_get_guint8(tvb_v, offset_v+2);
|
||||
proto_tree_add_item (tr, hf_scsi_mmc_feature_profile_current, tvb_v, offset_v+2, 1, ENC_BIG_ENDIAN);
|
||||
|
@ -532,19 +535,20 @@ static const value_string scsi_q_subchannel_adr_val[] = {
|
|||
};
|
||||
static const value_string scsi_q_subchannel_control_val[] = {
|
||||
{0x0, "2 Audio channels without pre-emphasis (digital copy prohibited)"},
|
||||
{0x2, "2 Audio channels without pre-emphasis (digital copy permitted)"},
|
||||
{0x1, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
|
||||
{0x2, "2 Audio channels without pre-emphasis (digital copy permitted)"},
|
||||
{0x3, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
|
||||
{0x8, "audio channels without pre-emphasis (digital copy prohibited)"},
|
||||
{0xa, "audio channels without pre-emphasis (digital copy permitted)"},
|
||||
{0x9, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
|
||||
{0xb, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
|
||||
{0x4, "Data track, recorded uninterrupted (digital copy prohibited)"},
|
||||
{0x6, "Data track, recorded uninterrupted (digital copy permitted)"},
|
||||
{0x5, "Data track, recorded incremental (digital copy prohibited)"},
|
||||
{0x6, "Data track, recorded uninterrupted (digital copy permitted)"},
|
||||
{0x7, "Data track, recorded incremental (digital copy permitted)"},
|
||||
{0x8, "audio channels without pre-emphasis (digital copy prohibited)"},
|
||||
{0x9, "2 Audio channels with pre-emphasis of 50/15us (digital copy prohibited)"},
|
||||
{0xa, "audio channels without pre-emphasis (digital copy permitted)"},
|
||||
{0xb, "2 Audio channels with pre-emphasis of 50/15us (digital copy permitted)"},
|
||||
{0,NULL}
|
||||
};
|
||||
static value_string_ext scsi_q_subchannel_control_val_ext = VALUE_STRING_EXT_INIT(scsi_q_subchannel_control_val);
|
||||
|
||||
static void
|
||||
dissect_mmc4_readtocpmaatip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
|
@ -919,7 +923,7 @@ dissect_mmc4_reportkey (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata)
|
||||
|
||||
{
|
||||
guint8 agid, key_format, key_class;
|
||||
guint8 agid, key_format, key_class;
|
||||
proto_item *ti;
|
||||
|
||||
if (tree && isreq && iscdb) {
|
||||
|
@ -1223,7 +1227,7 @@ dissect_mmc4_setstreaming (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
guint payload_len _U_, scsi_task_data_t *cdata)
|
||||
|
||||
{
|
||||
guint8 type;
|
||||
guint8 type;
|
||||
proto_item *ti;
|
||||
|
||||
if (tree && isreq && iscdb) {
|
||||
|
@ -1308,55 +1312,57 @@ dissect_mmc_preventallowmediaremoval(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
#define SCSI_MMC4_READDISCSTRUCTURE 0xad
|
||||
#define SCSI_MMC4_SETSTREAMING 0xb6
|
||||
#define SCSI_MMC4_SETCDSPEED 0xbb
|
||||
const value_string scsi_mmc_vals[] = {
|
||||
{SCSI_MMC4_GETCONFIGURATION , "Get Configuration"},
|
||||
{SCSI_MMC4_GETEVENTSTATUSNOTIFY , "Get Event Status Notification"},
|
||||
{SCSI_MMC4_GETPERFORMANCE , "Get Performance"},
|
||||
{SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
{SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
{SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
{SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
{SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
{SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
{SCSI_MMC4_READ10 , "Read(10)"},
|
||||
{SCSI_MMC4_READ12 , "Read(12)"},
|
||||
{SCSI_MMC4_CLOSETRACK , "Close Track"},
|
||||
{SCSI_MMC4_READBUFFERCAPACITY , "Read Buffer Capacity"},
|
||||
{SCSI_MMC4_READCAPACITY10 , "Read Capacity(10)"},
|
||||
{SCSI_MMC4_READDISCINFORMATION , "Read Disc Information"},
|
||||
{SCSI_MMC4_READDISCSTRUCTURE , "Read DISC Structure"},
|
||||
{SCSI_MMC4_READTOCPMAATIP , "Read TOC/PMA/ATIP"},
|
||||
{SCSI_MMC4_READTRACKINFORMATION , "Read Track Information"},
|
||||
{SCSI_MMC4_REPORTKEY , "Report Key"},
|
||||
{SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
{SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
{SCSI_MMC4_RESERVETRACK , "Reserve Track"},
|
||||
{SCSI_MMC4_SETCDSPEED , "Set CD Speed"},
|
||||
{SCSI_MMC4_SETSTREAMING , "Set Streaming"},
|
||||
{SCSI_SBC_STARTSTOPUNIT , "Start Stop Unit"},
|
||||
{SCSI_MMC4_SYNCHRONIZECACHE , "Synchronize Cache"},
|
||||
{SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
{SCSI_MMC4_WRITE10 , "Write(10)"},
|
||||
{SCSI_MMC4_WRITE12 , "Write(12)"},
|
||||
{SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
static const value_string scsi_mmc_vals[] = {
|
||||
/* 0x00 */ {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
/* 0x03 */ {SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
/* 0x12 */ {SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
/* 0x1A */ {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
/* 0x1B */ {SCSI_SBC_STARTSTOPUNIT , "Start Stop Unit"},
|
||||
/* 0x1E */ {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
/* 0x25 */ {SCSI_MMC4_READCAPACITY10 , "Read Capacity(10)"},
|
||||
/* 0x28 */ {SCSI_MMC4_READ10 , "Read(10)"},
|
||||
/* 0x2a */ {SCSI_MMC4_WRITE10 , "Write(10)"},
|
||||
/* 0x35 */ {SCSI_MMC4_SYNCHRONIZECACHE , "Synchronize Cache"},
|
||||
/* 0x3B */ {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
/* 0x43 */ {SCSI_MMC4_READTOCPMAATIP , "Read TOC/PMA/ATIP"},
|
||||
/* 0x46 */ {SCSI_MMC4_GETCONFIGURATION , "Get Configuration"},
|
||||
/* 0x4a */ {SCSI_MMC4_GETEVENTSTATUSNOTIFY , "Get Event Status Notification"},
|
||||
/* 0x51 */ {SCSI_MMC4_READDISCINFORMATION , "Read Disc Information"},
|
||||
/* 0x52 */ {SCSI_MMC4_READTRACKINFORMATION , "Read Track Information"},
|
||||
/* 0x53 */ {SCSI_MMC4_RESERVETRACK , "Reserve Track"},
|
||||
/* 0x55 */ {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
/* 0x5A */ {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
/* 0x5b */ {SCSI_MMC4_CLOSETRACK , "Close Track"},
|
||||
/* 0x5c */ {SCSI_MMC4_READBUFFERCAPACITY , "Read Buffer Capacity"},
|
||||
/* 0xA0 */ {SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
/* 0xA3 */ {SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
/* 0xa4 */ {SCSI_MMC4_REPORTKEY , "Report Key"},
|
||||
/* 0xa8 */ {SCSI_MMC4_READ12 , "Read(12)"},
|
||||
/* 0xaa */ {SCSI_MMC4_WRITE12 , "Write(12)"},
|
||||
/* 0xac */ {SCSI_MMC4_GETPERFORMANCE , "Get Performance"},
|
||||
/* 0xad */ {SCSI_MMC4_READDISCSTRUCTURE , "Read DISC Structure"},
|
||||
/* 0xb6 */ {SCSI_MMC4_SETSTREAMING , "Set Streaming"},
|
||||
/* 0xbb */ {SCSI_MMC4_SETCDSPEED , "Set CD Speed"},
|
||||
{0, NULL},
|
||||
};
|
||||
value_string_ext scsi_mmc_vals_ext = VALUE_STRING_EXT_INIT(scsi_mmc_vals);
|
||||
|
||||
const value_string scsi_track_mode_vals[] = {
|
||||
static const value_string scsi_track_mode_vals[] = {
|
||||
{0x00 , "2 audio channels without pre-emphasis, digital copy prohibited"},
|
||||
{0x01 , "2 audio channels with pre-emphasis of 50/15 us, digital copy prohibited"},
|
||||
{0x04 , "Data track, recorded uninterrupted, digital copy prohibited"},
|
||||
{0x05 , "Data track, recorded incremental, digital copy prohibited"},
|
||||
{0x08 , "audio channels without pre-emphasis, digital copy prohibited"},
|
||||
{0x09 , "audio channels with pre-emphasis of 50/15 us"},
|
||||
{0x02 , "2 audio channels without pre-emphasis, digital copy permitted"},
|
||||
{0x03 , "2 audio channels with pre-emphasis of 50/15 us, digital copy permitted"},
|
||||
{0x04 , "Data track, recorded uninterrupted, digital copy prohibited"},
|
||||
{0x05 , "Data track, recorded incremental, digital copy prohibited"},
|
||||
{0x06 , "Data track, recorded uninterrupted, digital copy permitted"},
|
||||
{0x07 , "Data track, recorded incremental, digital copy permitted"},
|
||||
{0x08 , "audio channels without pre-emphasis, digital copy prohibited"},
|
||||
{0x09 , "audio channels with pre-emphasis of 50/15 us"},
|
||||
{0x0a , "audio channels without pre-emphasis, digital copy permitted"},
|
||||
{0x0b , "audio channels with pre-emphasis of 50/15 us, digital copy permitted"},
|
||||
{0, NULL},
|
||||
};
|
||||
static value_string_ext scsi_track_mode_vals_ext = VALUE_STRING_EXT_INIT(scsi_track_mode_vals);
|
||||
|
||||
scsi_cdb_table_t scsi_mmc_table[256] = {
|
||||
/*SPC 0x00*/{dissect_spc_testunitready},
|
||||
|
@ -1623,8 +1629,8 @@ proto_register_scsi_mmc(void)
|
|||
{
|
||||
static hf_register_info hf[] = {
|
||||
{ &hf_scsi_mmc_opcode,
|
||||
{"MMC Opcode", "scsi_mmc.opcode", FT_UINT8, BASE_HEX,
|
||||
VALS (scsi_mmc_vals), 0x0, NULL, HFILL}},
|
||||
{"MMC Opcode", "scsi_mmc.opcode", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_mmc_vals_ext, 0x0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_setstreaming_type,
|
||||
{"Type", "scsi_mmc.setstreaming.type", FT_UINT8, BASE_DEC,
|
||||
VALS(scsi_setstreaming_type_val), 0, NULL, HFILL}},
|
||||
|
@ -1689,8 +1695,8 @@ proto_register_scsi_mmc(void)
|
|||
{"Copy", "scsi_mmc.rti.copy", FT_BOOLEAN, 8,
|
||||
NULL, 0x10, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_rti_track_mode,
|
||||
{"Track Mode", "scsi_mmc.rti.track_mode", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_track_mode_vals), 0x0f, NULL, HFILL}},
|
||||
{"Track Mode", "scsi_mmc.rti.track_mode", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_track_mode_vals_ext, 0x0f, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_rti_rt,
|
||||
{"RT", "scsi_mmc.rti.rt", FT_BOOLEAN, 8,
|
||||
NULL, 0x80, NULL, HFILL}},
|
||||
|
@ -1803,8 +1809,8 @@ proto_register_scsi_mmc(void)
|
|||
{"Q Subchannel ADR", "scsi_mmc.q.subchannel.adr", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_q_subchannel_adr_val), 0xf0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_q_subchannel_control,
|
||||
{"Q Subchannel Control", "scsi_mmc.q.subchannel.control", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_q_subchannel_control_val), 0x0f, NULL, HFILL}},
|
||||
{"Q Subchannel Control", "scsi_mmc.q.subchannel.control", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_q_subchannel_control_val_ext, 0x0f, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_agid,
|
||||
{"AGID", "scsi_mmc.agid", FT_UINT8, BASE_HEX,
|
||||
NULL, 0xc0, NULL, HFILL}},
|
||||
|
@ -1833,14 +1839,14 @@ proto_register_scsi_mmc(void)
|
|||
{"RT", "scsi_mmc.getconf.rt", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_getconf_rt_val), 0x03, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_getconf_current_profile,
|
||||
{"Current Profile", "scsi_mmc.getconf.current_profile", FT_UINT16, BASE_HEX,
|
||||
VALS(scsi_getconf_current_profile_val), 0, NULL, HFILL}},
|
||||
{"Current Profile", "scsi_mmc.getconf.current_profile", FT_UINT16, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_getconf_current_profile_val_ext, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_getconf_starting_feature,
|
||||
{"Starting Feature", "scsi_mmc.getconf.starting_feature", FT_UINT16, BASE_HEX,
|
||||
VALS(scsi_feature_val), 0, NULL, HFILL}},
|
||||
{"Starting Feature", "scsi_mmc.getconf.starting_feature", FT_UINT16, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_feature_val_ext, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_feature,
|
||||
{"Feature", "scsi_mmc.feature", FT_UINT16, BASE_HEX,
|
||||
VALS(scsi_feature_val), 0, NULL, HFILL}},
|
||||
{"Feature", "scsi_mmc.feature", FT_UINT16, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_feature_val_ext, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_feature_version,
|
||||
{"Version", "scsi_mmc.feature.version", FT_UINT8, BASE_DEC,
|
||||
NULL, 0x3c, NULL, HFILL}},
|
||||
|
@ -1932,8 +1938,8 @@ proto_register_scsi_mmc(void)
|
|||
{"DVD-RW", "scsi_mmc.feature.dvdr.dvdrw", FT_BOOLEAN, 8,
|
||||
NULL, 0x02, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_feature_profile,
|
||||
{"Profile", "scsi_mmc.feature.profile", FT_UINT16, BASE_HEX,
|
||||
VALS(scsi_getconf_current_profile_val), 0, NULL, HFILL}},
|
||||
{"Profile", "scsi_mmc.feature.profile", FT_UINT16, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_getconf_current_profile_val_ext, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_feature_profile_current,
|
||||
{"Current", "scsi_mmc.feature.profile.current", FT_BOOLEAN, 8,
|
||||
NULL, 0x01, NULL, HFILL}},
|
||||
|
@ -1983,8 +1989,8 @@ proto_register_scsi_mmc(void)
|
|||
{"Free Blocks", "scsi_mmc.free_blocks", FT_UINT32, BASE_DEC,
|
||||
NULL, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_read_dvd_format,
|
||||
{ "Format Code", "scsi_mmc.read_dvd.format", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_read_dvd_formats), 0x0, NULL, HFILL}},
|
||||
{ "Format Code", "scsi_mmc.read_dvd.format", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_read_dvd_formats_ext, 0x0, NULL, HFILL}},
|
||||
{ &hf_scsi_mmc_disc_book_type,
|
||||
{ "Type", "scsi_mmc.book.type", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_disc_category_type), 0xf0, NULL, HFILL}},
|
||||
|
@ -2123,3 +2129,16 @@ proto_register_scsi_mmc(void)
|
|||
proto_register_subtree_array(ett, array_length(ett));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
||||
* :indentSize=4:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -28,4 +28,6 @@
|
|||
extern int hf_scsi_mmc_opcode;
|
||||
extern scsi_cdb_table_t scsi_mmc_table[256];
|
||||
|
||||
WS_DLL_PUBLIC value_string_ext scsi_mmc_vals_ext;
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,7 +29,7 @@
|
|||
|
||||
#define SCSI_OSD_OPCODE 0x7f
|
||||
|
||||
extern const value_string attributes_page_vals[];
|
||||
WS_DLL_PUBLIC value_string_ext attributes_page_vals_ext;
|
||||
|
||||
typedef struct _scsi_osd_lun_info_t scsi_osd_lun_info_t;
|
||||
typedef struct _attribute_page_numbers_t attribute_page_numbers_t;
|
||||
|
@ -49,6 +49,6 @@ osd_lookup_attribute(guint32 page, guint32 number);
|
|||
|
||||
extern int hf_scsi_osd_opcode;
|
||||
extern scsi_cdb_table_t scsi_osd_table[256];
|
||||
WS_DLL_PUBLIC const value_string scsi_osd_vals[];
|
||||
WS_DLL_PUBLIC value_string_ext scsi_osd_vals_ext;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -984,7 +984,7 @@ dissect_sbc_readcapacity10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
|
|||
guint offset, gboolean isreq, gboolean iscdb,
|
||||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
guint32 len, block_len, tot_len;
|
||||
guint32 len, block_len, tot_len;
|
||||
const char *un;
|
||||
|
||||
if (!tree)
|
||||
|
@ -1221,9 +1221,8 @@ dissect_sbc_sanitize (tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
guint8 service_action;
|
||||
|
||||
service_action = tvb_get_guint8 (tvb, offset) & 0x1F;
|
||||
col_append_str(pinfo->cinfo, COL_INFO, val_to_str(service_action,
|
||||
sanitize_val,
|
||||
"Unknown (0x%02x)"));
|
||||
col_append_str(pinfo->cinfo, COL_INFO,
|
||||
val_to_str(service_action, sanitize_val, "Unknown (0x%02x)"));
|
||||
|
||||
proto_tree_add_bitmask(tree, tvb, offset, hf_scsi_sbc_sanitize_flags,
|
||||
ett_scsi_sanitize, sanitize_fields, ENC_BIG_ENDIAN);
|
||||
|
@ -1322,9 +1321,9 @@ dissect_sbc_serviceactionin16 (tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
gboolean iscdb,
|
||||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
guint8 service_action;
|
||||
guint32 block_len;
|
||||
guint64 len, tot_len;
|
||||
guint8 service_action;
|
||||
guint32 block_len;
|
||||
guint64 len, tot_len;
|
||||
const char *un;
|
||||
|
||||
if (!tree)
|
||||
|
@ -1485,82 +1484,85 @@ dissect_sbc_serviceactionin16 (tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
|
||||
|
||||
/* SBC Commands */
|
||||
const value_string scsi_sbc_vals[] = {
|
||||
{SCSI_SPC_EXTCOPY , "Extended Copy"},
|
||||
{SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
{SCSI_SBC_FORMATUNIT , "Format Unit"},
|
||||
{SCSI_SBC_LOCKUNLKCACHE10 , "Lock Unlock Cache(10)"},
|
||||
{SCSI_SBC_LOCKUNLKCACHE16 , "Lock Unlock Cache(16)"},
|
||||
{SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
{SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
{SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
{SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
{SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
{SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
{SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
{SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
{SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
{SCSI_SBC_PREFETCH10 , "Pre-Fetch(10)"},
|
||||
{SCSI_SBC_PREFETCH16 , "Pre-Fetch(16)"},
|
||||
{SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
{SCSI_SBC_READ6 , "Read(6)"},
|
||||
{SCSI_SBC_READ10 , "Read(10)"},
|
||||
{SCSI_SBC_READ12 , "Read(12)"},
|
||||
{SCSI_SBC_READ16 , "Read(16)"},
|
||||
{SCSI_SBC_READCAPACITY10 , "Read Capacity(10)"},
|
||||
{SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
{SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
{SCSI_SBC_SERVICEACTIONIN16 , "Service Action In(16)"},
|
||||
{SCSI_SBC_READDEFDATA10 , "Read Defect Data(10)"},
|
||||
{SCSI_SBC_READDEFDATA12 , "Read Defect Data(12)"},
|
||||
{SCSI_SBC_READLONG , "Read Long(10)"},
|
||||
{SCSI_SBC_REASSIGNBLKS , "Reassign Blocks"},
|
||||
{SCSI_SBC_REBUILD16 , "Rebuild(16)"},
|
||||
{SCSI_SBC_REBUILD32 , "Rebuild(32)"},
|
||||
{SCSI_SBC_REGENERATE16 , "Regenerate(16)"},
|
||||
{SCSI_SBC_REGENERATE32 , "Regenerate(32)"},
|
||||
{SCSI_SPC_RELEASE6 , "Release(6)"}, /* obsolete in SBC2 and later */
|
||||
{SCSI_SPC_RELEASE10 , "Release(10)"},/* obsolete in SBC2 and later */
|
||||
{SCSI_SPC_RESERVE6 , "Reserve(6)"}, /* obsolete in SBC2 and later */
|
||||
{SCSI_SPC_RESERVE10 , "Reserve(10)"},/* obsolete in SBC2 and later */
|
||||
{SCSI_SBC_SANITIZE , "Sanitize"},
|
||||
{SCSI_SBC_SEEK10 , "Seek(10)"},
|
||||
{SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
{SCSI_SBC_SETLIMITS10 , "Set Limits(10)"},
|
||||
{SCSI_SBC_SETLIMITS12 , "Set Limits(12)"},
|
||||
{SCSI_SBC_STARTSTOPUNIT , "Start Stop Unit"},
|
||||
{SCSI_SBC_SYNCCACHE10 , "Synchronize Cache(10)"},
|
||||
{SCSI_SBC_SYNCCACHE16 , "Synchronize Cache(16)"},
|
||||
{SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
{SCSI_SBC_UNMAP , "Unmap"},
|
||||
{SCSI_SBC_VERIFY10 , "Verify(10)"},
|
||||
{SCSI_SBC_VERIFY12 , "Verify(12)"},
|
||||
{SCSI_SBC_VERIFY16 , "Verify(16)"},
|
||||
{SCSI_SBC_WRITE6 , "Write(6)"},
|
||||
{SCSI_SBC_WRITE10 , "Write(10)"},
|
||||
{SCSI_SBC_WRITE12 , "Write(12)"},
|
||||
{SCSI_SBC_WRITE16 , "Write(16)"},
|
||||
{SCSI_SBC_ORWRITE , "OrWrite(16)"},
|
||||
{SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
{SCSI_SBC_COMPARENWRITE , "Compare & Write(16)"},
|
||||
{SCSI_SBC_WRITENVERIFY10 , "Write & Verify(10)"},
|
||||
{SCSI_SBC_WRITENVERIFY12 , "Write & Verify(12)"},
|
||||
{SCSI_SBC_WRITENVERIFY16 , "Write & Verify(16)"},
|
||||
{SCSI_SBC_WRITELONG , "Write Long"},
|
||||
{SCSI_SBC_WRITESAME10 , "Write Same(10)"},
|
||||
{SCSI_SBC_WRITESAME16 , "Write Same(16)"},
|
||||
{SCSI_SBC_XDREAD10 , "XdRead(10)"},
|
||||
{SCSI_SBC_XDREAD32 , "XdRead(32)"},
|
||||
{SCSI_SBC_XDWRITE10 , "XdWrite(10)"},
|
||||
{SCSI_SBC_XDWRITE32 , "XdWrite(32)"},
|
||||
{SCSI_SBC_XDWRITEREAD10 , "XdWriteRead(10)"},
|
||||
{SCSI_SBC_XDWRITEREAD32 , "XdWriteRead(32)"},
|
||||
{SCSI_SBC_XDWRITEEXTD16 , "XdWrite Extended(16)"},
|
||||
{SCSI_SBC_XDWRITEEXTD32 , "XdWrite Extended(32)"},
|
||||
{SCSI_SBC_XPWRITE10 , "XpWrite(10)"},
|
||||
{SCSI_SBC_XPWRITE32 , "XpWrite(32)"},
|
||||
static const value_string scsi_sbc_vals[] = {
|
||||
/* 0x00 */ {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
/* 0x03 */ {SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
/* 0x04 */ {SCSI_SBC_FORMATUNIT , "Format Unit"},
|
||||
/* 0x07 */ {SCSI_SBC_REASSIGNBLKS , "Reassign Blocks"},
|
||||
/* 0x08 */ {SCSI_SBC_READ6 , "Read(6)"},
|
||||
/* 0x0A */ {SCSI_SBC_WRITE6 , "Write(6)"},
|
||||
/* 0x12 */ {SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
/* 0x15 */ {SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
/* 0x16 */ {SCSI_SPC_RESERVE6 , "Reserve(6)"}, /* obsolete in SBC2 and later */
|
||||
/* 0x17 */ {SCSI_SPC_RELEASE6 , "Release(6)"}, /* obsolete in SBC2 and later */
|
||||
/* 0x1A */ {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
/* 0x1B */ {SCSI_SBC_STARTSTOPUNIT , "Start Stop Unit"},
|
||||
/* 0x1D */ {SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
/* 0x1E */ {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
/* 0x25 */ {SCSI_SBC_READCAPACITY10 , "Read Capacity(10)"},
|
||||
/* 0x28 */ {SCSI_SBC_READ10 , "Read(10)"},
|
||||
/* 0x2A */ {SCSI_SBC_WRITE10 , "Write(10)"},
|
||||
/* 0x2B */ {SCSI_SBC_SEEK10 , "Seek(10)"},
|
||||
/* 0x2E */ {SCSI_SBC_WRITENVERIFY10 , "Write & Verify(10)"},
|
||||
/* 0x2F */ {SCSI_SBC_VERIFY10 , "Verify(10)"},
|
||||
/* 0x33 */ {SCSI_SBC_SETLIMITS10 , "Set Limits(10)"},
|
||||
/* 0x34 */ {SCSI_SBC_PREFETCH10 , "Pre-Fetch(10)"},
|
||||
/* 0x35 */ {SCSI_SBC_SYNCCACHE10 , "Synchronize Cache(10)"},
|
||||
/* 0x36 */ {SCSI_SBC_LOCKUNLKCACHE10 , "Lock Unlock Cache(10)"},
|
||||
/* 0x37 */ {SCSI_SBC_READDEFDATA10 , "Read Defect Data(10)"},
|
||||
/* 0x3B */ {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
/* 0x3E */ {SCSI_SBC_READLONG , "Read Long(10)"},
|
||||
/* 0x3F */ {SCSI_SBC_WRITELONG , "Write Long"},
|
||||
/* 0x41 */ {SCSI_SBC_WRITESAME10 , "Write Same(10)"},
|
||||
/* 0x42 */ {SCSI_SBC_UNMAP , "Unmap"},
|
||||
/* 0x48 */ {SCSI_SBC_SANITIZE , "Sanitize"},
|
||||
/* 0x4C */ {SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
/* 0x4D */ {SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
/* 0x50 */ {SCSI_SBC_XDWRITE10 , "XdWrite(10)"},
|
||||
/* 0x51 */ {SCSI_SBC_XPWRITE10 , "XpWrite(10)"},
|
||||
/* 0x52 */ {SCSI_SBC_XDREAD10 , "XdRead(10)"},
|
||||
/* 0x53 */ {SCSI_SBC_XDWRITEREAD10 , "XdWriteRead(10)"},
|
||||
/* 0x55 */ {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
/* 0x56 */ {SCSI_SPC_RESERVE10 , "Reserve(10)"},/* obsolete in SBC2 and later */
|
||||
/* 0x57 */ {SCSI_SPC_RELEASE10 , "Release(10)"},/* obsolete in SBC2 and later */
|
||||
/* 0x5A */ {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
/* 0x5E */ {SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
/* 0x5F */ {SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
/* 0x7F */ {SCSI_SBC_REBUILD32 , "Rebuild(32)"},
|
||||
#if 0 /* dups which would never have been found (in the previous unsorted version of this array) */
|
||||
/* 0x7F */ {SCSI_SBC_REGENERATE32 , "Regenerate(32)"},
|
||||
/* 0x7F */ {SCSI_SBC_XDREAD32 , "XdRead(32)"},
|
||||
/* 0x7F */ {SCSI_SBC_XDWRITE32 , "XdWrite(32)"},
|
||||
/* 0x7F */ {SCSI_SBC_XDWRITEEXTD32 , "XdWrite Extended(32)"},
|
||||
/* 0x7F */ {SCSI_SBC_XDWRITEREAD32 , "XdWriteRead(32)"},
|
||||
/* 0x7F */ {SCSI_SBC_XPWRITE32 , "XpWrite(32)"},
|
||||
#endif
|
||||
/* 0x80 */ {SCSI_SBC_XDWRITEEXTD16 , "XdWrite Extended(16)"},
|
||||
/* 0x81 */ {SCSI_SBC_REBUILD16 , "Rebuild(16)"},
|
||||
/* 0x82 */ {SCSI_SBC_REGENERATE16 , "Regenerate(16)"},
|
||||
/* 0x83 */ {SCSI_SPC_EXTCOPY , "Extended Copy"},
|
||||
/* 0x88 */ {SCSI_SBC_READ16 , "Read(16)"},
|
||||
/* 0x89 */ {SCSI_SBC_COMPARENWRITE , "Compare & Write(16)"},
|
||||
/* 0x8A */ {SCSI_SBC_WRITE16 , "Write(16)"},
|
||||
/* 0x8B */ {SCSI_SBC_ORWRITE , "OrWrite(16)"},
|
||||
/* 0x8E */ {SCSI_SBC_WRITENVERIFY16 , "Write & Verify(16)"},
|
||||
/* 0x8F */ {SCSI_SBC_VERIFY16 , "Verify(16)"},
|
||||
/* 0x90 */ {SCSI_SBC_PREFETCH16 , "Pre-Fetch(16)"},
|
||||
/* 0x91 */ {SCSI_SBC_SYNCCACHE16 , "Synchronize Cache(16)"},
|
||||
/* 0x92 */ {SCSI_SBC_LOCKUNLKCACHE16 , "Lock Unlock Cache(16)"},
|
||||
/* 0x93 */ {SCSI_SBC_WRITESAME16 , "Write Same(16)"},
|
||||
/* 0x9E */ {SCSI_SBC_SERVICEACTIONIN16 , "Service Action In(16)"},
|
||||
/* 0xA0 */ {SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
/* 0xA3 */ {SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
/* 0xA8 */ {SCSI_SBC_READ12 , "Read(12)"},
|
||||
/* 0xAA */ {SCSI_SBC_WRITE12 , "Write(12)"},
|
||||
/* 0xAE */ {SCSI_SBC_WRITENVERIFY12 , "Write & Verify(12)"},
|
||||
/* 0xAF */ {SCSI_SBC_VERIFY12 , "Verify(12)"},
|
||||
/* 0xB3 */ {SCSI_SBC_SETLIMITS12 , "Set Limits(12)"},
|
||||
/* 0xB7 */ {SCSI_SBC_READDEFDATA12 , "Read Defect Data(12)"},
|
||||
{0, NULL}
|
||||
};
|
||||
value_string_ext scsi_sbc_vals_ext = VALUE_STRING_EXT_INIT(scsi_sbc_vals);
|
||||
|
||||
scsi_cdb_table_t scsi_sbc_table[256] = {
|
||||
/*SPC 0x00*/{dissect_spc_testunitready},
|
||||
|
@ -1827,8 +1829,8 @@ proto_register_scsi_sbc(void)
|
|||
{
|
||||
static hf_register_info hf[] = {
|
||||
{ &hf_scsi_sbc_opcode,
|
||||
{"SBC Opcode", "scsi_sbc.opcode", FT_UINT8, BASE_HEX,
|
||||
VALS (scsi_sbc_vals), 0x0, NULL, HFILL}},
|
||||
{"SBC Opcode", "scsi_sbc.opcode", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_sbc_vals_ext, 0x0, NULL, HFILL}},
|
||||
{ &hf_scsi_sbc_formatunit_flags,
|
||||
{"Flags", "scsi_sbc.formatunit.flags", FT_UINT8, BASE_HEX, NULL, 0xF8,
|
||||
NULL, HFILL}},
|
||||
|
@ -2165,16 +2167,15 @@ proto_reg_handoff_scsi_sbc(void)
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 4
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=4 tabstop=4 expandtab:
|
||||
* :indentSize=4:tabSize=4:noTabs=true:
|
||||
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
||||
* :indentSize=4:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -97,6 +97,6 @@ void dissect_sbc_readcapacity10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
|
|||
|
||||
extern int hf_scsi_sbc_opcode;
|
||||
extern scsi_cdb_table_t scsi_sbc_table[256];
|
||||
WS_DLL_PUBLIC const value_string scsi_sbc_vals[];
|
||||
WS_DLL_PUBLIC value_string_ext scsi_sbc_vals_ext;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -465,9 +465,9 @@ dissect_smc_readelementstatus (tvbuff_t *tvb, packet_info *pinfo,
|
|||
gboolean iscdb,
|
||||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
guint bytecnt, desc_bytecnt;
|
||||
guint8 elem_type;
|
||||
guint8 voltag_flags;
|
||||
guint bytecnt, desc_bytecnt;
|
||||
guint8 elem_type;
|
||||
guint8 voltag_flags;
|
||||
guint16 elem_desc_len;
|
||||
|
||||
if (!tree)
|
||||
|
@ -542,47 +542,48 @@ dissect_smc_readelementstatus (tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
|
||||
/* SMC Commands */
|
||||
const value_string scsi_smc_vals[] = {
|
||||
{SCSI_SPC_ACCESS_CONTROL_IN , "Access Control In"},
|
||||
{SCSI_SPC_ACCESS_CONTROL_OUT , "Access Control Out"},
|
||||
{SCSI_SMC_EXCHANGE_MEDIUM , "Exchange Medium"},
|
||||
{SCSI_SMC_INITIALIZE_ELEMENT_STATUS , "Initialize Element Status"},
|
||||
{SCSI_SMC_INITIALIZE_ELEMENT_STATUS_RANGE , "Initialize Element Status With Range"},
|
||||
{SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
{SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
{SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
{SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
{SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
{SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
{SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
{SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
{SCSI_SMC_MOVE_MEDIUM , "Move Medium"},
|
||||
{SCSI_SMC_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
|
||||
{SCSI_SMC_OPENCLOSE_ELEMENT , "Open/Close Import/Export Element"},
|
||||
{SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
{SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
{SCSI_SMC_POSITION_TO_ELEMENT , "Position To Element"},
|
||||
{SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
{SCSI_SMC_READ_ATTRIBUTE , "Read Attribute"},
|
||||
{SCSI_SPC_READBUFFER , "Read Buffer"},
|
||||
{SCSI_SMC_READ_ELEMENT_STATUS , "Read Element Status"},
|
||||
{SCSI_SMC_READ_ELEMENT_STATUS_ATTACHED , "Read Element Status Attached"},
|
||||
{SCSI_SPC_RCVDIAGRESULTS , "Receive Diagnostics Results"},
|
||||
{SCSI_SPC_RELEASE6 , "Release(6)"},
|
||||
{SCSI_SPC_RELEASE10 , "Release(10)"},
|
||||
{SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
{SCSI_SMC_REPORT_VOLUME_TYPES_SUPPORTED , "Report Volume Types Supported"},
|
||||
{SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
{SCSI_SMC_REQUEST_VOLUME_ELEMENT_ADDRESS , "Request Volume Element Address"},
|
||||
{SCSI_SPC_RESERVE6 , "Reserve(6)"},
|
||||
{SCSI_SPC_RESERVE10 , "Reserve(10)"},
|
||||
{SCSI_SMC_SEND_VOLUME_TAG , "Send Volume Tag"},
|
||||
{SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
{SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
{SCSI_SMC_WRITE_ATTRIBUTE , "Write Attribute"},
|
||||
{SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
static const value_string scsi_smc_vals[] = {
|
||||
/* 0x00 */ {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
/* 0x03 */ {SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
/* 0x07 */ {SCSI_SMC_INITIALIZE_ELEMENT_STATUS , "Initialize Element Status"},
|
||||
/* 0x12 */ {SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
/* 0x15 */ {SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
/* 0x16 */ {SCSI_SPC_RESERVE6 , "Reserve(6)"},
|
||||
/* 0x17 */ {SCSI_SPC_RELEASE6 , "Release(6)"},
|
||||
/* 0x1A */ {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
/* 0x1B */ {SCSI_SMC_OPENCLOSE_ELEMENT , "Open/Close Import/Export Element"},
|
||||
/* 0x1C */ {SCSI_SPC_RCVDIAGRESULTS , "Receive Diagnostics Results"},
|
||||
/* 0x1D */ {SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
/* 0x1E */ {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
/* 0x2B */ {SCSI_SMC_POSITION_TO_ELEMENT , "Position To Element"},
|
||||
/* 0x37 */ {SCSI_SMC_INITIALIZE_ELEMENT_STATUS_RANGE , "Initialize Element Status With Range"},
|
||||
/* 0x3B */ {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
/* 0x3C */ {SCSI_SPC_READBUFFER , "Read Buffer"},
|
||||
/* 0x40 */ {SCSI_SMC_EXCHANGE_MEDIUM , "Exchange Medium"},
|
||||
/* 0x44 */ {SCSI_SMC_REPORT_VOLUME_TYPES_SUPPORTED , "Report Volume Types Supported"},
|
||||
/* 0x4C */ {SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
/* 0x4D */ {SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
/* 0x55 */ {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
/* 0x56 */ {SCSI_SPC_RESERVE10 , "Reserve(10)"},
|
||||
/* 0x57 */ {SCSI_SPC_RELEASE10 , "Release(10)"},
|
||||
/* 0x5A */ {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
/* 0x5E */ {SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
/* 0x5F */ {SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
/* 0x86 */ {SCSI_SPC_ACCESS_CONTROL_IN , "Access Control In"},
|
||||
/* 0x87 */ {SCSI_SPC_ACCESS_CONTROL_OUT , "Access Control Out"},
|
||||
/* 0x8C */ {SCSI_SMC_READ_ATTRIBUTE , "Read Attribute"},
|
||||
/* 0x8D */ {SCSI_SMC_WRITE_ATTRIBUTE , "Write Attribute"},
|
||||
/* 0xA0 */ {SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
/* 0xA3 */ {SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
/* 0xA5 */ {SCSI_SMC_MOVE_MEDIUM , "Move Medium"},
|
||||
/* 0xA7 */ {SCSI_SMC_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
|
||||
/* 0xB4 */ {SCSI_SMC_READ_ELEMENT_STATUS_ATTACHED , "Read Element Status Attached"},
|
||||
/* 0xB5 */ {SCSI_SMC_REQUEST_VOLUME_ELEMENT_ADDRESS , "Request Volume Element Address"},
|
||||
/* 0xB6 */ {SCSI_SMC_SEND_VOLUME_TAG , "Send Volume Tag"},
|
||||
/* 0xB8 */ {SCSI_SMC_READ_ELEMENT_STATUS , "Read Element Status"},
|
||||
{0, NULL},
|
||||
};
|
||||
value_string_ext scsi_smc_vals_ext = VALUE_STRING_EXT_INIT(scsi_smc_vals);
|
||||
|
||||
scsi_cdb_table_t scsi_smc_table[256] = {
|
||||
/*SPC 0x00*/{dissect_spc_testunitready},
|
||||
|
@ -847,118 +848,308 @@ scsi_cdb_table_t scsi_smc_table[256] = {
|
|||
void
|
||||
proto_register_scsi_smc(void)
|
||||
{
|
||||
static hf_register_info hf[] = {
|
||||
static hf_register_info hf[] = {
|
||||
{ &hf_scsi_smc_opcode,
|
||||
{"SMC Opcode", "scsi_smc.opcode", FT_UINT8, BASE_HEX,
|
||||
VALS (scsi_smc_vals), 0x0, NULL, HFILL}},
|
||||
{"SMC Opcode", "scsi_smc.opcode",
|
||||
FT_UINT8, BASE_HEX | BASE_EXT_STRING, &scsi_smc_vals_ext, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_mta,
|
||||
{"Medium Transport Address", "scsi_smc.mta", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Medium Transport Address", "scsi_smc.mta",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_sa,
|
||||
{"Source Address", "scsi_smc.sa", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Source Address", "scsi_smc.sa",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_da,
|
||||
{"Destination Address", "scsi_smc.da", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Destination Address", "scsi_smc.da",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_fda,
|
||||
{"First Destination Address", "scsi_smc.fda", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"First Destination Address", "scsi_smc.fda",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_sda,
|
||||
{"Second Destination Address", "scsi_smc.sda", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Second Destination Address", "scsi_smc.sda",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_medium_flags,
|
||||
{"Flags", "scsi_smc.medium_flags", FT_UINT8, BASE_HEX,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Flags", "scsi_smc.medium_flags",
|
||||
FT_UINT8, BASE_HEX, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_inv1,
|
||||
{"INV1", "scsi_smc.inv1", FT_BOOLEAN, 8,
|
||||
NULL, 0x02, NULL, HFILL}},
|
||||
{"INV1", "scsi_smc.inv1",
|
||||
FT_BOOLEAN, 8, NULL, 0x02,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_inv2,
|
||||
{"INV2", "scsi_smc.inv2", FT_BOOLEAN, 8,
|
||||
NULL, 0x01, NULL, HFILL}},
|
||||
{"INV2", "scsi_smc.inv2",
|
||||
FT_BOOLEAN, 8, NULL, 0x01,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_range_flags,
|
||||
{"Flags", "scsi_smc.range_flags", FT_UINT8, BASE_HEX,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Flags", "scsi_smc.range_flags",
|
||||
FT_UINT8, BASE_HEX, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_fast,
|
||||
{"FAST", "scsi_smc.fast", FT_BOOLEAN, 8,
|
||||
NULL, 0x02, NULL, HFILL}},
|
||||
{"FAST", "scsi_smc.fast",
|
||||
FT_BOOLEAN, 8, NULL, 0x02,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_range,
|
||||
{"RANGE", "scsi_smc.range", FT_BOOLEAN, 8,
|
||||
NULL, 0x01, NULL, HFILL}},
|
||||
{"RANGE", "scsi_smc.range",
|
||||
FT_BOOLEAN, 8, NULL, 0x01,
|
||||
NULL, HFILL}
|
||||
},
|
||||
#if 0
|
||||
{ &hf_scsi_smc_sea,
|
||||
{"Starting Element Address", "scsi_smc.sea", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Starting Element Address", "scsi_smc.sea",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
#endif
|
||||
{ &hf_scsi_smc_num_elements,
|
||||
{"Number of Elements", "scsi_smc.num_elements", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Number of Elements", "scsi_smc.num_elements",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_invert,
|
||||
{"INVERT", "scsi_smc.invert", FT_BOOLEAN, 8,
|
||||
NULL, 0x01, NULL, HFILL}},
|
||||
{"INVERT", "scsi_smc.invert",
|
||||
FT_BOOLEAN, 8, NULL, 0x01,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_ea,
|
||||
{"Element Address", "scsi_smc.ea", FT_UINT16, BASE_DEC,
|
||||
NULL, 0x0, NULL, HFILL}},
|
||||
{"Element Address", "scsi_smc.ea",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_scsi_smc_action_code,
|
||||
{"Action Code", "scsi_smc.action_code", FT_UINT8, BASE_HEX,
|
||||
VALS(action_code_vals), 0x1f, NULL, HFILL}},
|
||||
{"Action Code", "scsi_smc.action_code",
|
||||
FT_UINT8, BASE_HEX, VALS(action_code_vals), 0x1f,
|
||||
NULL, HFILL}
|
||||
},
|
||||
|
||||
/* Generated from convert_proto_tree_add_text.pl */
|
||||
{ &hf_scsi_smc_scsi_bus_address, { "SCSI Bus Address", "scsi_smc.scsi_bus_address", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_source_storage_element_address, { "Source Storage Element Address", "scsi_smc.source_storage_element_address", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_code_set, { "Code Set", "scsi_smc.code_set", FT_UINT8, BASE_DEC, VALS(scsi_devid_codeset_val), 0x0F, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_identifier_type, { "Identifier Type", "scsi_smc.identifier_type", FT_UINT8, BASE_DEC, VALS(scsi_devid_idtype_val), 0x0F, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_identifier_length, { "Identifier Length", "scsi_smc.identifier_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_identifier, { "Identifier", "scsi_smc.identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_vendor_specific_data, { "Vendor-specific Data", "scsi_smc.vendor_specific_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_voltag, { "VOLTAG", "scsi_smc.voltag", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_starting_element_address, { "Starting Element Address", "scsi_smc.starting_element_address", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_number_of_elements, { "Number of Elements", "scsi_smc.number_of_elements", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_curdata, { "CURDATA", "scsi_smc.curdata", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_allocation_length, { "Allocation Length", "scsi_smc.allocation_length", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_first_element_address_reported, { "First Element Address Reported", "scsi_smc.first_element_address_reported", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_number_of_elements_available, { "Number of Elements Available", "scsi_smc.number_of_elements_available", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_byte_count_of_report_available, { "Byte Count of Report Available", "scsi_smc.byte_count_of_report_available", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_element_type_code, { "Element Type Code", "scsi_smc.element_type_code", FT_UINT8, BASE_DEC, VALS(element_type_code_vals), 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_element_type_code_0F, { "Element Type Code", "scsi_smc.element_type_code", FT_UINT8, BASE_DEC, VALS(element_type_code_vals), 0x0F, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_pvoltag, { "PVOLTAG", "scsi_smc.pvoltag", FT_BOOLEAN, 8, NULL, PVOLTAG, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_element_descriptor_length, { "Element Descriptor Length", "scsi_smc.element_descriptor_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_byte_count_of_descriptor_data_available, { "Byte Count Of Descriptor Data Available", "scsi_smc.byte_count_of_descriptor_data_available", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_except, { "EXCEPT", "scsi_smc.except", FT_BOOLEAN, 8, NULL, EXCEPT, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_access, { "ACCESS", "scsi_smc.access", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_cmc, { "cmc", "scsi_smc.cmc", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_additional_sense_code_qualifier, { "Additional Sense Code+Qualifier", "scsi_smc.additional_sense_code_qualifier", FT_UINT16, BASE_HEX|BASE_EXT_STRING, &scsi_asc_val_ext, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_not_bus, { "NOT BUS", "scsi_smc.not_bus", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_id_valid, { "ID VALID", "scsi_smc.id_valid", FT_BOOLEAN, 8, NULL, ID_VALID, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_lu_valid, { "LU VALID", "scsi_smc.lu_valid", FT_BOOLEAN, 8, NULL, LU_VALID, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_svalid, { "SVALID", "scsi_smc.svalid", FT_BOOLEAN, 8, NULL, SVALID, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_dvcid, { "DVCID", "scsi_smc.dvcid", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_avoltag, { "AVOLTAG", "scsi_smc.pvoltag", FT_BOOLEAN, 8, NULL, AVOLTAG, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_full, { "FULL", "scsi_smc.full", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_exenab, { "EXENAB", "scsi_smc.exenab", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_inenab, { "INENAB", "scsi_smc.inenab", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_impexp, { "IMPEXP", "scsi_smc.impexp", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_lun, { "LUN", "scsi_smc.lun", FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_primary_vol_tag_id, { "Primary Volume Identification", "scsi_smc.primary_vol_tag_id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_alternate_vol_tag_id, { "Alternate Volume Identification", "scsi_smc.alternate_vol_tag_id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_primary_vol_seq_num, { "Primary Volume Sequence Number", "scsi_smc.primary_vol_seq_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_scsi_smc_alternate_vol_seq_num, { "Alternate Volume Sequence Number", "scsi_smc.alternate_vol_seq_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
||||
};
|
||||
/* Generated from convert_proto_tree_add_text.pl */
|
||||
{ &hf_scsi_smc_scsi_bus_address,
|
||||
{ "SCSI Bus Address", "scsi_smc.scsi_bus_address",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_source_storage_element_address,
|
||||
{ "Source Storage Element Address", "scsi_smc.source_storage_element_address",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_code_set,
|
||||
{ "Code Set", "scsi_smc.code_set",
|
||||
FT_UINT8, BASE_DEC, VALS(scsi_devid_codeset_val), 0x0F,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_identifier_type,
|
||||
{ "Identifier Type", "scsi_smc.identifier_type",
|
||||
FT_UINT8, BASE_DEC, VALS(scsi_devid_idtype_val), 0x0F,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_identifier_length,
|
||||
{ "Identifier Length", "scsi_smc.identifier_length",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_identifier,
|
||||
{ "Identifier", "scsi_smc.identifier",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_vendor_specific_data,
|
||||
{ "Vendor-specific Data", "scsi_smc.vendor_specific_data",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_voltag,
|
||||
{ "VOLTAG", "scsi_smc.voltag",
|
||||
FT_BOOLEAN, 8, NULL, 0x10,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_starting_element_address,
|
||||
{ "Starting Element Address", "scsi_smc.starting_element_address",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_number_of_elements,
|
||||
{ "Number of Elements", "scsi_smc.number_of_elements",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_curdata,
|
||||
{ "CURDATA", "scsi_smc.curdata",
|
||||
FT_BOOLEAN, 8, NULL, 0x02,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_allocation_length,
|
||||
{ "Allocation Length", "scsi_smc.allocation_length",
|
||||
FT_UINT24, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_first_element_address_reported,
|
||||
{ "First Element Address Reported", "scsi_smc.first_element_address_reported",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_number_of_elements_available,
|
||||
{ "Number of Elements Available", "scsi_smc.number_of_elements_available",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_byte_count_of_report_available,
|
||||
{ "Byte Count of Report Available", "scsi_smc.byte_count_of_report_available",
|
||||
FT_UINT24, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_element_type_code,
|
||||
{ "Element Type Code", "scsi_smc.element_type_code",
|
||||
FT_UINT8, BASE_DEC, VALS(element_type_code_vals), 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_element_type_code_0F,
|
||||
{ "Element Type Code", "scsi_smc.element_type_code",
|
||||
FT_UINT8, BASE_DEC, VALS(element_type_code_vals), 0x0F,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_pvoltag,
|
||||
{ "PVOLTAG", "scsi_smc.pvoltag",
|
||||
FT_BOOLEAN, 8, NULL, PVOLTAG,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_element_descriptor_length,
|
||||
{ "Element Descriptor Length", "scsi_smc.element_descriptor_length",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_byte_count_of_descriptor_data_available,
|
||||
{ "Byte Count Of Descriptor Data Available", "scsi_smc.byte_count_of_descriptor_data_available",
|
||||
FT_UINT24, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_except,
|
||||
{ "EXCEPT", "scsi_smc.except",
|
||||
FT_BOOLEAN, 8, NULL, EXCEPT,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_access,
|
||||
{ "ACCESS", "scsi_smc.access",
|
||||
FT_BOOLEAN, 8, NULL, 0x08,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_cmc,
|
||||
{ "cmc", "scsi_smc.cmc",
|
||||
FT_BOOLEAN, 8, NULL, 0x40,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_additional_sense_code_qualifier,
|
||||
{ "Additional Sense Code+Qualifier", "scsi_smc.additional_sense_code_qualifier",
|
||||
FT_UINT16, BASE_HEX|BASE_EXT_STRING, &scsi_asc_val_ext, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_not_bus,
|
||||
{ "NOT BUS", "scsi_smc.not_bus",
|
||||
FT_BOOLEAN, 8, NULL, 0x80,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_id_valid,
|
||||
{ "ID VALID", "scsi_smc.id_valid",
|
||||
FT_BOOLEAN, 8, NULL, ID_VALID,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_lu_valid,
|
||||
{ "LU VALID", "scsi_smc.lu_valid",
|
||||
FT_BOOLEAN, 8, NULL, LU_VALID,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_svalid,
|
||||
{ "SVALID", "scsi_smc.svalid",
|
||||
FT_BOOLEAN, 8, NULL, SVALID,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_dvcid,
|
||||
{ "DVCID", "scsi_smc.dvcid",
|
||||
FT_BOOLEAN, 8, NULL, 0x01,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_avoltag,
|
||||
{ "AVOLTAG", "scsi_smc.pvoltag",
|
||||
FT_BOOLEAN, 8, NULL, AVOLTAG,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_full,
|
||||
{ "FULL", "scsi_smc.full",
|
||||
FT_BOOLEAN, 8, NULL, 0x01,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_exenab,
|
||||
{ "EXENAB", "scsi_smc.exenab",
|
||||
FT_BOOLEAN, 8, NULL, 0x10,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_inenab,
|
||||
{ "INENAB", "scsi_smc.inenab",
|
||||
FT_BOOLEAN, 8, NULL, 0x20,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_impexp,
|
||||
{ "IMPEXP", "scsi_smc.impexp",
|
||||
FT_BOOLEAN, 8, NULL, 0x02,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_lun,
|
||||
{ "LUN", "scsi_smc.lun",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x07,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_primary_vol_tag_id,
|
||||
{ "Primary Volume Identification", "scsi_smc.primary_vol_tag_id",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_alternate_vol_tag_id,
|
||||
{ "Alternate Volume Identification", "scsi_smc.alternate_vol_tag_id",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_primary_vol_seq_num,
|
||||
{ "Primary Volume Sequence Number", "scsi_smc.primary_vol_seq_num",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_scsi_smc_alternate_vol_seq_num,
|
||||
{ "Alternate Volume Sequence Number", "scsi_smc.alternate_vol_seq_num",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/* Setup protocol subtree array */
|
||||
static gint *ett[] = {
|
||||
&ett_scsi_exchange_medium,
|
||||
&ett_scsi_range,
|
||||
&ett_scsi_move
|
||||
};
|
||||
/* Setup protocol subtree array */
|
||||
static gint *ett[] = {
|
||||
&ett_scsi_exchange_medium,
|
||||
&ett_scsi_range,
|
||||
&ett_scsi_move
|
||||
};
|
||||
|
||||
/* Register the protocol name and description */
|
||||
proto_scsi_smc = proto_register_protocol("SCSI_SMC", "SCSI_SMC", "scsi_smc");
|
||||
/* Register the protocol name and description */
|
||||
proto_scsi_smc = proto_register_protocol("SCSI_SMC", "SCSI_SMC", "scsi_smc");
|
||||
|
||||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array(proto_scsi_smc, hf, array_length(hf));
|
||||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array(proto_scsi_smc, hf, array_length(hf));
|
||||
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -966,3 +1157,16 @@ proto_reg_handoff_scsi_smc(void)
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
||||
* :indentSize=4:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -52,6 +52,6 @@ void dissect_smc_readelementstatus (tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
|||
|
||||
extern int hf_scsi_smc_opcode;
|
||||
extern scsi_cdb_table_t scsi_smc_table[256];
|
||||
WS_DLL_PUBLIC const value_string scsi_smc_vals[];
|
||||
WS_DLL_PUBLIC value_string_ext scsi_smc_vals_ext;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -45,56 +45,56 @@
|
|||
void proto_register_scsi_ssc(void);
|
||||
void proto_reg_handoff_scsi_ssc(void);
|
||||
|
||||
static int proto_scsi_ssc = -1;
|
||||
int hf_scsi_ssc_opcode = -1;
|
||||
static int hf_scsi_ssc_rdwr6_xferlen = -1;
|
||||
static int hf_scsi_ssc_ver16_verlen = -1;
|
||||
static int hf_scsi_ssc_locate10_loid = -1;
|
||||
static int hf_scsi_ssc_locate16_loid = -1;
|
||||
static int hf_scsi_ssc_space6_code = -1;
|
||||
static int hf_scsi_ssc_space6_count = -1;
|
||||
static int hf_scsi_ssc_space16_count = -1;
|
||||
static int hf_scsi_ssc_erase_flags = -1;
|
||||
static int hf_scsi_ssc_fcs = -1;
|
||||
static int hf_scsi_ssc_lcs = -1;
|
||||
static int hf_scsi_ssc_erase_immed = -1;
|
||||
static int hf_scsi_ssc_long = -1;
|
||||
static int hf_scsi_ssc_partition = -1;
|
||||
static int hf_scsi_ssc_lbi = -1;
|
||||
static int hf_scsi_ssc_verify = -1;
|
||||
static int hf_scsi_ssc_immed = -1;
|
||||
static int hf_scsi_ssc_formatmedium_flags = -1;
|
||||
static int hf_scsi_ssc_format = -1;
|
||||
static int hf_scsi_ssc_rdwr10_xferlen = -1;
|
||||
static int hf_scsi_ssc_loadunload_immed_flags = -1;
|
||||
static int hf_scsi_ssc_loadunload_flags = -1;
|
||||
static int hf_scsi_ssc_hold = -1;
|
||||
static int hf_scsi_ssc_eot = -1;
|
||||
static int hf_scsi_ssc_reten = -1;
|
||||
static int hf_scsi_ssc_load = -1;
|
||||
static int hf_scsi_ssc_locate_flags = -1;
|
||||
static int hf_scsi_ssc_bt = -1;
|
||||
static int hf_scsi_ssc_cp = -1;
|
||||
static int hf_scsi_ssc_dest_type = -1;
|
||||
static int hf_scsi_ssc_bam_flags = -1;
|
||||
static int hf_scsi_ssc_bam = -1;
|
||||
static int hf_scsi_ssc_read6_flags = -1;
|
||||
static int hf_scsi_ssc_sili = -1;
|
||||
static int hf_scsi_ssc_fixed = -1;
|
||||
static int hf_scsi_ssc_bytord = -1;
|
||||
static int hf_scsi_ssc_bytcmp = -1;
|
||||
static int hf_scsi_ssc_verify16_immed = -1;
|
||||
static int hf_scsi_ssc_medium_type = -1;
|
||||
static int hf_scsi_ssc_media = -1;
|
||||
static int hf_scsi_ssc_capacity_prop_value = -1;
|
||||
static int proto_scsi_ssc = -1;
|
||||
int hf_scsi_ssc_opcode = -1;
|
||||
static int hf_scsi_ssc_rdwr6_xferlen = -1;
|
||||
static int hf_scsi_ssc_ver16_verlen = -1;
|
||||
static int hf_scsi_ssc_locate10_loid = -1;
|
||||
static int hf_scsi_ssc_locate16_loid = -1;
|
||||
static int hf_scsi_ssc_space6_code = -1;
|
||||
static int hf_scsi_ssc_space6_count = -1;
|
||||
static int hf_scsi_ssc_space16_count = -1;
|
||||
static int hf_scsi_ssc_erase_flags = -1;
|
||||
static int hf_scsi_ssc_fcs = -1;
|
||||
static int hf_scsi_ssc_lcs = -1;
|
||||
static int hf_scsi_ssc_erase_immed = -1;
|
||||
static int hf_scsi_ssc_long = -1;
|
||||
static int hf_scsi_ssc_partition = -1;
|
||||
static int hf_scsi_ssc_lbi = -1;
|
||||
static int hf_scsi_ssc_verify = -1;
|
||||
static int hf_scsi_ssc_immed = -1;
|
||||
static int hf_scsi_ssc_formatmedium_flags = -1;
|
||||
static int hf_scsi_ssc_format = -1;
|
||||
static int hf_scsi_ssc_rdwr10_xferlen = -1;
|
||||
static int hf_scsi_ssc_loadunload_immed_flags = -1;
|
||||
static int hf_scsi_ssc_loadunload_flags = -1;
|
||||
static int hf_scsi_ssc_hold = -1;
|
||||
static int hf_scsi_ssc_eot = -1;
|
||||
static int hf_scsi_ssc_reten = -1;
|
||||
static int hf_scsi_ssc_load = -1;
|
||||
static int hf_scsi_ssc_locate_flags = -1;
|
||||
static int hf_scsi_ssc_bt = -1;
|
||||
static int hf_scsi_ssc_cp = -1;
|
||||
static int hf_scsi_ssc_dest_type = -1;
|
||||
static int hf_scsi_ssc_bam_flags = -1;
|
||||
static int hf_scsi_ssc_bam = -1;
|
||||
static int hf_scsi_ssc_read6_flags = -1;
|
||||
static int hf_scsi_ssc_sili = -1;
|
||||
static int hf_scsi_ssc_fixed = -1;
|
||||
static int hf_scsi_ssc_bytord = -1;
|
||||
static int hf_scsi_ssc_bytcmp = -1;
|
||||
static int hf_scsi_ssc_verify16_immed = -1;
|
||||
static int hf_scsi_ssc_medium_type = -1;
|
||||
static int hf_scsi_ssc_media = -1;
|
||||
static int hf_scsi_ssc_capacity_prop_value = -1;
|
||||
|
||||
static gint ett_scsi_erase = -1;
|
||||
static gint ett_scsi_formatmedium = -1;
|
||||
static gint ett_scsi_loadunload_immed = -1;
|
||||
static gint ett_scsi_loadunload = -1;
|
||||
static gint ett_scsi_locate = -1;
|
||||
static gint ett_scsi_bam = -1;
|
||||
static gint ett_scsi_read6 = -1;
|
||||
static gint ett_scsi_erase = -1;
|
||||
static gint ett_scsi_formatmedium = -1;
|
||||
static gint ett_scsi_loadunload_immed = -1;
|
||||
static gint ett_scsi_loadunload = -1;
|
||||
static gint ett_scsi_locate = -1;
|
||||
static gint ett_scsi_bam = -1;
|
||||
static gint ett_scsi_read6 = -1;
|
||||
|
||||
|
||||
static void
|
||||
|
@ -103,9 +103,9 @@ dissect_ssc_read6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *read6_fields[] = {
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -128,9 +128,9 @@ dissect_ssc_recoverbuffereddata (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *recover_fields[] = {
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -153,9 +153,9 @@ dissect_ssc_reportdensitysupport (tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *rd_fields[] = {
|
||||
&hf_scsi_ssc_medium_type,
|
||||
&hf_scsi_ssc_media,
|
||||
NULL
|
||||
&hf_scsi_ssc_medium_type,
|
||||
&hf_scsi_ssc_media,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -183,10 +183,10 @@ dissect_ssc_readreverse6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *rr6_fields[] = {
|
||||
&hf_scsi_ssc_bytord,
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_bytord,
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -209,9 +209,9 @@ dissect_ssc_read16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *read6_fields[] = {
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -236,10 +236,10 @@ dissect_ssc_write16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *write16_fields[] = {
|
||||
&hf_scsi_ssc_fcs,
|
||||
&hf_scsi_ssc_lcs,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_fcs,
|
||||
&hf_scsi_ssc_lcs,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -264,10 +264,10 @@ dissect_ssc_writefilemarks16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *wf16_fields[] = {
|
||||
&hf_scsi_ssc_fcs,
|
||||
&hf_scsi_ssc_lcs,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_fcs,
|
||||
&hf_scsi_ssc_lcs,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -292,10 +292,10 @@ dissect_ssc_verify16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *verify16_fields[] = {
|
||||
&hf_scsi_ssc_verify16_immed,
|
||||
&hf_scsi_ssc_bytcmp,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_verify16_immed,
|
||||
&hf_scsi_ssc_bytcmp,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -320,10 +320,10 @@ dissect_ssc_verify6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *verify6_fields[] = {
|
||||
&hf_scsi_ssc_verify16_immed,
|
||||
&hf_scsi_ssc_bytcmp,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_verify16_immed,
|
||||
&hf_scsi_ssc_bytcmp,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -346,10 +346,10 @@ dissect_ssc_readreverse16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *rr16_fields[] = {
|
||||
&hf_scsi_ssc_bytord,
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
&hf_scsi_ssc_bytord,
|
||||
&hf_scsi_ssc_sili,
|
||||
&hf_scsi_ssc_fixed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -374,8 +374,8 @@ dissect_ssc_write6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *write6_fields[] = {
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq && iscdb) {
|
||||
|
@ -398,8 +398,8 @@ dissect_ssc_writefilemarks6 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *wf6_fields[] = {
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
|
@ -422,15 +422,15 @@ dissect_ssc_loadunload (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *loadunload_immed_fields[] = {
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
static const int *loadunload_fields[] = {
|
||||
&hf_scsi_ssc_hold,
|
||||
&hf_scsi_ssc_eot,
|
||||
&hf_scsi_ssc_reten,
|
||||
&hf_scsi_ssc_load,
|
||||
NULL
|
||||
&hf_scsi_ssc_hold,
|
||||
&hf_scsi_ssc_eot,
|
||||
&hf_scsi_ssc_reten,
|
||||
&hf_scsi_ssc_load,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq && iscdb) {
|
||||
|
@ -468,7 +468,7 @@ dissect_ssc_readblocklimits (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
|
|||
ett_scsi_control, cdb_control_fields, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else if (!iscdb) {
|
||||
granularity = tvb_get_guint8 (tvb, offset);
|
||||
granularity = tvb_get_guint8 (tvb, offset);
|
||||
proto_tree_add_text (tree, tvb, offset, 1, "Granularity: %u (%u %s)",
|
||||
granularity, 1 << granularity,
|
||||
plurality(1 << granularity, "byte", "bytes"));
|
||||
|
@ -485,8 +485,8 @@ dissect_ssc_rewind (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *rewind_fields[] = {
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!tree)
|
||||
|
@ -508,8 +508,8 @@ dissect_ssc_setcapacity (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *sc_fields[] = {
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!tree)
|
||||
|
@ -531,10 +531,10 @@ dissect_ssc_locate10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *locate_fields[] = {
|
||||
&hf_scsi_ssc_bt,
|
||||
&hf_scsi_ssc_cp,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_bt,
|
||||
&hf_scsi_ssc_cp,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!tree)
|
||||
|
@ -557,14 +557,14 @@ dissect_ssc_locate16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *locate_fields[] = {
|
||||
&hf_scsi_ssc_dest_type,
|
||||
&hf_scsi_ssc_cp,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_dest_type,
|
||||
&hf_scsi_ssc_cp,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
static const int *bam_fields[] = {
|
||||
&hf_scsi_ssc_bam,
|
||||
NULL
|
||||
&hf_scsi_ssc_bam,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!tree)
|
||||
|
@ -612,11 +612,11 @@ dissect_ssc_erase16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *erase16_fields[] = {
|
||||
&hf_scsi_ssc_fcs,
|
||||
&hf_scsi_ssc_lcs,
|
||||
&hf_scsi_ssc_erase_immed,
|
||||
&hf_scsi_ssc_long,
|
||||
NULL
|
||||
&hf_scsi_ssc_fcs,
|
||||
&hf_scsi_ssc_lcs,
|
||||
&hf_scsi_ssc_erase_immed,
|
||||
&hf_scsi_ssc_long,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!tree)
|
||||
|
@ -668,10 +668,10 @@ dissect_ssc_space16 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
|
|||
}
|
||||
|
||||
static const value_string space6_code_vals[] = {
|
||||
{0, "Logical Blocks"},
|
||||
{1, "Filemarks"},
|
||||
{2, "Sequential Filemarks"},
|
||||
{3, "End-Of-Data"},
|
||||
{0, "Logical Blocks"},
|
||||
{1, "Filemarks"},
|
||||
{2, "Sequential Filemarks"},
|
||||
{3, "End-Of-Data"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
|
@ -694,9 +694,9 @@ dissect_ssc_formatmedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
|
|||
guint payload_len _U_, scsi_task_data_t *cdata _U_)
|
||||
{
|
||||
static const int *formatmedium_fields[] = {
|
||||
&hf_scsi_ssc_verify,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
&hf_scsi_ssc_verify,
|
||||
&hf_scsi_ssc_immed,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!tree)
|
||||
|
@ -891,60 +891,58 @@ dissect_ssc_readposition (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* SSC Commands */
|
||||
const value_string scsi_ssc_vals[] = {
|
||||
{SCSI_SSC_ERASE_6 , "Erase(6)"},
|
||||
{SCSI_SSC_ERASE_16 , "Erase(16)"},
|
||||
{SCSI_SPC_EXTCOPY , "Extended Copy"},
|
||||
{SCSI_SSC_FORMAT_MEDIUM , "Format Medium"},
|
||||
{SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
{SCSI_SSC_LOAD_UNLOAD , "Load Unload"},
|
||||
{SCSI_SSC_LOCATE_10 , "Locate(10)"},
|
||||
{SCSI_SSC_LOCATE_16 , "Locate(16)"},
|
||||
{SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
{SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
{SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
{SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
{SCSI_SPC_RESERVE6 , "Reserve(6)"},
|
||||
{SCSI_SPC_RELEASE6 , "Release(6)"},
|
||||
{SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
{SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
{SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
{SCSI_SMC_MOVE_MEDIUM , "Move Medium"},
|
||||
{SCSI_SMC_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
|
||||
{SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
{SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
{SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
{SCSI_SSC_READ6 , "Read(6)"},
|
||||
{SCSI_SSC_READ_16 , "Read(16)"},
|
||||
{SCSI_SSC_READ_BLOCK_LIMITS , "Read Block Limits"},
|
||||
{SCSI_SMC_READ_ELEMENT_STATUS , "Read Element Status"},
|
||||
{SCSI_SMC_READ_ELEMENT_STATUS_ATTACHED , "Read Element Status Attached"},
|
||||
{SCSI_SSC_READ_POSITION , "Read Position"},
|
||||
{SCSI_SSC_READ_REVERSE_6 , "Read Reverse(6)"},
|
||||
{SCSI_SSC_READ_REVERSE_16 , "Read Reverse(16)"},
|
||||
{SCSI_SSC_RECOVER_BUFFERED_DATA , "Recover Buffered Data"},
|
||||
{SCSI_SSC_REPORT_DENSITY_SUPPORT , "Report Density Support"},
|
||||
{SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
{SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
{SCSI_SSC_REWIND , "Rewind"},
|
||||
{SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
{SCSI_SSC_SET_CAPACITY , "Set Capacity"},
|
||||
{SCSI_SSC_SPACE_6 , "Space(6)"},
|
||||
{SCSI_SSC_SPACE_16 , "Space(16)"},
|
||||
{SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
{SCSI_SSC_VERIFY_6 , "Verify(6)"},
|
||||
{SCSI_SSC_VERIFY_16 , "Verify(16)"},
|
||||
{SCSI_SSC_WRITE6 , "Write(6)"},
|
||||
{SCSI_SSC_WRITE_16 , "Write(16)"},
|
||||
{SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
{SCSI_SSC_WRITE_FILEMARKS_16 , "Write Filemarks(16)"},
|
||||
{SCSI_SSC_WRITE_FILEMARKS_6 , "Write Filemarks(6)"},
|
||||
static const value_string scsi_ssc_vals[] = {
|
||||
/* 0x00 */ {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
/* 0x01 */ {SCSI_SSC_REWIND , "Rewind"},
|
||||
/* 0x03 */ {SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
/* 0x04 */ {SCSI_SSC_FORMAT_MEDIUM , "Format Medium"},
|
||||
/* 0x05 */ {SCSI_SSC_READ_BLOCK_LIMITS , "Read Block Limits"},
|
||||
/* 0x08 */ {SCSI_SSC_READ6 , "Read(6)"},
|
||||
/* 0x0A */ {SCSI_SSC_WRITE6 , "Write(6)"},
|
||||
/* 0x0B */ {SCSI_SSC_SET_CAPACITY , "Set Capacity"},
|
||||
/* 0x0F */ {SCSI_SSC_READ_REVERSE_6 , "Read Reverse(6)"},
|
||||
/* 0x10 */ {SCSI_SSC_WRITE_FILEMARKS_6 , "Write Filemarks(6)"},
|
||||
/* 0x11 */ {SCSI_SSC_SPACE_6 , "Space(6)"},
|
||||
/* 0x12 */ {SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
/* 0x13 */ {SCSI_SSC_VERIFY_6 , "Verify(6)"},
|
||||
/* 0x14 */ {SCSI_SSC_RECOVER_BUFFERED_DATA , "Recover Buffered Data"},
|
||||
/* 0x15 */ {SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
/* 0x16 */ {SCSI_SPC_RESERVE6 , "Reserve(6)"},
|
||||
/* 0x17 */ {SCSI_SPC_RELEASE6 , "Release(6)"},
|
||||
/* 0x19 */ {SCSI_SSC_ERASE_6 , "Erase(6)"},
|
||||
/* 0x1A */ {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
/* 0x1B */ {SCSI_SSC_LOAD_UNLOAD , "Load Unload"},
|
||||
/* 0x1D */ {SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
/* 0x1E */ {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
/* 0x2B */ {SCSI_SSC_LOCATE_10 , "Locate(10)"},
|
||||
/* 0x34 */ {SCSI_SSC_READ_POSITION , "Read Position"},
|
||||
/* 0x3B */ {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
/* 0x44 */ {SCSI_SSC_REPORT_DENSITY_SUPPORT , "Report Density Support"},
|
||||
/* 0x4C */ {SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
/* 0x4D */ {SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
/* 0x55 */ {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
/* 0x5A */ {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
/* 0x5E */ {SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
/* 0x5F */ {SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
/* 0x80 */ {SCSI_SSC_WRITE_FILEMARKS_16 , "Write Filemarks(16)"},
|
||||
/* 0x81 */ {SCSI_SSC_READ_REVERSE_16 , "Read Reverse(16)"},
|
||||
/* 0x83 */ {SCSI_SPC_EXTCOPY , "Extended Copy"},
|
||||
/* 0x88 */ {SCSI_SSC_READ_16 , "Read(16)"},
|
||||
/* 0x8A */ {SCSI_SSC_WRITE_16 , "Write(16)"},
|
||||
/* 0x8F */ {SCSI_SSC_VERIFY_16 , "Verify(16)"},
|
||||
/* 0x91 */ {SCSI_SSC_SPACE_16 , "Space(16)"},
|
||||
/* 0x92 */ {SCSI_SSC_LOCATE_16 , "Locate(16)"},
|
||||
/* 0x93 */ {SCSI_SSC_ERASE_16 , "Erase(16)"},
|
||||
/* 0xA0 */ {SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
/* 0xA3 */ {SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
/* 0xA5 */ {SCSI_SMC_MOVE_MEDIUM , "Move Medium"},
|
||||
/* 0xA7 */ {SCSI_SMC_MOVE_MEDIUM_ATTACHED , "Move Medium Attached"},
|
||||
/* 0xB4 */ {SCSI_SMC_READ_ELEMENT_STATUS_ATTACHED , "Read Element Status Attached"},
|
||||
/* 0xB8 */ {SCSI_SMC_READ_ELEMENT_STATUS , "Read Element Status"},
|
||||
{0, NULL}
|
||||
};
|
||||
value_string_ext scsi_ssc_vals_ext = VALUE_STRING_EXT_INIT(scsi_ssc_vals);
|
||||
|
||||
|
||||
scsi_cdb_table_t scsi_ssc_table[256] = {
|
||||
|
@ -1211,10 +1209,10 @@ scsi_cdb_table_t scsi_ssc_table[256] = {
|
|||
void
|
||||
proto_register_scsi_ssc(void)
|
||||
{
|
||||
static hf_register_info hf[] = {
|
||||
static hf_register_info hf[] = {
|
||||
{ &hf_scsi_ssc_opcode,
|
||||
{"SSC Opcode", "scsi_ssc.opcode", FT_UINT8, BASE_HEX,
|
||||
VALS (scsi_ssc_vals), 0x0, NULL, HFILL}},
|
||||
{"SSC Opcode", "scsi_ssc.opcode", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_ssc_vals_ext, 0x0, NULL, HFILL}},
|
||||
{ &hf_scsi_ssc_rdwr6_xferlen,
|
||||
{"Transfer Length", "scsi_ssc.rdwr6.xferlen", FT_UINT24, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL}},
|
||||
|
@ -1232,7 +1230,7 @@ proto_register_scsi_ssc(void)
|
|||
NULL, HFILL}},
|
||||
{ &hf_scsi_ssc_space6_code,
|
||||
{"Code", "scsi_ssc.space6.code", FT_UINT8, BASE_HEX,
|
||||
VALS(space6_code_vals), 0x0f,
|
||||
VALS(space6_code_vals), 0x0f,
|
||||
NULL, HFILL}},
|
||||
{ &hf_scsi_ssc_space16_count,
|
||||
{"Count", "scsi_ssc.space16.count", FT_UINT64, BASE_DEC, NULL, 0x0,
|
||||
|
@ -1336,28 +1334,28 @@ proto_register_scsi_ssc(void)
|
|||
{ &hf_scsi_ssc_capacity_prop_value,
|
||||
{"Capacity Proportion Value", "scsi_ssc.cpv", FT_UINT16, BASE_DEC,
|
||||
NULL, 0, NULL, HFILL}},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/* Setup protocol subtree array */
|
||||
static gint *ett[] = {
|
||||
&ett_scsi_erase,
|
||||
&ett_scsi_formatmedium,
|
||||
&ett_scsi_loadunload_immed,
|
||||
&ett_scsi_loadunload,
|
||||
&ett_scsi_locate,
|
||||
&ett_scsi_bam,
|
||||
&ett_scsi_read6
|
||||
};
|
||||
/* Setup protocol subtree array */
|
||||
static gint *ett[] = {
|
||||
&ett_scsi_erase,
|
||||
&ett_scsi_formatmedium,
|
||||
&ett_scsi_loadunload_immed,
|
||||
&ett_scsi_loadunload,
|
||||
&ett_scsi_locate,
|
||||
&ett_scsi_bam,
|
||||
&ett_scsi_read6
|
||||
};
|
||||
|
||||
|
||||
/* Register the protocol name and description */
|
||||
proto_scsi_ssc = proto_register_protocol("SCSI_SSC", "SCSI_SSC", "scsi_ssc");
|
||||
/* Register the protocol name and description */
|
||||
proto_scsi_ssc = proto_register_protocol("SCSI_SSC", "SCSI_SSC", "scsi_ssc");
|
||||
|
||||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array(proto_scsi_ssc, hf, array_length(hf));
|
||||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array(proto_scsi_ssc, hf, array_length(hf));
|
||||
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
}
|
||||
|
||||
|
@ -1366,3 +1364,16 @@ proto_reg_handoff_scsi_ssc(void)
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
||||
* :indentSize=4:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
|
|
@ -59,6 +59,6 @@
|
|||
|
||||
extern int hf_scsi_ssc_opcode;
|
||||
extern scsi_cdb_table_t scsi_ssc_table[256];
|
||||
WS_DLL_PUBLIC const value_string scsi_ssc_vals[];
|
||||
WS_DLL_PUBLIC value_string_ext scsi_ssc_vals_ext;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -758,39 +758,40 @@ typedef guint32 scsi_device_type;
|
|||
|
||||
/* SPC and SPC-2 Commands */
|
||||
static const value_string scsi_spc_vals[] = {
|
||||
{SCSI_SPC_ACCESS_CONTROL_IN , "Access Control In"},
|
||||
{SCSI_SPC_ACCESS_CONTROL_OUT , "Access Control Out"},
|
||||
{SCSI_SPC_CHANGE_DEFINITION , "Change Definition"},
|
||||
{SCSI_SPC_COMPARE , "Compare"},
|
||||
{SCSI_SPC_COPY , "Copy"},
|
||||
{SCSI_SPC_COPY_AND_VERIFY , "Copy And Verify"},
|
||||
{SCSI_SPC_EXTCOPY , "Extended Copy"},
|
||||
{SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
{SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
{SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
{SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
{SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
{SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
{SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
{SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
{SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
{SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
{SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
{SCSI_SPC_RCVCOPYRESULTS , "Receive Copy Results"},
|
||||
{SCSI_SPC_RCVDIAGRESULTS , "Receive Diagnostics Results"},
|
||||
{SCSI_SPC_READBUFFER , "Read Buffer"},
|
||||
{SCSI_SPC_RELEASE6 , "Release(6)"},
|
||||
{SCSI_SPC_RELEASE10 , "Release(10)"},
|
||||
{SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
{SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
{SCSI_SPC_RESERVE6 , "Reserve(6)"},
|
||||
{SCSI_SPC_RESERVE10 , "Reserve(10)"},
|
||||
{SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
{SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
{SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
{SCSI_SPC_VARLENCDB , "Variable Length CDB"},
|
||||
/* 0x00 */ {SCSI_SPC_TESTUNITRDY , "Test Unit Ready"},
|
||||
/* 0x03 */ {SCSI_SPC_REQSENSE , "Request Sense"},
|
||||
/* 0x12 */ {SCSI_SPC_INQUIRY , "Inquiry"},
|
||||
/* 0x15 */ {SCSI_SPC_MODESELECT6 , "Mode Select(6)"},
|
||||
/* 0x16 */ {SCSI_SPC_RESERVE6 , "Reserve(6)"},
|
||||
/* 0x17 */ {SCSI_SPC_RELEASE6 , "Release(6)"},
|
||||
/* 0x18 */ {SCSI_SPC_COPY , "Copy"},
|
||||
/* 0x1A */ {SCSI_SPC_MODESENSE6 , "Mode Sense(6)"},
|
||||
/* 0x1C */ {SCSI_SPC_RCVDIAGRESULTS , "Receive Diagnostics Results"},
|
||||
/* 0x1D */ {SCSI_SPC_SENDDIAG , "Send Diagnostic"},
|
||||
/* 0x1E */ {SCSI_SPC_PREVMEDREMOVAL , "Prevent/Allow Medium Removal"},
|
||||
/* 0x39 */ {SCSI_SPC_COMPARE , "Compare"},
|
||||
/* 0x3A */ {SCSI_SPC_COPY_AND_VERIFY , "Copy And Verify"},
|
||||
/* 0x3B */ {SCSI_SPC_WRITEBUFFER , "Write Buffer"},
|
||||
/* 0x3C */ {SCSI_SPC_READBUFFER , "Read Buffer"},
|
||||
/* 0x40 */ {SCSI_SPC_CHANGE_DEFINITION , "Change Definition"},
|
||||
/* 0x4C */ {SCSI_SPC_LOGSELECT , "Log Select"},
|
||||
/* 0x4D */ {SCSI_SPC_LOGSENSE , "Log Sense"},
|
||||
/* 0x55 */ {SCSI_SPC_MODESELECT10 , "Mode Select(10)"},
|
||||
/* 0x56 */ {SCSI_SPC_RESERVE10 , "Reserve(10)"},
|
||||
/* 0x57 */ {SCSI_SPC_RELEASE10 , "Release(10)"},
|
||||
/* 0x5A */ {SCSI_SPC_MODESENSE10 , "Mode Sense(10)"},
|
||||
/* 0x5E */ {SCSI_SPC_PERSRESVIN , "Persistent Reserve In"},
|
||||
/* 0x5F */ {SCSI_SPC_PERSRESVOUT , "Persistent Reserve Out"},
|
||||
/* 0x7F */ {SCSI_SPC_VARLENCDB , "Variable Length CDB"},
|
||||
/* 0x83 */ {SCSI_SPC_EXTCOPY , "Extended Copy"},
|
||||
/* 0x84 */ {SCSI_SPC_RCVCOPYRESULTS , "Receive Copy Results"},
|
||||
/* 0x86 */ {SCSI_SPC_ACCESS_CONTROL_IN , "Access Control In"},
|
||||
/* 0x87 */ {SCSI_SPC_ACCESS_CONTROL_OUT , "Access Control Out"},
|
||||
/* 0xA0 */ {SCSI_SPC_REPORTLUNS , "Report LUNs"},
|
||||
/* 0xA3 */ {SCSI_SPC_MGMT_PROTOCOL_IN , "Mgmt Protocol In"},
|
||||
{0, NULL},
|
||||
};
|
||||
static value_string_ext scsi_spc_vals_ext = VALUE_STRING_EXT_INIT(scsi_spc_vals);
|
||||
|
||||
static const value_string scsi_lun_address_mode_vals[] = {
|
||||
{ 0, "Single Level LUN Structure" },
|
||||
|
@ -2592,7 +2593,7 @@ static gint scsi_def_devtype = SCSI_DEV_SBC;
|
|||
|
||||
typedef struct _cmdset_t {
|
||||
int hf_opcode;
|
||||
const value_string *cdb_vals;
|
||||
value_string_ext *cdb_vals_ext;
|
||||
scsi_cdb_table_t *cdb_table;
|
||||
} cmdset_t;
|
||||
|
||||
|
@ -4774,7 +4775,7 @@ dissect_spc_mgmt_protocol_in(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
|
||||
it = proto_tree_add_text(tree, tvb_v, offset_v,
|
||||
20, "Command Descriptor: %s",
|
||||
val_to_str(tvb_get_guint8(tvb_v, offset_v+0), csdata->cdb_vals, "Unknown"));
|
||||
val_to_str_ext_const(tvb_get_guint8(tvb_v, offset_v+0), csdata->cdb_vals_ext, "Unknown"));
|
||||
tr = proto_item_add_subtree(it,
|
||||
ett_command_descriptor);
|
||||
|
||||
|
@ -5118,9 +5119,9 @@ dissect_scsi_rsp(tvbuff_t *tvb, packet_info *pinfo,
|
|||
if (tree) {
|
||||
ti = proto_tree_add_protocol_format(tree, proto_scsi, tvb, 0,
|
||||
0, "SCSI Response (%s)",
|
||||
val_to_str(itlq->scsi_opcode,
|
||||
csdata->cdb_vals,
|
||||
"CDB:0x%02x"));
|
||||
val_to_str_ext(itlq->scsi_opcode,
|
||||
csdata->cdb_vals_ext,
|
||||
"CDB:0x%02x"));
|
||||
scsi_tree = proto_item_add_subtree(ti, ett_scsi);
|
||||
}
|
||||
|
||||
|
@ -5150,7 +5151,7 @@ dissect_scsi_rsp(tvbuff_t *tvb, packet_info *pinfo,
|
|||
ti = proto_tree_add_uint(scsi_tree, hf_scsi_status, tvb, 0, 0, scsi_status);
|
||||
PROTO_ITEM_SET_GENERATED(ti);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI: Response LUN: 0x%02x (%s) (%s)", itlq->lun,
|
||||
val_to_str(itlq->scsi_opcode, csdata->cdb_vals, "CDB:0x%02x"),
|
||||
val_to_str_ext(itlq->scsi_opcode, csdata->cdb_vals_ext, "CDB:0x%02x"),
|
||||
val_to_str(scsi_status, scsi_status_val, "Unknown (0x%08x)"));
|
||||
|
||||
col_set_fence(pinfo->cinfo, COL_INFO);
|
||||
|
@ -5498,8 +5499,8 @@ dissect_scsi_cdb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
#endif
|
||||
|
||||
if ((valstr = try_val_to_str(opcode, scsi_spc_vals)) == NULL) {
|
||||
valstr = try_val_to_str(opcode, csdata->cdb_vals);
|
||||
if ((valstr = try_val_to_str_ext(opcode, &scsi_spc_vals_ext)) == NULL) {
|
||||
valstr = try_val_to_str_ext(opcode, csdata->cdb_vals_ext);
|
||||
}
|
||||
|
||||
if (valstr != NULL) {
|
||||
|
@ -5519,9 +5520,9 @@ dissect_scsi_cdb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (tree) {
|
||||
ti = proto_tree_add_protocol_format(tree, proto_scsi, tvb, 0,
|
||||
-1, "SCSI CDB %s",
|
||||
val_to_str(opcode,
|
||||
csdata->cdb_vals,
|
||||
"0x%02x")
|
||||
val_to_str_ext(opcode,
|
||||
csdata->cdb_vals_ext,
|
||||
"0x%02x")
|
||||
);
|
||||
scsi_tree = proto_item_add_subtree(ti, ett_scsi);
|
||||
}
|
||||
|
@ -5608,9 +5609,9 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
ti = proto_tree_add_protocol_format(tree, proto_scsi, tvb, offset,
|
||||
payload_len,
|
||||
"SCSI Payload (%s %s)",
|
||||
val_to_str(opcode,
|
||||
csdata->cdb_vals,
|
||||
"CDB:0x%02x"),
|
||||
val_to_str_ext(opcode,
|
||||
csdata->cdb_vals_ext,
|
||||
"CDB:0x%02x"),
|
||||
isreq ? "Request Data" : "Response Data");
|
||||
scsi_tree = proto_item_add_subtree(ti, ett_scsi);
|
||||
}
|
||||
|
@ -5619,7 +5620,7 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
"SCSI: Data %s LUN: 0x%02x (%s %s) ",
|
||||
isreq ? "Out" : "In",
|
||||
itlq->lun,
|
||||
val_to_str(opcode, csdata->cdb_vals, "0x%02x"),
|
||||
val_to_str_ext(opcode, csdata->cdb_vals_ext, "0x%02x"),
|
||||
isreq ? "Request Data" : "Response Data");
|
||||
|
||||
col_set_fence(pinfo->cinfo, COL_INFO);
|
||||
|
@ -5792,34 +5793,34 @@ get_cmdset_data(itlq_nexus_t *itlq, itl_nexus_t *itl)
|
|||
|
||||
switch(cmdset&SCSI_CMDSET_MASK) {
|
||||
case SCSI_DEV_SBC:
|
||||
csdata->hf_opcode = hf_scsi_sbc_opcode;
|
||||
csdata->cdb_vals = scsi_sbc_vals;
|
||||
csdata->cdb_table = scsi_sbc_table;
|
||||
csdata->hf_opcode = hf_scsi_sbc_opcode;
|
||||
csdata->cdb_vals_ext = &scsi_sbc_vals_ext;
|
||||
csdata->cdb_table = scsi_sbc_table;
|
||||
break;
|
||||
case SCSI_DEV_CDROM:
|
||||
csdata->hf_opcode = hf_scsi_mmc_opcode;
|
||||
csdata->cdb_vals = scsi_mmc_vals;
|
||||
csdata->cdb_table = scsi_mmc_table;
|
||||
csdata->hf_opcode = hf_scsi_mmc_opcode;
|
||||
csdata->cdb_vals_ext = &scsi_mmc_vals_ext;
|
||||
csdata->cdb_table = scsi_mmc_table;
|
||||
break;
|
||||
case SCSI_DEV_SSC:
|
||||
csdata->hf_opcode = hf_scsi_ssc_opcode;
|
||||
csdata->cdb_vals = scsi_ssc_vals;
|
||||
csdata->cdb_table = scsi_ssc_table;
|
||||
csdata->hf_opcode = hf_scsi_ssc_opcode;
|
||||
csdata->cdb_vals_ext = &scsi_ssc_vals_ext;
|
||||
csdata->cdb_table = scsi_ssc_table;
|
||||
break;
|
||||
case SCSI_DEV_SMC:
|
||||
csdata->hf_opcode = hf_scsi_smc_opcode;
|
||||
csdata->cdb_vals = scsi_smc_vals;
|
||||
csdata->cdb_table = scsi_smc_table;
|
||||
csdata->hf_opcode = hf_scsi_smc_opcode;
|
||||
csdata->cdb_vals_ext = &scsi_smc_vals_ext;
|
||||
csdata->cdb_table = scsi_smc_table;
|
||||
break;
|
||||
case SCSI_DEV_OSD:
|
||||
csdata->hf_opcode = hf_scsi_osd_opcode;
|
||||
csdata->cdb_vals = scsi_osd_vals;
|
||||
csdata->cdb_table = scsi_osd_table;
|
||||
csdata->hf_opcode = hf_scsi_osd_opcode;
|
||||
csdata->cdb_vals_ext = &scsi_osd_vals_ext;
|
||||
csdata->cdb_table = scsi_osd_table;
|
||||
break;
|
||||
default:
|
||||
csdata->hf_opcode = hf_scsi_spcopcode;
|
||||
csdata->cdb_vals = scsi_spc_vals;
|
||||
csdata->cdb_table = spc;
|
||||
csdata->hf_opcode = hf_scsi_spcopcode;
|
||||
csdata->cdb_vals_ext = &scsi_spc_vals_ext;
|
||||
csdata->cdb_table = spc;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -5835,8 +5836,8 @@ proto_register_scsi(void)
|
|||
{ "Status", "scsi.status", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_status_val), 0, "SCSI command status value", HFILL }},
|
||||
{ &hf_scsi_spcopcode,
|
||||
{"SPC-2 Opcode", "scsi.spc.opcode", FT_UINT8, BASE_HEX,
|
||||
VALS(scsi_spc_vals), 0x0, NULL, HFILL}},
|
||||
{"SPC-2 Opcode", "scsi.spc.opcode", FT_UINT8, BASE_HEX | BASE_EXT_STRING,
|
||||
&scsi_spc_vals_ext, 0x0, NULL, HFILL}},
|
||||
{ &hf_scsi_control,
|
||||
{"Control", "scsi.cdb.control", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
|
||||
HFILL}},
|
||||
|
@ -6184,7 +6185,7 @@ proto_register_scsi(void)
|
|||
{ &hf_scsi_sns_osd_object_id,
|
||||
{"Object ID", "scsi.sns.desc.osd_object.object_id", FT_UINT64, BASE_HEX, NULL, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_sns_osd_attr_page,
|
||||
{"Attribute page", "scsi.sns.desc.osd_attr.page", FT_UINT32, BASE_HEX, VALS(attributes_page_vals), 0, NULL, HFILL}},
|
||||
{"Attribute page", "scsi.sns.desc.osd_attr.page", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &attributes_page_vals_ext, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_sns_osd_attr_number,
|
||||
{"Attribute number", "scsi.sns.desc.osd_attr.number", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL}},
|
||||
{ &hf_scsi_persresv_key,
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#ifndef __PACKET_SCSI_H_
|
||||
#define __PACKET_SCSI_H_
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#include <epan/exceptions.h>
|
||||
|
||||
/* Structure containing itl nexus data :
|
||||
|
@ -216,8 +214,6 @@ void dissect_scsi_snsinfo (tvbuff_t *, packet_info *, proto_tree *, guint, guint
|
|||
|
||||
void dissect_scsi_lun(proto_tree *, tvbuff_t *, guint);
|
||||
|
||||
WS_DLL_PUBLIC const value_string scsi_mmc_vals[];
|
||||
|
||||
extern const int *cdb_control_fields[6];
|
||||
extern gint ett_scsi_control;
|
||||
extern int hf_scsi_control;
|
||||
|
|
|
@ -37,26 +37,27 @@
|
|||
#include <epan/dissectors/packet-scsi-ssc.h>
|
||||
#include <epan/dissectors/packet-scsi-smc.h>
|
||||
#include <epan/dissectors/packet-scsi-osd.h>
|
||||
#include <epan/dissectors/packet-scsi-mmc.h>
|
||||
|
||||
void register_tap_listener_scsistat(void);
|
||||
|
||||
static guint8 scsi_program=0;
|
||||
static guint8 scsi_program = 0;
|
||||
|
||||
/* used to keep track of statistics for a specific procedure */
|
||||
typedef struct _scsi_procedure_t {
|
||||
const char *proc;
|
||||
int num;
|
||||
nstime_t min;
|
||||
nstime_t max;
|
||||
nstime_t tot;
|
||||
int num;
|
||||
nstime_t min;
|
||||
nstime_t max;
|
||||
nstime_t tot;
|
||||
} scsi_procedure_t;
|
||||
|
||||
/* used to keep track of the statistics for an entire program interface */
|
||||
typedef struct _scsistat_t {
|
||||
guint8 cmdset;
|
||||
char *filter;
|
||||
const value_string *cdbnames;
|
||||
const char *prog;
|
||||
guint8 cmdset;
|
||||
char *filter;
|
||||
value_string_ext *cdbnames_ext;
|
||||
const char *prog;
|
||||
#define MAX_PROCEDURES 256
|
||||
scsi_procedure_t *procedures;
|
||||
} scsistat_t;
|
||||
|
@ -66,34 +67,34 @@ typedef struct _scsistat_t {
|
|||
static void
|
||||
scsistat_reset(void *prs)
|
||||
{
|
||||
scsistat_t *rs=(scsistat_t *)prs;
|
||||
guint32 i;
|
||||
scsistat_t *rs = (scsistat_t *)prs;
|
||||
guint32 i;
|
||||
|
||||
for(i=0; i < MAX_PROCEDURES; i++) {
|
||||
rs->procedures[i].num=0;
|
||||
rs->procedures[i].min.secs=0;
|
||||
rs->procedures[i].min.nsecs=0;
|
||||
rs->procedures[i].max.secs=0;
|
||||
rs->procedures[i].max.nsecs=0;
|
||||
rs->procedures[i].tot.secs=0;
|
||||
rs->procedures[i].tot.nsecs=0;
|
||||
for(i = 0; i < MAX_PROCEDURES; i++) {
|
||||
rs->procedures[i].num = 0;
|
||||
rs->procedures[i].min.secs = 0;
|
||||
rs->procedures[i].min.nsecs = 0;
|
||||
rs->procedures[i].max.secs = 0;
|
||||
rs->procedures[i].max.nsecs = 0;
|
||||
rs->procedures[i].tot.secs = 0;
|
||||
rs->procedures[i].tot.nsecs = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
scsistat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
scsistat_t *rs = (scsistat_t *)prs;
|
||||
scsistat_t *rs = (scsistat_t *)prs;
|
||||
const scsi_task_data_t *ri = (const scsi_task_data_t *)pri;
|
||||
nstime_t delta;
|
||||
scsi_procedure_t *rp;
|
||||
nstime_t delta;
|
||||
scsi_procedure_t *rp;
|
||||
|
||||
/* we are only interested in response packets */
|
||||
if(ri->type!=SCSI_PDU_TYPE_RSP) {
|
||||
if(ri->type != SCSI_PDU_TYPE_RSP) {
|
||||
return 0;
|
||||
}
|
||||
/* we are only interested in a specific commandset */
|
||||
if( (!ri->itl) || ((ri->itl->cmdset&SCSI_CMDSET_MASK)!=rs->cmdset) ) {
|
||||
if( (!ri->itl) || ((ri->itl->cmdset&SCSI_CMDSET_MASK) != rs->cmdset) ) {
|
||||
return 0;
|
||||
}
|
||||
/* check that the opcode looks sane */
|
||||
|
@ -101,24 +102,24 @@ scsistat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
return 0;
|
||||
}
|
||||
|
||||
rp=&(rs->procedures[ri->itlq->scsi_opcode]);
|
||||
rp = &(rs->procedures[ri->itlq->scsi_opcode]);
|
||||
|
||||
/* calculate time delta between request and reply */
|
||||
nstime_delta(&delta, &pinfo->fd->abs_ts, &ri->itlq->fc_time);
|
||||
|
||||
if(rp->num==0) {
|
||||
rp->max.secs=delta.secs;
|
||||
rp->max.nsecs=delta.nsecs;
|
||||
if(rp->num == 0) {
|
||||
rp->max.secs = delta.secs;
|
||||
rp->max.nsecs = delta.nsecs;
|
||||
}
|
||||
if(rp->num==0) {
|
||||
rp->min.secs= delta.secs;
|
||||
rp->min.nsecs=delta.nsecs;
|
||||
if(rp->num == 0) {
|
||||
rp->min.secs = delta.secs;
|
||||
rp->min.nsecs = delta.nsecs;
|
||||
}
|
||||
if( (delta.secs < rp->min.secs)
|
||||
||( (delta.secs == rp->min.secs)
|
||||
&&(delta.nsecs < rp->min.nsecs) ) ) {
|
||||
rp->min.secs = delta.secs;
|
||||
rp->min.nsecs= delta.nsecs;
|
||||
rp->min.nsecs = delta.nsecs;
|
||||
}
|
||||
if( (delta.secs > rp->max.secs)
|
||||
||( (delta.secs == rp->max.secs)
|
||||
|
@ -139,9 +140,9 @@ scsistat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
static void
|
||||
scsistat_draw(void *prs)
|
||||
{
|
||||
scsistat_t *rs=(scsistat_t *)prs;
|
||||
guint32 i;
|
||||
guint64 td;
|
||||
scsistat_t *rs = (scsistat_t *)prs;
|
||||
guint32 i;
|
||||
guint64 td;
|
||||
|
||||
printf("\n");
|
||||
printf("===========================================================\n");
|
||||
|
@ -149,7 +150,7 @@ scsistat_draw(void *prs)
|
|||
printf("Filter: %s\n", rs->filter?rs->filter:"");
|
||||
printf("Procedure Calls Min SRT Max SRT Avg SRT\n");
|
||||
for(i=0; i < MAX_PROCEDURES; i++) {
|
||||
if(rs->procedures[i].num==0) {
|
||||
if(rs->procedures[i].num == 0) {
|
||||
continue;
|
||||
}
|
||||
/* scale it to units of 1us.*/
|
||||
|
@ -173,72 +174,72 @@ static void
|
|||
scsistat_init(const char *opt_arg, void* userdata _U_)
|
||||
{
|
||||
scsistat_t *rs;
|
||||
guint32 i;
|
||||
int program, pos;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
guint32 i;
|
||||
int program, pos;
|
||||
const char *filter = NULL;
|
||||
GString *error_string;
|
||||
|
||||
pos=0;
|
||||
if(sscanf(opt_arg, "scsi,srt,%d,%n", &program, &pos)==1) {
|
||||
pos = 0;
|
||||
if(sscanf(opt_arg, "scsi,srt,%d,%n", &program, &pos) == 1) {
|
||||
if(pos) {
|
||||
filter=opt_arg+pos;
|
||||
filter = opt_arg+pos;
|
||||
} else {
|
||||
filter=NULL;
|
||||
filter = NULL;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "tshark: invalid \"-z scsi,srt,<cmdset>[,<filter>]\" argument\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
scsi_program=program;
|
||||
rs=g_new(scsistat_t,1);
|
||||
scsi_program = program;
|
||||
rs = g_new(scsistat_t,1);
|
||||
if(filter) {
|
||||
rs->filter=g_strdup(filter);
|
||||
rs->filter = g_strdup(filter);
|
||||
} else {
|
||||
rs->filter=NULL;
|
||||
rs->filter = NULL;
|
||||
}
|
||||
rs->cmdset=program;
|
||||
rs->cmdset = program;
|
||||
|
||||
switch(program) {
|
||||
case SCSI_DEV_SBC:
|
||||
rs->prog="SBC (disk)";
|
||||
rs->cdbnames=scsi_sbc_vals;
|
||||
rs->prog = "SBC (disk)";
|
||||
rs->cdbnames_ext = &scsi_sbc_vals_ext;
|
||||
break;
|
||||
case SCSI_DEV_SSC:
|
||||
rs->prog="SSC (tape)";
|
||||
rs->cdbnames=scsi_ssc_vals;
|
||||
rs->prog = "SSC (tape)";
|
||||
rs->cdbnames_ext = &scsi_ssc_vals_ext;
|
||||
break;
|
||||
case SCSI_DEV_CDROM:
|
||||
rs->prog="MMC (cd/dvd)";
|
||||
rs->cdbnames=scsi_mmc_vals;
|
||||
rs->prog = "MMC (cd/dvd)";
|
||||
rs->cdbnames_ext = &scsi_mmc_vals_ext;
|
||||
break;
|
||||
case SCSI_DEV_SMC:
|
||||
rs->prog="SMC (tape robot)";
|
||||
rs->cdbnames=scsi_smc_vals;
|
||||
rs->prog = "SMC (tape robot)";
|
||||
rs->cdbnames_ext = &scsi_smc_vals_ext;
|
||||
break;
|
||||
case SCSI_DEV_OSD:
|
||||
rs->prog="OSD (object based)";
|
||||
rs->cdbnames=scsi_osd_vals;
|
||||
rs->prog = "OSD (object based)";
|
||||
rs->cdbnames_ext = &scsi_osd_vals_ext;
|
||||
break;
|
||||
default:
|
||||
/* Default to the SBC (disk), since this is what EMC SCSI seem to always be */
|
||||
rs->cmdset=0;
|
||||
rs->prog="SBC (disk)";
|
||||
rs->cdbnames=scsi_sbc_vals;
|
||||
rs->cmdset = 0;
|
||||
rs->prog = "SBC (disk)";
|
||||
rs->cdbnames_ext = &scsi_sbc_vals_ext;
|
||||
break;
|
||||
}
|
||||
rs->procedures=g_new(scsi_procedure_t,MAX_PROCEDURES);
|
||||
rs->procedures = g_new(scsi_procedure_t,MAX_PROCEDURES);
|
||||
for(i=0; i < MAX_PROCEDURES; i++) {
|
||||
rs->procedures[i].proc=val_to_str(i, rs->cdbnames, "Unknown-0x%02x");
|
||||
rs->procedures[i].num=0;
|
||||
rs->procedures[i].min.secs=0;
|
||||
rs->procedures[i].min.nsecs=0;
|
||||
rs->procedures[i].max.secs=0;
|
||||
rs->procedures[i].max.nsecs=0;
|
||||
rs->procedures[i].tot.secs=0;
|
||||
rs->procedures[i].tot.nsecs=0;
|
||||
rs->procedures[i].proc = val_to_str_ext(i, rs->cdbnames_ext, "Unknown-0x%02x");
|
||||
rs->procedures[i].num = 0;
|
||||
rs->procedures[i].min.secs = 0;
|
||||
rs->procedures[i].min.nsecs = 0;
|
||||
rs->procedures[i].max.secs = 0;
|
||||
rs->procedures[i].max.nsecs = 0;
|
||||
rs->procedures[i].tot.secs = 0;
|
||||
rs->procedures[i].tot.nsecs = 0;
|
||||
}
|
||||
error_string=register_tap_listener("scsi", rs, filter, 0, scsistat_reset, scsistat_packet, scsistat_draw);
|
||||
error_string = register_tap_listener("scsi", rs, filter, 0, scsistat_reset, scsistat_packet, scsistat_draw);
|
||||
if(error_string) {
|
||||
/* error, we failed to attach to the tap. clean up */
|
||||
g_free(rs->procedures);
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include <epan/dissectors/packet-scsi-ssc.h>
|
||||
#include <epan/dissectors/packet-scsi-smc.h>
|
||||
#include <epan/dissectors/packet-scsi-osd.h>
|
||||
#include <epan/dissectors/packet-scsi-mmc.h>
|
||||
|
||||
#include "ui/simple_dialog.h"
|
||||
#include "../globals.h"
|
||||
|
@ -60,20 +61,20 @@
|
|||
|
||||
/* used to keep track of the statistics for an entire scsi command set */
|
||||
typedef struct _scsistat_t {
|
||||
GtkWidget *win;
|
||||
srt_stat_table srt_table;
|
||||
guint8 cmdset;
|
||||
const value_string *cdbnames;
|
||||
const char *prog;
|
||||
GtkWidget *win;
|
||||
srt_stat_table srt_table;
|
||||
guint8 cmdset;
|
||||
value_string_ext *cdbnames_ext;
|
||||
const char *prog;
|
||||
} scsistat_t;
|
||||
|
||||
static guint8 scsi_program=0;
|
||||
static guint8 scsi_program = 0;
|
||||
|
||||
enum
|
||||
{
|
||||
SCSI_STAT_PROG_LABEL_SBC,
|
||||
SCSI_STAT_PROG_LABEL_SSC,
|
||||
SCSI_STAT_PROG_LABEL_MMC
|
||||
SCSI_STAT_PROG_LABEL_SBC,
|
||||
SCSI_STAT_PROG_LABEL_SSC,
|
||||
SCSI_STAT_PROG_LABEL_MMC
|
||||
};
|
||||
|
||||
|
||||
|
@ -145,7 +146,7 @@ scsistat_draw(void *arg)
|
|||
static void
|
||||
win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
||||
{
|
||||
scsistat_t *rs=(scsistat_t *)data;
|
||||
scsistat_t *rs = (scsistat_t *)data;
|
||||
|
||||
remove_tap_listener(rs);
|
||||
|
||||
|
@ -160,59 +161,59 @@ static void
|
|||
gtk_scsistat_init(const char *opt_arg, void* userdata _U_)
|
||||
{
|
||||
scsistat_t *rs;
|
||||
guint32 i;
|
||||
char *title_string;
|
||||
char *filter_string;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *stat_label;
|
||||
GtkWidget *filter_label;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
int program, pos;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
const char *hf_name=NULL;
|
||||
guint32 i;
|
||||
char *title_string;
|
||||
char *filter_string;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *stat_label;
|
||||
GtkWidget *filter_label;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
int program, pos;
|
||||
const char *filter = NULL;
|
||||
GString *error_string;
|
||||
const char *hf_name = NULL;
|
||||
|
||||
pos=0;
|
||||
if(sscanf(opt_arg,"scsi,srt,%d,%n",&program,&pos)==1){
|
||||
pos = 0;
|
||||
if(sscanf(opt_arg,"scsi,srt,%d,%n",&program,&pos) == 1){
|
||||
if(pos){
|
||||
filter=opt_arg+pos;
|
||||
filter = opt_arg+pos;
|
||||
} else {
|
||||
filter=NULL;
|
||||
filter = NULL;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "wireshark: invalid \"-z scsi,srt,<cmdset>[,<filter>]\" argument\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
scsi_program=program;
|
||||
rs=(scsistat_t *)g_malloc(sizeof(scsistat_t));
|
||||
rs->cmdset=program;
|
||||
switch(program){
|
||||
scsi_program = program;
|
||||
rs = (scsistat_t *)g_malloc(sizeof(scsistat_t));
|
||||
rs->cmdset = program;
|
||||
switch(program){
|
||||
case SCSI_DEV_SBC:
|
||||
rs->prog="SBC (disk)";
|
||||
rs->cdbnames=scsi_sbc_vals;
|
||||
hf_name="scsi_sbc.opcode";
|
||||
rs->prog = "SBC (disk)";
|
||||
rs->cdbnames_ext = &scsi_sbc_vals_ext;
|
||||
hf_name = "scsi_sbc.opcode";
|
||||
break;
|
||||
case SCSI_DEV_SSC:
|
||||
rs->prog="SSC (tape)";
|
||||
rs->cdbnames=scsi_ssc_vals;
|
||||
hf_name="scsi_ssc.opcode";
|
||||
rs->prog = "SSC (tape)";
|
||||
rs->cdbnames_ext = &scsi_ssc_vals_ext;
|
||||
hf_name = "scsi_ssc.opcode";
|
||||
break;
|
||||
case SCSI_DEV_CDROM:
|
||||
rs->prog="MMC (cd/dvd)";
|
||||
rs->cdbnames=scsi_mmc_vals;
|
||||
hf_name="scsi_mmc.opcode";
|
||||
rs->prog = "MMC (cd/dvd)";
|
||||
rs->cdbnames_ext = &scsi_mmc_vals_ext;
|
||||
hf_name = "scsi_mmc.opcode";
|
||||
break;
|
||||
case SCSI_DEV_SMC:
|
||||
rs->prog="SMC (tape robot)";
|
||||
rs->cdbnames=scsi_smc_vals;
|
||||
hf_name="scsi_smc.opcode";
|
||||
rs->prog = "SMC (tape robot)";
|
||||
rs->cdbnames_ext = &scsi_smc_vals_ext;
|
||||
hf_name = "scsi_smc.opcode";
|
||||
break;
|
||||
case SCSI_DEV_OSD:
|
||||
rs->prog="OSD (object based)";
|
||||
rs->cdbnames=scsi_osd_vals;
|
||||
hf_name="scsi_osd.opcode";
|
||||
rs->prog = "OSD (object based)";
|
||||
rs->cdbnames_ext = &scsi_osd_vals_ext;
|
||||
hf_name = "scsi_osd.opcode";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -221,17 +222,17 @@ gtk_scsistat_init(const char *opt_arg, void* userdata _U_)
|
|||
gtk_window_set_default_size(GTK_WINDOW(rs->win), 550, 400);
|
||||
scsistat_set_title(rs);
|
||||
|
||||
vbox=ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE);
|
||||
vbox = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE);
|
||||
gtk_container_add(GTK_CONTAINER(rs->win), vbox);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
|
||||
|
||||
title_string = scsistat_gen_title(rs);
|
||||
stat_label=gtk_label_new(title_string);
|
||||
stat_label = gtk_label_new(title_string);
|
||||
g_free(title_string);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), stat_label, FALSE, FALSE, 0);
|
||||
|
||||
filter_string = g_strdup_printf("Filter: %s", filter ? filter : "");
|
||||
filter_label=gtk_label_new(filter_string);
|
||||
filter_label = gtk_label_new(filter_string);
|
||||
g_free(filter_string);
|
||||
gtk_label_set_line_wrap(GTK_LABEL(filter_label), TRUE);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), filter_label, FALSE, FALSE, 0);
|
||||
|
@ -241,12 +242,12 @@ gtk_scsistat_init(const char *opt_arg, void* userdata _U_)
|
|||
|
||||
init_srt_table(&rs->srt_table, 256, vbox, hf_name);
|
||||
|
||||
for(i=0;i<256;i++){
|
||||
init_srt_table_row(&rs->srt_table, i, val_to_str(i, rs->cdbnames, "Unknown-0x%02x"));
|
||||
for(i=0; i<256; i++){
|
||||
init_srt_table_row(&rs->srt_table, i, val_to_str_ext(i, rs->cdbnames_ext, "Unknown-0x%02x"));
|
||||
}
|
||||
|
||||
|
||||
error_string=register_tap_listener("scsi", rs, filter, 0, scsistat_reset, scsistat_packet, scsistat_draw);
|
||||
error_string = register_tap_listener("scsi", rs, filter, 0, scsistat_reset, scsistat_packet, scsistat_draw);
|
||||
if(error_string){
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
|
@ -273,16 +274,16 @@ gtk_scsistat_init(const char *opt_arg, void* userdata _U_)
|
|||
}
|
||||
|
||||
static const enum_val_t scsi_command_sets[] = {
|
||||
{ "sbc", "SBC (disk)", SCSI_DEV_SBC },
|
||||
{ "ssc", "SSC (tape)", SCSI_DEV_SSC },
|
||||
{ "mmc", "MMC (cd/dvd)", SCSI_DEV_CDROM },
|
||||
{ "smc", "SMC (tape robot)", SCSI_DEV_SMC },
|
||||
{ "sbc", "SBC (disk)", SCSI_DEV_SBC },
|
||||
{ "ssc", "SSC (tape)", SCSI_DEV_SSC },
|
||||
{ "mmc", "MMC (cd/dvd)", SCSI_DEV_CDROM },
|
||||
{ "smc", "SMC (tape robot)", SCSI_DEV_SMC },
|
||||
{ "osd", "OSD (object based)", SCSI_DEV_OSD },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
static tap_param scsi_stat_params[] = {
|
||||
{ PARAM_ENUM, "Command set", scsi_command_sets },
|
||||
{ PARAM_ENUM, "Command set", scsi_command_sets },
|
||||
{ PARAM_FILTER, "Filter", NULL }
|
||||
};
|
||||
|
||||
|
@ -301,3 +302,17 @@ register_tap_listener_gtkscsistat(void)
|
|||
register_param_stat(&scsi_stat_dlg, "SCSI",
|
||||
REGISTER_STAT_GROUP_RESPONSE_TIME);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
||||
* :indentSize=8:tabSize=8:noTabs=false:
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue