aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packet-frame.c27
-rw-r--r--packet-frame.h8
2 files changed, 27 insertions, 8 deletions
diff --git a/packet-frame.c b/packet-frame.c
index cd61a3d5a9..631006698a 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.39 2003/09/22 09:06:10 sahlberg Exp $
+ * $Id: packet-frame.c,v 1.40 2003/10/23 05:01:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -192,18 +192,31 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(data_handle,tvb, pinfo, tree);
}
}
- CATCH(BoundsError) {
+ CATCH_ALL {
+ show_exception(tvb, pinfo, tree, EXCEPT_CODE);
+ }
+ ENDTRY;
+
+ tap_queue_packet(frame_tap, pinfo, NULL);
+}
+
+void
+show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
+ unsigned long exception)
+{
+ switch (exception) {
+
+ case BoundsError:
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, "[Short Frame]");
proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0,
"[Short Frame: %s]", pinfo->current_proto);
- }
- CATCH(ReportedBoundsError) {
+ break;
+
+ case ReportedBoundsError:
show_reported_bounds_error(tvb, pinfo, tree);
+ break;
}
- ENDTRY;
-
- tap_queue_packet(frame_tap, pinfo, NULL);
}
void
diff --git a/packet-frame.h b/packet-frame.h
index 51d848af01..995e378336 100644
--- a/packet-frame.h
+++ b/packet-frame.h
@@ -2,7 +2,7 @@
*
* Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
*
- * $Id: packet-frame.h,v 1.5 2002/08/28 21:00:13 jmayer Exp $
+ * $Id: packet-frame.h,v 1.6 2003/10/23 05:01:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,12 @@
*/
/*
+ * Routine used to add an indication of an arbitrary exception to the tree.
+ */
+void show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
+ unsigned long exception);
+
+/*
* Routine used to add an indication of a ReportedBoundsError exception
* to the tree.
*/