diff options
author | Gerald Combs <gerald@wireshark.org> | 1998-10-16 01:18:35 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 1998-10-16 01:18:35 +0000 |
commit | 349f96bb49fabf8ada49bb3a258518ed8c472076 (patch) | |
tree | 530004cda45554c7702e232392c8e791bc3a3baf /packet-arp.c | |
parent | 5a35314f8034441930fe7caa8de6b8e7dec4ae7a (diff) |
* Copied in the correct GNU license (I'm such a goober)
* Hacks to the filter interface (Gerald)
* About box (Laurent)
* AppleTalk support (Simon)
* Mods to the match_strval routine (Gerald)
svn path=/trunk/; revision=61
Diffstat (limited to 'packet-arp.c')
-rw-r--r-- | packet-arp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-arp.c b/packet-arp.c index c48e5efa6b..5af5b554fb 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.6 1998/10/13 05:20:53 guy Exp $ + * $Id: packet-arp.c,v 1.7 1998/10/16 01:18:30 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -52,8 +52,8 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { static value_string op_vals[] = { {ARPOP_REQUEST, "ARP request" }, {ARPOP_REPLY, "ARP reply" }, {ARPOP_RREQUEST, "RARP request"}, - {ARPOP_RREPLY, "RARP reply" } }; -#define N_OP_VALS (sizeof op_vals / sizeof op_vals[0]) + {ARPOP_RREPLY, "RARP reply" }, + {0, NULL } }; /* To do: Check for {cap len,pkt len} < struct len */ ea.ar_hrd = pntohs(&pd[offset]); @@ -69,7 +69,7 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, GtkTree *tree) { if (fd->win_info[COL_NUM]) { strcpy(fd->win_info[COL_PROTOCOL], "ARP"); } if (tree) { - if ((op_str = match_strval(ea.ar_op, op_vals, N_OP_VALS))) + if ((op_str = match_strval(ea.ar_op, op_vals))) ti = add_item_to_tree(GTK_WIDGET(tree), offset, 28, op_str); else ti = add_item_to_tree(GTK_WIDGET(tree), offset, 28, |