summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-03-25 09:18:03 +0000
committerGuy Harris <guy@alum.mit.edu>2004-03-25 09:18:03 +0000
commita6ed2d499af391480d9853833e22f153c502dc4b (patch)
tree84080b769cb16a9533d179fc4a231192c7c83b20 /epan
parent7b109873f4263b97155419bb1f07111bb8adecb3 (diff)
downloadwireshark-a6ed2d499af391480d9853833e22f153c502dc4b.tar.gz
From Tomas Kukosa: BER dissector enhancements and proto.c updates to
support them. From Ronnie Sahlberg: Kerberos updates with new constants from the current draft, decryption and dissection of Kerberos blobs, and changes to work with the changed BER dissector. svn path=/trunk/; revision=10479
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c21
-rw-r--r--epan/proto.h8
2 files changed, 27 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c
index c43013b12c..cf80391f07 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.129 2004/01/03 18:40:08 sharpe Exp $
+ * $Id: proto.c,v 1.130 2004/03/25 09:17:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2174,6 +2174,25 @@ proto_item_add_subtree(proto_item *pi, gint idx) {
return (proto_tree*) pi;
}
+proto_tree*
+proto_item_get_subtree(proto_item *pi) {
+ field_info *fi;
+
+ if (!pi)
+ return(NULL);
+ fi = PITEM_FINFO(pi);
+ if (fi->tree_type == -1)
+ return(NULL);
+ return (proto_tree*) pi;
+}
+
+proto_item*
+proto_tree_get_parent(proto_tree *tree) {
+ if (!tree)
+ return (NULL);
+ return (proto_item*) tree;
+}
+
static gint
proto_match_short_name(gconstpointer p_arg, gconstpointer name_arg)
{
diff --git a/epan/proto.h b/epan/proto.h
index 3f8278bcb8..30532a9ba0 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.55 2004/01/03 18:40:08 sharpe Exp $
+ * $Id: proto.h,v 1.56 2004/03/25 09:17:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -205,6 +205,12 @@ extern void proto_tree_free(proto_tree *tree);
/* Create a subtree under an existing item; returns tree pointer */
extern proto_tree* proto_item_add_subtree(proto_item *ti, gint idx);
+/* Get a subtree under an item; returns tree pointer */
+extern proto_tree* proto_item_get_subtree(proto_item *ti);
+
+/* Get a parent item of subtree; returns item pointer */
+extern proto_item* proto_tree_get_parent(proto_tree *tree);
+
extern int
proto_register_field(char *name, char *abbrev, enum ftenum type, int parent,
struct _value_string* vals);