diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-07-29 05:47:07 +0000 |
commit | 7bd6c15378e920f89c76cd3beeb7e8bcf6a164e3 (patch) | |
tree | 3e8a46fe6f7bb69698edb1187655e445bbfda37c /packet-aarp.c | |
parent | 6f1d3a3be830da628246f7cea77fe9c491470d17 (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.
svn path=/trunk/; revision=402
Diffstat (limited to 'packet-aarp.c')
-rw-r--r-- | packet-aarp.c | 18 |
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));*/ +} |