aboutsummaryrefslogtreecommitdiffstats
path: root/packet-frame.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-12-29 04:16:57 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-12-29 04:16:57 +0000
commit7ec3fbf4484c787acfa035dfed9abf189ffcbd16 (patch)
treee462fe7b56e8626dcfee449e8761a52e236906a1 /packet-frame.c
parent55ff0d285de1f3d864ba9958a503b6d026cf8ad0 (diff)
If we get an exception when dissecting a packet, append "[Short Frame]"
or "[Malformed Frame]" to the Info column. Make some dissectors set the Protocol column and clear the Info column before fetching anything from the tvbuff they were handed, so that if the frame is short or malformed, it'll be marked as being the right top-level protocol, and the Info column won't have cruft left over from the previous protocol. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2800 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-frame.c')
-rw-r--r--packet-frame.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet-frame.c b/packet-frame.c
index c77acf33f5..8e225bf62a 100644
--- a/packet-frame.c
+++ b/packet-frame.c
@@ -2,7 +2,7 @@
*
* Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
*
- * $Id: packet-frame.c,v 1.4 2000/12/15 03:30:21 gerald Exp $
+ * $Id: packet-frame.c,v 1.5 2000/12/29 04:16:57 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -131,10 +131,14 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
CATCH(BoundsError) {
+ if (check_col(pinfo->fd, COL_INFO))
+ col_append_str(pinfo->fd, COL_INFO, "[Short Frame]");
proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0,
"[Short Frame: %s]", pinfo->current_proto );
}
CATCH(ReportedBoundsError) {
+ if (check_col(pinfo->fd, COL_INFO))
+ col_append_str(pinfo->fd, COL_INFO, "[Malformed Frame]");
proto_tree_add_protocol_format(tree, proto_malformed, tvb, 0, 0,
"[Malformed Frame: %s]", pinfo->current_proto );
}