aboutsummaryrefslogtreecommitdiffstats
path: root/packet-arp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-09-12 06:11:51 +0000
committerGuy Harris <guy@alum.mit.edu>1999-09-12 06:11:51 +0000
commit55dff94484c61dce121553db3e0b0a709b7fa89b (patch)
tree54d4019a09a818e5bb4040336fd2a36bd0e9a2f3 /packet-arp.c
parent0041a76bfcd5098595c7991001b09665a36943cd (diff)
Add summary-vs-detail radio buttons to the print dialog box; detail
prints the protocol tree, and summary prints the fields in the summary clist, with a header line at the beginning of the printout. Print only packets selected by the current packet filter. Just have "ARP" and "RARP" in the "Protocol" field for ARP packets; whether it's a request or a reply can be seen in the "Info" field. Add to the "Frame" section of the protocol tree the time between the current packet and the previous displayed packet, and the packet number. Have FT_RELATIVE_TIME fields be a "struct timeval", and display them as seconds and fractional seconds (we didn't have any fields of that type, and that type of time fits the delta time above). Add an FT_DOUBLE field type (although we don't yet have anything using it). svn path=/trunk/; revision=666
Diffstat (limited to 'packet-arp.c')
-rw-r--r--packet-arp.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/packet-arp.c b/packet-arp.c
index f510db9a8f..c77d901dc1 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.16 1999/07/30 05:42:25 guy Exp $
+ * $Id: packet-arp.c,v 1.17 1999/09/12 06:11:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -188,10 +188,19 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
tpa_str = arpproaddr_to_str((guint8 *) &pd[tpa_offset], ar_pln, ar_pro);
if (check_col(fd, COL_PROTOCOL)) {
- if ((op_str = match_strval(ar_op, op_vals)))
- col_add_str(fd, COL_PROTOCOL, op_str);
- else
+ switch (ar_op) {
+
+ case ARPOP_REQUEST:
+ case ARPOP_REPLY:
+ default:
col_add_str(fd, COL_PROTOCOL, "ARP");
+ break;
+
+ case ARPOP_RREQUEST:
+ case ARPOP_RREPLY:
+ col_add_str(fd, COL_PROTOCOL, "RARP");
+ break;
+ }
}
if (check_col(fd, COL_INFO)) {