aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fddi.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 /packet-fddi.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 'packet-fddi.c')
-rw-r--r--packet-fddi.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/packet-fddi.c b/packet-fddi.c
index c187e02c3e..d11f3c1f98 100644
--- a/packet-fddi.c
+++ b/packet-fddi.c
@@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
- * $Id: packet-fddi.c,v 1.10 1999/03/02 20:50:05 gram Exp $
+ * $Id: packet-fddi.c,v 1.11 1999/03/23 03:14:37 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -33,12 +33,7 @@
# include <sys/types.h>
#endif
-#include <gtk/gtk.h>
-
-#include <stdio.h>
-
-
-#include "ethereal.h"
+#include <glib.h>
#include "packet.h"
#include "resolv.h"
@@ -176,10 +171,11 @@ capture_fddi(const u_char *pd, guint32 cap_len, packet_counts *ld) {
} /* capture_fddi */
-void dissect_fddi(const u_char *pd, frame_data *fd, GtkTree *tree)
+void dissect_fddi(const u_char *pd, frame_data *fd, proto_tree *tree)
{
int offset = 0, fc;
- GtkWidget *fh_tree, *ti;
+ proto_tree *fh_tree;
+ proto_item *ti;
u_char src[6], dst[6];
if (fd->cap_len < FDDI_HEADER_SIZE) {
@@ -210,17 +206,17 @@ void dissect_fddi(const u_char *pd, frame_data *fd, GtkTree *tree)
offset = FDDI_HEADER_SIZE;
if (tree) {
- ti = add_item_to_tree(GTK_WIDGET(tree), 0, offset,
+ ti = proto_tree_add_item(tree, 0, offset,
"FDDI %s",
(fc >= FDDI_FC_LLC_ASYNC_MIN && fc <= FDDI_FC_LLC_ASYNC_MAX) ?
"Async LLC" : "unsupported FC");
- fh_tree = gtk_tree_new();
- add_subtree(ti, fh_tree, ETT_FDDI);
- add_item_to_tree(fh_tree, FDDI_P_FC, 1, "Frame Control: 0x%02x", fc);
- add_item_to_tree(fh_tree, FDDI_P_DHOST, 6, "Destination: %s (%s)",
+ fh_tree = proto_tree_new();
+ proto_item_add_subtree(ti, fh_tree, ETT_FDDI);
+ proto_tree_add_item(fh_tree, FDDI_P_FC, 1, "Frame Control: 0x%02x", fc);
+ proto_tree_add_item(fh_tree, FDDI_P_DHOST, 6, "Destination: %s (%s)",
ether_to_str(dst), get_ether_name(dst));
- add_item_to_tree(fh_tree, FDDI_P_SHOST, 6, "Source: %s (%s)",
+ proto_tree_add_item(fh_tree, FDDI_P_SHOST, 6, "Source: %s (%s)",
ether_to_str(src), get_ether_name(src));
}