rx-rxdebug-long-option-20070215

add the -long option from src/rxdebug/rxdebug.c to src/rx/rdebug.c
This commit is contained in:
Jeffrey Altman 2007-02-15 11:47:24 +00:00
parent 1f530ff095
commit 2e6a87e109

View 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);