aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-atmtcp.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-28 15:28:03 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-28 15:28:03 +0000
commitcadbb8e644ddaffaf7b0c501487cbd287b954101 (patch)
treeaf6d02b55c53b4f1e00441cfc1e3707371b26431 /epan/dissectors/packet-atmtcp.c
parent542074faf3fb20ec5ac447e0c216f8be15c53083 (diff)
From Alexis La Goutte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5522 :
Fix a Clang warning, add email address, and add some stuff to COL_INFO. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36381 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-atmtcp.c')
-rw-r--r--epan/dissectors/packet-atmtcp.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/epan/dissectors/packet-atmtcp.c b/epan/dissectors/packet-atmtcp.c
index ca67e2bcd6..7fcf032e71 100644
--- a/epan/dissectors/packet-atmtcp.c
+++ b/epan/dissectors/packet-atmtcp.c
@@ -1,6 +1,6 @@
/* packet-atmtcp.c
* Routines for ATM over TCP dissection
- * Copyright 2011, Alexis La Goutte
+ * Copyright 2011, Alexis La Goutte <alexis.lagoutte at gmail dot com>
*
* $Id$
*
@@ -76,14 +76,14 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* VPI */
proto_tree_add_item(atmtcp_tree, hf_atmtcp_vpi, tvb, offset, 2, ENC_NA);
}
- offset +=2;
+ offset += 2;
if (tree) {
/* VCI */
proto_tree_add_item(atmtcp_tree, hf_atmtcp_vci, tvb, offset, 2, ENC_NA);
}
- offset +=2;
+ offset += 2;
if (tree) {
@@ -91,11 +91,18 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(atmtcp_tree, hf_atmtcp_length, tvb, offset, 4, ENC_NA);
}
length = tvb_get_ntohl(tvb, offset);
-
- offset +=4;
+ if(length == ATMTCP_HDR_MAGIC)
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Command");
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Data");
+ }
+ offset += 4;
/* Data (for the moment...) */
- next_tvb = tvb_new_subset(tvb, 8, -1, -1);
+ next_tvb = tvb_new_subset(tvb, offset, -1, -1);
call_dissector(data_handle, next_tvb, pinfo, tree);
return tvb_length(tvb);
}