aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@ns.aus.com>2002-09-20 07:28:20 +0000
committerRichard Sharpe <sharpe@ns.aus.com>2002-09-20 07:28:20 +0000
commitc2e6d4fcb24d688658e9015c241dfe1e7d219518 (patch)
treeef11775166d8cbdf156aecc9059f9f3f215991ff
parent5800ff03d9fe67a2dcfc9e18a288ce88591d05ae (diff)
Add more info in the info col for write&X.
svn path=/trunk/; revision=6306
-rw-r--r--packet-smb.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/packet-smb.c b/packet-smb.c
index 3319d3c67d..34ddc55326 100644
--- a/packet-smb.c
+++ b/packet-smb.c
@@ -3,7 +3,7 @@
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
* 2001 Rewrite by Ronnie Sahlberg and Guy Harris
*
- * $Id: packet-smb.c,v 1.292 2002/09/04 05:46:01 sharpe Exp $
+ * $Id: packet-smb.c,v 1.293 2002/09/20 07:28:20 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3328,7 +3328,8 @@ static int
dissect_read_file_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, proto_tree *smb_tree _U_)
{
guint8 wc;
- guint16 bc;
+ guint16 cnt=0, bc;
+ guint32 ofs=0;
smb_info_t *si;
unsigned int fid;
@@ -3345,13 +3346,20 @@ dissect_read_file_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
}
/* read count */
+ cnt = tvb_get_letohs(tvb, offset);
proto_tree_add_item(tree, hf_smb_count, tvb, offset, 2, TRUE);
offset += 2;
/* offset */
+ ofs = tvb_get_letohl(tvb, offset);
proto_tree_add_item(tree, hf_smb_offset, tvb, offset, 4, TRUE);
offset += 4;
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ ", %u byte%s at offset %u", cnt,
+ (cnt == 1) ? "" : "s", ofs);
+
/* remaining */
proto_tree_add_item(tree, hf_smb_remaining, tvb, offset, 2, TRUE);
offset += 2;
@@ -5474,7 +5482,11 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(tree, hf_smb_data_offset, tvb, offset, 2, dataoffset);
offset += 2;
- /* FIXME: add byte/offset to COL_INFO */
+ /* FIXME: handle Large (48-bit) byte/offset to COL_INFO */
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ ", %u byte%s at offset %u", datalen,
+ (datalen == 1) ? "" : "s", ofs);
if(wc==14){
/* high offset */