summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-07-16 21:54:38 -0400
committerMichael Mann <mmann78@netscape.net>2015-07-17 11:29:08 +0000
commit6514dece0c755854081a0a0ccb525e6bc9dbbaff (patch)
tree8f0628b76ec4ff887374cd6068610587d450ed10
parentb1eaf29d4056f05d1bd6a7f3d692553ec069a228 (diff)
downloadwireshark-6514dece0c755854081a0a0ccb525e6bc9dbbaff.tar.gz
Add preference for disabling 'packet size limited during capture' message in Info column.
Bug: 9827 Change-Id: I8fdba4827b164bd231981bfdd2e1bd0499f4f87c Reviewed-on: https://code.wireshark.org/review/9669 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-frame.c5
-rw-r--r--epan/show_exception.c19
2 files changed, 23 insertions, 1 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index 3e03074f77..bc1476bdfd 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -105,6 +105,7 @@ static gboolean force_docsis_encap = FALSE;
static gboolean generate_md5_hash = FALSE;
static gboolean generate_epoch_time = TRUE;
static gboolean generate_bits_field = TRUE;
+static gboolean disable_packet_size_limited_in_summary = FALSE;
static const value_string p2p_dirs[] = {
{ P2P_DIR_UNKNOWN, "Unknown" },
@@ -910,6 +911,10 @@ proto_register_frame(void)
"Show the number of bits in the frame",
"Whether or not the number of bits in the frame should be shown.",
&generate_bits_field);
+ prefs_register_bool_preference(frame_module, "disable_packet_size_limited_in_summary",
+ "Disable 'packet size limited during capture' message in summary",
+ "Whether or not 'packet size limited during capture' message in shown in Info column.",
+ &disable_packet_size_limited_in_summary);
frame_tap=register_tap("frame");
}
diff --git a/epan/show_exception.c b/epan/show_exception.c
index 7712b1e962..efc896db43 100644
--- a/epan/show_exception.c
+++ b/epan/show_exception.c
@@ -27,6 +27,8 @@
#include <epan/packet.h>
#include <epan/exceptions.h>
#include <epan/expert.h>
+#include <epan/prefs.h>
+#include <epan/prefs-int.h>
#include <epan/show_exception.h>
static int proto_short = -1;
@@ -89,13 +91,28 @@ show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
case BoundsError:
- col_append_str(pinfo->cinfo, COL_INFO, "[Packet size limited during capture]");
+ {
+ gboolean display_info = TRUE;
+ module_t * frame_module = prefs_find_module("frame");
+ if (frame_module != NULL)
+ {
+ pref_t *display_pref = prefs_find_preference(frame_module, "disable_packet_size_limited_in_summary");
+ if (display_pref)
+ {
+ if (*display_pref->varp.boolp)
+ display_info = FALSE;
+ }
+ }
+
+ if (display_info)
+ col_append_str(pinfo->cinfo, COL_INFO, "[Packet size limited during capture]");
proto_tree_add_protocol_format(tree, proto_short, tvb, 0, 0,
"[Packet size limited during capture: %s truncated]", pinfo->current_proto);
/* Don't record BoundsError exceptions as expert events - they merely
* reflect a capture done with a snapshot length too short to capture
* all of the packet
* (any case where it's caused by something else is a bug). */
+ }
break;
case FragmentBoundsError: