]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-rx-rxdebug-long-option-20070215
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 15 Feb 2007 11:49:17 +0000 (11:49 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 15 Feb 2007 11:49:17 +0000 (11:49 +0000)
add the -long option from src/rxdebug/rxdebug.c to src/rx/rdebug.c

(cherry picked from commit 2e6a87e109bbab2cb242f58bcfce0ba1d92a41de)

src/rx/rxdebug.c

index b9e6e7de3bf96e26a641c49558bf5f072fe2f9a9..a42f5c708353931d80e3a7aa3c33c1308c67f4e1 100644 (file)
@@ -21,6 +21,7 @@ RCSID
 #include <sys/socket.h>
 #include <sys/file.h>
 #include <netdb.h>
+#include <arpa/inet.h>
 #endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
@@ -53,6 +54,8 @@ RCSID
 
 #define        TIMEOUT     20
 
+extern struct hostent *hostutil_GetHostByName();
+
 static short
 PortNumber(aport)
      register char *aport;
@@ -117,6 +120,7 @@ MainCommand(as, arock)
     struct rx_debugConn tconn;
     short noConns;
     short showPeers;
+    short showLong;
     int version_flag;
     char version[64];
     afs_int32 length = 64;
@@ -136,6 +140,7 @@ MainCommand(as, arock)
     version_flag = (as->parms[10].items ? 1 : 0);
     noConns = (as->parms[11].items ? 1 : 0);
     showPeers = (as->parms[12].items ? 1 : 0);
+    showLong = (as->parms[13].items ? 1 : 0);
 
     if (as->parms[0].items)
        hostName = as->parms[0].items->data;
@@ -563,6 +568,16 @@ MainCommand(as, arock)
                   tpeer.rtt_dev >> 2);
            printf("\ttimeout %u.%03u sec\n", tpeer.timeout.sec,
                   tpeer.timeout.usec / 1000);
+           if (!showLong)
+               continue;
+
+           printf("\tin/out packet skew: %d/%d\n", tpeer.inPacketSkew,
+                   tpeer.outPacketSkew);
+           printf("\tcongestion window %d, MTU %d\n", tpeer.cwind,
+                  tpeer.MTU);
+           printf("\tcurrent/if/max jumbogram size: %d/%d/%d\n",
+                  tpeer.nDgramPackets, tpeer.ifDgramPackets,
+                  tpeer.maxDgramPackets);
        }
     }
     exit(0);
@@ -613,6 +628,7 @@ main(argc, argv)
     cmd_AddParm(ts, "-noconns", CMD_FLAG, CMD_OPTIONAL,
                "show no connections");
     cmd_AddParm(ts, "-peers", CMD_FLAG, CMD_OPTIONAL, "show peers");
+    cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "detailed output");
 
     cmd_Dispatch(argc, argv);
     exit(0);