diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-01-02 20:33:46 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-01-02 20:33:46 +0000 |
commit | 0c18a030100ed0c0bc3c04ea8cc83b8d8c38dfec (patch) | |
tree | ff092561ac2b6f06d690fb57a7e80b439a56c0fc /packet-raw.c | |
parent | 73755e034eedc2be7395254145590a75448613e0 (diff) |
Register a protocol for "Raw packet data". This makes it filterable,
but the real point is to make it look better in a Protocol-Hierarchy
Statistics summary; without the header_field_info for "Raw packet data",
there was no name to display in the statistics GUI. (Yes, I could have
re-designed ph_stats_node_t to accomodate an string if there was not
a registered hfinfo for a protocol, but then the side-effect of being
able to filter for the "raw" protocol made me choose this route).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4465 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-raw.c')
-rw-r--r-- | packet-raw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-raw.c b/packet-raw.c index 993b3de060..19fefc11e1 100644 --- a/packet-raw.c +++ b/packet-raw.c @@ -1,7 +1,7 @@ /* packet-raw.c * Routines for raw packet disassembly * - * $Id: packet-raw.c,v 1.29 2001/12/10 00:25:33 guy Exp $ + * $Id: packet-raw.c,v 1.30 2002/01/02 20:33:46 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -39,6 +39,7 @@ #include "packet-ip.h" #include "packet-ppp.h" +static int proto_raw = -1; static gint ett_raw = -1; static const char zeroes[10]; @@ -100,7 +101,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) */ if (tree) { - ti = proto_tree_add_text(tree, tvb, 0, 0, "Raw packet data" ); + ti = proto_tree_add_item(tree, proto_raw, tvb, 0, 0, FALSE); fh_tree = proto_item_add_subtree(ti, ett_raw); proto_tree_add_text(fh_tree, tvb, 0, 0, "No link information available"); } @@ -152,6 +153,7 @@ proto_register_raw(void) &ett_raw, }; + proto_raw = proto_register_protocol("Raw packet data", "Raw", "raw"); proto_register_subtree_array(ett, array_length(ett)); } |