aboutsummaryrefslogtreecommitdiffstats
path: root/packet-data.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-07-07 22:52:57 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-07-07 22:52:57 +0000
commit07f42b5b31f9523deeb147226521f77a2c8dd797 (patch)
treec720d2a42f11c9d14ac1a161eb785b438c2c4b14 /packet-data.c
parentfba49cfe85d4b23ebbffa97fae126a379e913ecd (diff)
downloadwireshark-07f42b5b31f9523deeb147226521f77a2c8dd797.tar.gz
wireshark-07f42b5b31f9523deeb147226521f77a2c8dd797.tar.bz2
wireshark-07f42b5b31f9523deeb147226521f77a2c8dd797.zip
Created a new protocol tree implementation and a new display filter
mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. svn path=/trunk/; revision=342
Diffstat (limited to 'packet-data.c')
-rw-r--r--packet-data.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/packet-data.c b/packet-data.c
index bf546baadc..f28300f16a 100644
--- a/packet-data.c
+++ b/packet-data.c
@@ -2,7 +2,7 @@
* Routines for raw data (default case)
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-data.c,v 1.8 1999/03/23 03:14:36 gram Exp $
+ * $Id: packet-data.c,v 1.9 1999/07/07 22:51:41 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -35,12 +35,21 @@
#include <glib.h>
#include "packet.h"
+int proto_data = -1;
+
void
dissect_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
if (fd->cap_len > offset && tree) {
- proto_tree_add_item(tree, offset, END_OF_FRAME,
- "Data (%d bytes)", END_OF_FRAME);
+ proto_tree_add_item_format(tree, proto_data, offset,
+ END_OF_FRAME, NULL, "Data (%d bytes)", END_OF_FRAME);
}
}
+void
+proto_register_data(void)
+{
+ proto_data = proto_register_protocol (
+ /* name */ "Data",
+ /* abbrev */ "data" );
+}