aboutsummaryrefslogtreecommitdiffstats
path: root/packet-aarp.c
diff options
context:
space:
mode:
authorgram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>1999-07-29 05:47:07 +0000
committergram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>1999-07-29 05:47:07 +0000
commit58d1dbf1eaaf8b1b10b6f8280b77c43e63bc22b2 (patch)
tree3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-aarp.c
parent2c76c5f80357503a8290e43f9bae69dc026ac54b (diff)
Made the protocol (but not the fields) use the new proto_tree routine,
allowing users to filter on the existence of these protocols. I also added packet-clip.c to the Nmake makefile. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@402 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-aarp.c')
-rw-r--r--packet-aarp.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/packet-aarp.c b/packet-aarp.c
index 053ab0b3ba..148dd93ceb 100644
--- a/packet-aarp.c
+++ b/packet-aarp.c
@@ -31,6 +31,8 @@
#include "packet.h"
#include "etypes.h"
+static int proto_aarp = -1;
+
typedef struct _e_ether_aarp {
guint16 htype, ptype;
guint8 halen, palen;
@@ -96,9 +98,9 @@ dissect_aarp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
if (tree) {
if ((op_str = match_strval(ea.op, op_vals)))
- ti = proto_tree_add_text(tree, offset, 28, op_str);
+ ti = proto_tree_add_item_format(tree, proto_aarp, offset, 28, NULL, op_str);
else
- ti = proto_tree_add_text(tree, offset, 28,
+ ti = proto_tree_add_item_format(tree, proto_aarp, offset, 28, NULL,
"Unknown AARP (opcode 0x%04x)", ea.op);
aarp_tree = proto_item_add_subtree(ti, ETT_AARP);
proto_tree_add_text(aarp_tree, offset, 2,
@@ -145,3 +147,15 @@ dissect_aarp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
}
}
}
+
+void
+proto_register_aarp(void)
+{
+/* static hf_register_info hf[] = {
+ { &variable,
+ { "Name", "aarp.abbreviation", TYPE, VALS_POINTER }},
+ };*/
+
+ proto_aarp = proto_register_protocol("Appletalk Address Resolution Protocol", "aarp");
+ /* proto_register_field_array(proto_aarp, hf, array_length(hf));*/
+}