diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-02-12 20:26:52 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-02-12 20:26:52 +0000 |
commit | 9cb83db8e333b647d4a5543a45f07863743548b9 (patch) | |
tree | d1028634c13ef5210b632230fcd4824f2d00db7b /epan/dissectors/packet-scsi-smc.c | |
parent | 97f3b04447ac193673ad0c2d410da092a8a5e9d5 (diff) |
add dissection of SMC POSITION TO ELEMENT cdb
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20799 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-scsi-smc.c')
-rw-r--r-- | epan/dissectors/packet-scsi-smc.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/epan/dissectors/packet-scsi-smc.c b/epan/dissectors/packet-scsi-smc.c index c7d28de0eb..979ce0b516 100644 --- a/epan/dissectors/packet-scsi-smc.c +++ b/epan/dissectors/packet-scsi-smc.c @@ -100,6 +100,34 @@ dissect_smc_exchangemedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t } void +dissect_smc_position_to_element (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, + guint offset, gboolean isreq, gboolean iscdb, + guint payload_len _U_, scsi_task_data_t *cdata _U_) +{ + guint8 flags; + static const int *pte_fields[] = { + &hf_scsi_smc_invert, + NULL + }; + + if (!tree) + return; + + if (isreq && iscdb) { + proto_tree_add_item (tree, hf_scsi_smc_mta, tvb, offset+1, 2, 0); + proto_tree_add_item (tree, hf_scsi_smc_da, tvb, offset+3, 2, 0); + + proto_tree_add_bitmask(tree, tvb, offset+7, hf_scsi_smc_medium_flags, ett_scsi_exchange_medium, pte_fields, FALSE); + + flags = tvb_get_guint8 (tvb, offset+8); + proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+8, 1, + flags, + "Vendor Unique = %u, NACA = %u, Link = %u", + flags & 0xC0, flags & 0x4, flags & 0x1); + } +} + +void dissect_smc_initialize_element_status (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint offset, gboolean isreq, gboolean iscdb, guint payload_len _U_, scsi_task_data_t *cdata _U_) @@ -663,7 +691,7 @@ scsi_cdb_table_t scsi_smc_table[256] = { /*SMC 0x28*/{NULL}, /*SMC 0x29*/{NULL}, /*SMC 0x2a*/{NULL}, -/*SMC 0x2b*/{NULL}, +/*SMC 0x2b*/{dissect_smc_position_to_element}, /*SMC 0x2c*/{NULL}, /*SMC 0x2d*/{NULL}, /*SMC 0x2e*/{NULL}, |