From 6124eac224e525d5d579069cb0bd8b9ba84ae005 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sat, 12 Nov 2005 23:05:29 +0000 Subject: [PATCH] prettify smb2 always put the filename in col_info if it is known for getinfo/setinfo put the class/level in colinfo as well. this makes it very easy to see in the packet summary which file a icommand applies to and what kind of info is requested svn path=/trunk/; revision=16496 --- epan/dissectors/packet-smb2.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 1dee74f0c0..c6ef9345ce 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -249,6 +249,7 @@ dissect_smb2_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset e_ctx_hnd policy_hnd; proto_item *hnd_item; char *fid_name; + guint32 open_frame = 0, close_frame = 0; di.conformant_run=0; di.call_data=NULL; @@ -273,15 +274,24 @@ dissect_smb2_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset */ break; case FID_MODE_CLOSE: - offset = dissect_nt_guid_hnd(tvb, offset, pinfo, tree, drep, hf_smb2_fid, NULL, NULL, FALSE, TRUE); + offset = dissect_nt_guid_hnd(tvb, offset, pinfo, tree, drep, hf_smb2_fid, &policy_hnd, &hnd_item, FALSE, TRUE); break; case FID_MODE_USE: - offset = dissect_nt_guid_hnd(tvb, offset, pinfo, tree, drep, hf_smb2_fid, NULL, NULL, FALSE, FALSE); + offset = dissect_nt_guid_hnd(tvb, offset, pinfo, tree, drep, hf_smb2_fid, &policy_hnd, &hnd_item, FALSE, FALSE); break; } pinfo->private_data=old_private_data; + + /* put the filename in col_info */ + if (check_col(pinfo->cinfo, COL_INFO)){ + if (dcerpc_smb_fetch_pol(&policy_hnd, &fid_name, &open_frame, &close_frame, pinfo->fd->num)) { + + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", fid_name); + } + } + return offset; } @@ -805,6 +815,10 @@ dissect_smb2_getinfo_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * proto_tree_add_item(tree, hf_smb2_infolevel, tvb, offset, 1, TRUE); offset += 1; + if (check_col(pinfo->cinfo, COL_INFO)){ + col_append_fstr(pinfo->cinfo, COL_INFO, " Class:0x%02x Level:0x%02x", class, infolevel); + } + /* max response size */ proto_tree_add_item(tree, hf_smb2_max_response_size, tvb, offset, 4, TRUE); offset += 4; @@ -1329,6 +1343,10 @@ dissect_smb2_setinfo_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_tree_add_item(tree, hf_smb2_infolevel, tvb, offset, 1, TRUE); offset += 1; + if (check_col(pinfo->cinfo, COL_INFO)){ + col_append_fstr(pinfo->cinfo, COL_INFO, " Class:0x%02x Level:0x%02x", class, infolevel); + } + /* response size */ response_size=tvb_get_letohl(tvb, offset); proto_tree_add_item(tree, hf_smb2_response_size, tvb, offset, 4, TRUE);