diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-01 09:42:39 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-01 09:42:39 +0000 |
commit | 2541f915a78328d43cbed9771569f55928bf1e9f (patch) | |
tree | 5993c74845c45fd6b953230d14f4290eab124462 | |
parent | 5320c9eea7be2152a97dc415b3f253c9b800e476 (diff) |
move the ioctl function code to the si structure so we can switch on this later in the ioctl_data dissector
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16634 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/dissectors/packet-smb2.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-smb2.h | 1 |
2 files changed, 5 insertions, 6 deletions
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 8495b2c969..9ccbb2c5f9 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -652,22 +652,20 @@ dissect_smb2_ioctl_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *paren { proto_item *item=NULL; proto_tree *tree=NULL; - guint32 func; if(parent_tree){ item = proto_tree_add_item(parent_tree, hf_smb2_ioctl_function, tvb, offset, 4, TRUE); tree = proto_item_add_subtree(item, ett_smb2_ioctl_function); } - func=tvb_get_letohl(tvb, offset); - - if(func){ + si->ioctl_function=tvb_get_letohl(tvb, offset); + if(si->ioctl_function){ /* device */ proto_tree_add_item(tree, hf_smb2_ioctl_function_device, tvb, offset, 4, TRUE); if (check_col(pinfo->cinfo, COL_INFO)){ col_append_fstr( pinfo->cinfo, COL_INFO, " %s", - val_to_str((func>>16)&0xffff, smb2_ioctl_device_vals, + val_to_str((si->ioctl_function>>16)&0xffff, smb2_ioctl_device_vals, "Unknown (0x%08X)")); } @@ -679,7 +677,7 @@ dissect_smb2_ioctl_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *paren if (check_col(pinfo->cinfo, COL_INFO)){ col_append_fstr( pinfo->cinfo, COL_INFO, " Function:0x%04x", - (func>>2)&0x0fff); + (si->ioctl_function>>2)&0x0fff); } /* method */ diff --git a/epan/dissectors/packet-smb2.h b/epan/dissectors/packet-smb2.h index eb989b6722..6e1127dccb 100644 --- a/epan/dissectors/packet-smb2.h +++ b/epan/dissectors/packet-smb2.h @@ -81,6 +81,7 @@ typedef struct _smb2_conv_info_t { */ typedef struct _smb2_info_t { guint16 opcode; + guint32 ioctl_function; guint32 status; guint32 tid; guint64 seqnum; |