aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1998-12-04 05:59:14 +0000
committerGuy Harris <guy@alum.mit.edu>1998-12-04 05:59:14 +0000
commit7dd4f76f59579f4ac1ae8343d5e049ce3fe8191f (patch)
tree0a0c6d9499666e278cafdcbcf3098c8051059909 /packet.c
parent5274503f24eed25a020c3a004be4d7d9d61cd0e0 (diff)
When dissecting DNS or NBNS queries or replies, add the item to the tree
for the queries or replies first, then create and add the subtree and populate it, and, when that's done, set the length of the item appropriately; if you add the subtree later, the subtree's top-level node appears to have level 0, rather than 1 greater than the tree of which it's a subtree, which causes those trees not to print correctly. svn path=/trunk/; revision=122
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index 0c4a5c6d75..7e67701fb0 100644
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.12 1998/11/18 03:01:38 gerald Exp $
+ * $Id: packet.c,v 1.13 1998/12/04 05:59:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -168,6 +168,12 @@ add_item_to_tree(GtkWidget *tree, gint start, gint len,
}
void
+set_item_len(GtkWidget *ti, gint len)
+{
+ gtk_object_set_data(GTK_OBJECT(ti), E_TREEINFO_LEN_KEY, (gpointer) len);
+}
+
+void
add_subtree(GtkWidget *ti, GtkWidget *subtree, gint idx) {
static gint tree_type[NUM_TREE_TYPES];