rx-warning-cleanup-and-afsconfig-20010605
[openafs.git] / src / rx / rxdebug.c
index c9ec3fc..1ec3eb2 100644 (file)
@@ -18,7 +18,9 @@
 #include <netdb.h>
 #include <netinet/in.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
+#include <string.h>
 #include <sys/stat.h>
 #include <afs/stds.h>
 #include <afs/cmd.h>
@@ -60,7 +62,7 @@ register char *aname;
     return ts->s_port; /* returns it in network byte order */
 }
 
-MainCommand(as, arock)
+int MainCommand(as, arock)
 char *arock;
 struct cmd_syndesc *as;
 {
@@ -463,6 +465,9 @@ struct cmd_syndesc *as;
                break;
            }
 
+           if ((onlyHost != -1) && (onlyHost != tpeer.host)) continue;
+           if ((onlyPort != -1) && (onlyPort != tpeer.port)) continue;
+
            /* now display the peer */
            hostAddr.s_addr = tpeer.host;
            printf("Peer at host %s, port %hu\n",
@@ -475,6 +480,10 @@ struct cmd_syndesc *as;
                   tpeer.bytesSent.high, tpeer.bytesSent.low);
            printf("\tbytes received high %d low %d\n",
                   tpeer.bytesReceived.high, tpeer.bytesReceived.low);
+           printf("\trtt %d msec, rtt_dev %d msec\n",
+                  tpeer.rtt >> 3, tpeer.rtt_dev >> 2);
+           printf("\ttimeout %d.%03d sec\n",
+                  tpeer.timeout.sec, tpeer.timeout.usec / 1000);
        }
     }
     exit(0);
@@ -484,7 +493,7 @@ struct cmd_syndesc *as;
 #ifndef AFS_NT40_ENV
 #include "AFS_component_version_number.c"
 #endif
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {