diff options
Diffstat (limited to 'packet-arp.c')
-rw-r--r-- | packet-arp.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/packet-arp.c b/packet-arp.c index b3ddf2149d..4ae66b30ca 100644 --- a/packet-arp.c +++ b/packet-arp.c @@ -1,7 +1,7 @@ /* packet-arp.c * Routines for ARP packet disassembly * - * $Id: packet-arp.c,v 1.14 1999/07/07 22:51:40 gram Exp $ + * $Id: packet-arp.c,v 1.15 1999/07/29 05:46:52 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -35,6 +35,8 @@ #include "packet.h" #include "etypes.h" +static int proto_arp = -1; + /* Definitions taken from Linux "linux/if_arp.h" header file, and from http://www.isi.edu/in-notes/iana/assignments/arp-parameters @@ -216,10 +218,10 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { if (tree) { if ((op_str = match_strval(ar_op, op_vals))) - ti = proto_tree_add_text(tree, offset, 8 + 2*ar_hln + 2*ar_pln, + ti = proto_tree_add_item_format(tree, proto_arp, offset, 8 + 2*ar_hln + 2*ar_pln, op_str); else - ti = proto_tree_add_text(tree, offset, 8 + 2*ar_hln + 2*ar_pln, + ti = proto_tree_add_item_format(tree, proto_arp, offset, 8 + 2*ar_hln + 2*ar_pln, "Unknown ARP (opcode 0x%04x)", ar_op); arp_tree = proto_item_add_subtree(ti, ETT_ARP); proto_tree_add_text(arp_tree, offset + AR_HRD, 2, @@ -242,3 +244,15 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { "Target protocol address: %s", tpa_str); } } + +void +proto_register_arp(void) +{ +/* static hf_register_info hf[] = { + { &variable, + { "Name", "arp.abbreviation", TYPE, VALS_POINTER }}, + };*/ + + proto_arp = proto_register_protocol("Address Resolution Protocol", "arp"); + /* proto_register_field_array(proto_arp, hf, array_length(hf));*/ +} |