]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Make the handling of the -v flag a little more sensible, and document it.
authorkenh <kenh>
Thu, 10 Feb 2000 17:56:13 +0000 (17:56 +0000)
committerkenh <kenh>
Thu, 10 Feb 2000 17:56:13 +0000 (17:56 +0000)
print-rx.c
tcpdump.1

index 85639468d0264fe96912a4d14007d09581de438f..e1ddaec067cedf630f3fe48145c50c8302bc4fc5 100644 (file)
@@ -13,7 +13,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.10 2000-02-09 16:29:00 kenh Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.11 2000-02-10 17:56:13 kenh Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -417,28 +417,35 @@ rx_print(register const u_char *bp, int length, int sport, int dport,
 
        printf(" rx %s", tok2str(rx_types, "type %d", rxh->type));
 
-       if (vflag > 1) {
+       if (vflag) {
                int firstflag = 0;
-               printf(" cid %08x call# %d seq %d ser %d",
-                      (int) EXTRACT_32BITS(&rxh->cid),
-                      (int) EXTRACT_32BITS(&rxh->callNumber),
+
+               if (vflag > 1)
+                       printf(" cid %08x call# %d",
+                              (int) EXTRACT_32BITS(&rxh->cid),
+                              (int) EXTRACT_32BITS(&rxh->callNumber));
+
+               printf(" seq %d ser %d",
                       (int) EXTRACT_32BITS(&rxh->seq),
                       (int) EXTRACT_32BITS(&rxh->serial));
+
                if (vflag > 2)
                        printf(" secindex %d serviceid %hu",
                                (int) rxh->securityIndex,
                                EXTRACT_16BITS(&rxh->serviceId));
-               for (i = 0; i < NUM_RX_FLAGS; i++) {
-                       if (rxh->flags & rx_flags[i].v) {
-                               if (!firstflag) {
-                                       firstflag = 1;
-                                       printf(" ");
-                               } else {
-                                       printf(",");
+
+               if (vflag > 1)
+                       for (i = 0; i < NUM_RX_FLAGS; i++) {
+                               if (rxh->flags & rx_flags[i].v) {
+                                       if (!firstflag) {
+                                               firstflag = 1;
+                                               printf(" ");
+                                       } else {
+                                               printf(",");
+                                       }
+                                       printf("<%s>", rx_flags[i].s);
                                }
-                               printf("<%s>", rx_flags[i].s);
                        }
-               }
        }
 
        /*
index d5cda88d91ad549022f5100448dd430188395840..b727f188485ed4c166b3ec768c4c31d571f91fc8 100644 (file)
--- a/tcpdump.1
+++ b/tcpdump.1
@@ -1,4 +1,4 @@
-.\" @(#) $Header: /tcpdump/master/tcpdump/Attic/tcpdump.1,v 1.75 2000-01-29 16:39:27 itojun Exp $ (LBL)
+.\" @(#) $Header: /tcpdump/master/tcpdump/Attic/tcpdump.1,v 1.76 2000-02-10 17:56:14 kenh Exp $ (LBL)
 .\"
 .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
 .\"    The Regents of the University of California.  All rights reserved.
@@ -1149,11 +1149,14 @@ The format is intended to be self-describing, but it will probably
 not be useful to people who are not familiar with the workings of
 AFS and RX.
 .LP
-If the -v (verbose) flag is given twice, additional information is printed,
-such as the the RX call ID, call number, sequence number, serial number,
-and the RX packet flags.
+If the -v (verbose) flag is given, the RX call number and sequence number
+are printed.
+.LP
+If the -v flag is given twice, additional information is printed.
+such as the the RX call ID, serial number, and the RX packet flags.
+The MTU negotiation information is also printed from RX ack packets.
 .LP
-If the -v flag is given again, the security index and service id are printed.
+If the -v flag three times, the security index and service id are printed.
 .LP
 Error codes are printed for abort packets, with the exception of Ubik
 beacon packets (because abort packets are used to signify a yes vote