aboutsummaryrefslogtreecommitdiffstats
path: root/ethertype.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-03-23 03:14:46 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-03-23 03:14:46 +0000
commitef3dfe2077c3fd49997b7d9f3c31ba9f65ff27e2 (patch)
tree50607383870e1a22da46616611b6af517557c1e3 /ethertype.c
parente3db269e00f32936d8385aa04df895edcbed1547 (diff)
downloadwireshark-ef3dfe2077c3fd49997b7d9f3c31ba9f65ff27e2.tar.gz
wireshark-ef3dfe2077c3fd49997b7d9f3c31ba9f65ff27e2.tar.bz2
wireshark-ef3dfe2077c3fd49997b7d9f3c31ba9f65ff27e2.zip
Removed all references to gtk objects from packet*.[ch] files. They now
reference the protocol tree with struct proto_tree and struct proto_item objects. That way, the packet decoding source code file can be used with non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged some of the information in packet.h to more appropriate places (like other packet-*.[ch] files). svn path=/trunk/; revision=223
Diffstat (limited to 'ethertype.c')
-rw-r--r--ethertype.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ethertype.c b/ethertype.c
index 828043d9f0..a3772fec9c 100644
--- a/ethertype.c
+++ b/ethertype.c
@@ -2,7 +2,7 @@
* Routines for calling the right protocol for the ethertype.
* This is called by both packet-eth.c (Ethernet II) and packet-llc.c (SNAP)
*
- * $Id: ethertype.c,v 1.12 1999/02/09 00:35:36 guy Exp $
+ * $Id: ethertype.c,v 1.13 1999/03/23 03:14:34 gram Exp $
*
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
@@ -34,11 +34,7 @@
# include <sys/types.h>
#endif
-#include <gtk/gtk.h>
-
-#include <stdio.h>
-
-#include "ethereal.h"
+#include <glib.h>
#include "packet.h"
#include "etypes.h"
@@ -77,11 +73,11 @@ capture_ethertype(guint16 etype, int offset,
void
ethertype(guint16 etype, int offset,
- const u_char *pd, frame_data *fd, GtkTree *tree, GtkWidget
+ const u_char *pd, frame_data *fd, proto_tree *tree, proto_tree
*fh_tree)
{
if (tree) {
- add_item_to_tree(fh_tree, offset - 2, 2, "Type: %s (0x%04x)",
+ proto_tree_add_item(fh_tree, offset - 2, 2, "Type: %s (0x%04x)",
ethertype_to_str(etype, "Unknown"), etype);
}
switch (etype) {