aboutsummaryrefslogtreecommitdiffstats
path: root/packet-raw.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2002-01-02 20:33:46 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2002-01-02 20:33:46 +0000
commit8168fb74a0e031197feeea17c22daa6092353d16 (patch)
treeff092561ac2b6f06d690fb57a7e80b439a56c0fc /packet-raw.c
parent8d6b722b3d27c2d1234419fed313f0dde16d181b (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). svn path=/trunk/; revision=4465
Diffstat (limited to 'packet-raw.c')
-rw-r--r--packet-raw.c6
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));
}