#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>
return ts->s_port; /* returns it in network byte order */
}
-MainCommand(as, arock)
+int MainCommand(as, arock)
char *arock;
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",
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);
#ifndef AFS_NT40_ENV
#include "AFS_component_version_number.c"
#endif
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
{