diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-05-22 23:05:25 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-05-22 23:05:25 +0000 |
commit | e117ef599b5282a06d877042da231e4143fc7aad (patch) | |
tree | e20f9381f55ff6b11b98fae64c7648ea0dac1953 | |
parent | 447d05e0cdb987dbde5829312a83309ccb51d27c (diff) |
show the filename that was to be deleted in the Delete reply
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21897 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/dissectors/packet-smb.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-smb.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index 6cda2ed3b0..5a1f5df368 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -2466,6 +2466,16 @@ dissect_empty(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offse { guint8 wc; guint16 bc; + smb_info_t *si = pinfo->private_data; + proto_item *item=NULL; + + DISSECTOR_ASSERT(si); + + if(si->sip && si->sip->extra_info_type==SMB_EI_FILENAME){ + item=proto_tree_add_string(tree, hf_smb_file_name, tvb, 0, 0, si->sip->extra_info); + PROTO_ITEM_SET_GENERATED(item); + } + WORD_COUNT; @@ -3649,6 +3659,12 @@ dissect_delete_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* file name */ fn = get_unicode_or_ascii_string(tvb, &offset, si->unicode, &fn_len, FALSE, FALSE, &bc); + + if(si->sip){ + si->sip->extra_info_type=SMB_EI_FILENAME; + si->sip->extra_info=se_strdup(fn); + } + if (fn == NULL) goto endofcommand; proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, fn_len, diff --git a/epan/dissectors/packet-smb.h b/epan/dissectors/packet-smb.h index 00bf21fb23..2f1fd042f7 100644 --- a/epan/dissectors/packet-smb.h +++ b/epan/dissectors/packet-smb.h @@ -207,6 +207,7 @@ typedef enum { SMB_EI_T2I, /* smb_transact2_info_t * */ SMB_EI_TIDNAME, /* tid tracking char * */ SMB_EI_FILEDATA, /* fid tracking */ + SMB_EI_FILENAME, /* filename tracking */ SMB_EI_UID, /* smb_uid_t */ SMB_EI_RWINFO /* read/write offset/count info */ } smb_extra_info_t; |