aboutsummaryrefslogtreecommitdiffstats
path: root/packet-sap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-31 05:09:07 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-05-31 05:09:07 +0000
commite41a093685c520e2a86e4391a3e39168b13f7d24 (patch)
treeb451d4a712d9b914022ba872296e70e55b8d9bc5 /packet-sap.c
parentd3cf6abccf0b2b9fbcac9e89a2c3a889c4289eb1 (diff)
Add routines for adding items to a protocol tree that take arguments of
a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2031 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-sap.c')
-rw-r--r--packet-sap.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/packet-sap.c b/packet-sap.c
index 99d9bea9fa..61723e45ee 100644
--- a/packet-sap.c
+++ b/packet-sap.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-sap.c,v 1.7 2000/05/11 08:15:43 gram Exp $
+ * $Id: packet-sap.c,v 1.8 2000/05/31 05:07:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -154,17 +154,17 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
if (tree) {
- si = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, NULL);
+ si = proto_tree_add_item(tree, proto_sap, NullTVB, offset, END_OF_FRAME, FALSE);
sap_tree = proto_item_add_subtree(si, ett_sap);
- sif = proto_tree_add_item(sap_tree, hf_sap_flags, NullTVB, offset, 1, pd[offset]);
+ sif = proto_tree_add_uint(sap_tree, hf_sap_flags, NullTVB, offset, 1, pd[offset]);
sap_flags_tree = proto_item_add_subtree(sif, ett_sap_flags);
- proto_tree_add_item(sap_flags_tree, hf_sap_flags_v, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(sap_flags_tree, hf_sap_flags_a, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(sap_flags_tree, hf_sap_flags_r, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(sap_flags_tree, hf_sap_flags_t, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(sap_flags_tree, hf_sap_flags_e, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(sap_flags_tree, hf_sap_flags_c, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_uint(sap_flags_tree, hf_sap_flags_v, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_a, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_r, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_t, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_e, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_boolean(sap_flags_tree, hf_sap_flags_c, NullTVB, offset, 1, pd[offset]);
offset++;
proto_tree_add_text(sap_tree, NullTVB, offset, 1, "Authentication Length: %u", pd[offset]);
@@ -189,14 +189,14 @@ dissect_sap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
auth_data_len = auth_len * sizeof(guint32);
- sdi = proto_tree_add_item(sap_tree, hf_auth_data, NullTVB, offset, auth_data_len, pd[offset]);
+ sdi = proto_tree_add_item(sap_tree, hf_auth_data, NullTVB, offset, auth_data_len, FALSE);
sa_tree = proto_item_add_subtree(sdi, ett_sap_auth);
- sai = proto_tree_add_item(sa_tree, hf_auth_flags, NullTVB, offset, 1, pd[offset]);
+ sai = proto_tree_add_uint(sa_tree, hf_auth_flags, NullTVB, offset, 1, pd[offset]);
saf_tree = proto_item_add_subtree(sai, ett_sap_authf);
- proto_tree_add_item(saf_tree, hf_auth_flags_v, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(saf_tree, hf_auth_flags_p, NullTVB, offset, 1, pd[offset]);
- proto_tree_add_item(saf_tree, hf_auth_flags_t, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_uint(saf_tree, hf_auth_flags_v, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_boolean(saf_tree, hf_auth_flags_p, NullTVB, offset, 1, pd[offset]);
+ proto_tree_add_uint(saf_tree, hf_auth_flags_t, NullTVB, offset, 1, pd[offset]);
has_pad = pd[offset]&MCAST_SAP_AUTH_BIT_P;
if (has_pad) pad_len = *(pd+offset+auth_data_len-1);