-
/* packet-data.c
* Routines for raw data (default case)
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
+ * $Id: packet-data.c,v 1.10 1999/07/29 05:46:53 gram Exp $
+ *
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
* Copyright 1998 Gerald Combs
# include "config.h"
#endif
-#include <gtk/gtk.h>
-#include <pcap.h>
-
-#include <stdio.h>
-
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#include "ethereal.h"
+#include <glib.h>
#include "packet.h"
+/* proto_data cannot be static because it's referenced in the
+ * print routines
+ */
+int proto_data = -1;
void
-dissect_data(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) {
+dissect_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
if (fd->cap_len > offset && tree) {
- (void) add_item_to_tree(GTK_WIDGET(tree), offset, fd->cap_len - offset,
- "Data");
+ 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" );
+}