aboutsummaryrefslogtreecommitdiffstats
path: root/packet-arp.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>1998-10-16 01:18:35 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>1998-10-16 01:18:35 +0000
commita3d425996f213ae9081e4153549b42199d0ae97a (patch)
tree530004cda45554c7702e232392c8e791bc3a3baf /packet-arp.c
parent400f44cad5bf7e0d2225fcf6fd4b35702afb8411 (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) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@61 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-arp.c')
-rw-r--r--packet-arp.c8
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,