diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-05-13 14:04:45 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-05-14 01:46:48 +0000 |
commit | 2ddf0e6db31b97ac8dbc0f43d87a114b6be100f9 (patch) | |
tree | 7818dce17de7a7ccf77cb6af92a7a39475c18bb7 /epan/dissectors/packet-raw.c | |
parent | 4a37dfc57e26b32250fe27a11986dee8aec24801 (diff) |
Don't put an expert info on every single raw frame (even if it was just a Note).
It's completely normal that there's no link information when you're dissecting
raw packets. This does leave the Raw protocol tree without any children
(which looks a little funny) but I don't want to take it out and I don't see
anything useful to put under it.
Also change the Raw protocol item to cover all the bytes of the TVB (like the
frame item).
Change-Id: I44c1ac954c9989273d0c461ba366caba0a480ea6
Reviewed-on: https://code.wireshark.org/review/8454
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-raw.c')
-rw-r--r-- | epan/dissectors/packet-raw.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/epan/dissectors/packet-raw.c b/epan/dissectors/packet-raw.c index 2fd900af2c..54b716aea0 100644 --- a/epan/dissectors/packet-raw.c +++ b/epan/dissectors/packet-raw.c @@ -25,7 +25,6 @@ #include "config.h" #include <epan/packet.h> -#include <epan/expert.h> #include <wiretap/wtap.h> #include "packet-raw.h" #include "packet-ip.h" @@ -37,8 +36,6 @@ void proto_reg_handoff_raw(void); static int proto_raw = -1; static gint ett_raw = -1; -static expert_field ei_raw_no_link = EI_INIT; - static const char zeroes[10] = {0,0,0,0,0,0,0,0,0,0}; static dissector_handle_t ip_handle; @@ -100,7 +97,6 @@ capture_raw(const guchar *pd, int len, packet_counts *ld) static void dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *ti; tvbuff_t *next_tvb; /* load the top pane info. This should be overwritten by @@ -112,8 +108,7 @@ dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* populate a tree in the second pane with the status of the link layer (ie none) */ - ti = proto_tree_add_item(tree, proto_raw, tvb, 0, 0, ENC_NA); - expert_add_info(pinfo, ti, &ei_raw_no_link); + proto_tree_add_item(tree, proto_raw, tvb, 0, tvb_captured_length(tvb), ENC_NA); if (pinfo->fd->lnk_t == WTAP_ENCAP_RAW_IP4) { call_dissector(ip_handle, tvb, pinfo, tree); @@ -182,16 +177,8 @@ proto_register_raw(void) &ett_raw, }; - static ei_register_info ei[] = { - { &ei_raw_no_link, { "raw.no_link", PI_PROTOCOL, PI_NOTE, "No link information available", EXPFILL }}, - }; - - expert_module_t* expert_raw; - proto_raw = proto_register_protocol("Raw packet data", "Raw", "raw"); proto_register_subtree_array(ett, array_length(ett)); - expert_raw = expert_register_protocol(proto_raw); - expert_register_field_array(expert_raw, ei, array_length(ei)); } void |