diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-06-19 07:39:19 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-06-19 07:39:19 +0000 |
commit | 986085204dfe400dcf98c627d175372acb7a9d14 (patch) | |
tree | b98c98acae0208a2b506339088a06f6f529b3427 /epan | |
parent | d76b58cbfbf43810413faad82d510fe5d4999d06 (diff) | |
download | wireshark-986085204dfe400dcf98c627d175372acb7a9d14.tar.gz |
add infrastructure to make tracking of fid->filename easy to implement and use
svn path=/trunk/; revision=18514
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-smb.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-smb.h | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index b56ec0fdc4..c83ac20624 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -2873,6 +2873,7 @@ dissect_open_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i typedef struct _smb_fid_into_t { int opened_in; int closed_in; + char *filename; } smb_fid_info_t; @@ -2897,6 +2898,12 @@ dissect_smb_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, fid_info=se_alloc(sizeof(smb_fid_info_t)); fid_info->opened_in=pinfo->fd->num; fid_info->closed_in=0; + if(si->sip && (si->sip->extra_info_type==SMB_EI_FILENAME)){ + fid_info->filename=si->sip->extra_info; + } else { + fid_info->filename=NULL; + } + se_tree_insert32(si->ct->fid_tree, pinfo->fd->num, fid_info); } @@ -2912,6 +2919,11 @@ dissect_smb_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, } if(fid_info->opened_in){ + if(fid_info->filename){ + it=proto_tree_add_string(tr, hf_smb_file_name, tvb, 0, 0, fid_info->filename); + PROTO_ITEM_SET_GENERATED(it); + } + it=proto_tree_add_uint(tr, hf_smb_opened_in, tvb, 0, 0, fid_info->opened_in); PROTO_ITEM_SET_GENERATED(it); } diff --git a/epan/dissectors/packet-smb.h b/epan/dissectors/packet-smb.h index 72ebd35470..5c80266a00 100644 --- a/epan/dissectors/packet-smb.h +++ b/epan/dissectors/packet-smb.h @@ -199,7 +199,8 @@ typedef enum { SMB_EI_FID, /* FID */ SMB_EI_NTI, /* smb_nt_transact_info_t * */ SMB_EI_TRI, /* smb_transact_info_t * */ - SMB_EI_T2I /* smb_transact2_info_t * */ + SMB_EI_T2I, /* smb_transact2_info_t * */ + SMB_EI_FILENAME /* fid tracking char * */ } smb_extra_info_t; typedef struct { guint32 frame_req, frame_res; |