summaryrefslogtreecommitdiffstats
path: root/tools/tools/netrate/tcpp/tcpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tools/netrate/tcpp/tcpp.c')
-rw-r--r--tools/tools/netrate/tcpp/tcpp.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/tools/tools/netrate/tcpp/tcpp.c b/tools/tools/netrate/tcpp/tcpp.c
index ed76305..a194c3d 100644
--- a/tools/tools/netrate/tcpp/tcpp.c
+++ b/tools/tools/netrate/tcpp/tcpp.c
@@ -51,7 +51,7 @@
struct sockaddr_in remoteip; /* Base target address. */
struct sockaddr_in localipbase; /* Base local address, if -l. */
-int cflag, lflag, mflag, pflag, sflag, tflag, Cflag, Mflag, Pflag, Tflag;
+int cflag, hflag, lflag, mflag, pflag, sflag, tflag, Mflag, Pflag;
uint64_t bflag;
u_short rflag;
@@ -61,7 +61,8 @@ usage(void)
fprintf(stderr, "client: tcpp"
" -c remoteIP"
- " [-CPT]"
+ " [-h]"
+ " [-P]"
" [-M localIPcount]"
" [-l localIPbase]"
"\n\t"
@@ -76,7 +77,7 @@ usage(void)
fprintf(stderr, "server: tcpp"
" -s"
- " [-PT]"
+ " [-P]"
" [-l localIPbase]"
" [-m maxtcpsatonce]"
" [-p procs]"
@@ -112,7 +113,7 @@ main(int argc, char *argv[])
rflag = BASEPORT_DEFAULT;
tflag = TCPS_DEFAULT;
Mflag = 1;
- while ((ch = getopt(argc, argv, "b:c:l:m:p:r:st:CM:PT")) != -1) {
+ while ((ch = getopt(argc, argv, "b:c:hl:m:p:r:st:CM:PT")) != -1) {
switch (ch) {
case 'b':
ll = strtoll(optarg, &dummy, 10);
@@ -127,6 +128,10 @@ main(int argc, char *argv[])
err(-1, "inet_aton: %s", optarg);
break;
+ case 'h':
+ hflag++;
+ break;
+
case 'l':
lflag++;
if (inet_aton(optarg, &localipbase.sin_addr) != 1)
@@ -165,10 +170,6 @@ main(int argc, char *argv[])
tflag = ll;
break;
- case 'C':
- Cflag++;
- break;
-
case 'M':
ll = strtoll(optarg, &dummy, 10);
if (*dummy != '\0' || ll <= 1)
@@ -184,10 +185,6 @@ main(int argc, char *argv[])
errx(EX_USAGE, "-P current unsupported");
#endif
- case 'T':
- Tflag++;
- break;
-
default:
usage();
}
@@ -204,7 +201,7 @@ main(int argc, char *argv[])
usage();
/* Several flags are valid only on the client, disallow if server. */
- if (sflag && (Cflag || Mflag > 1))
+ if (sflag && (hflag || Mflag > 1))
usage();
if (cflag)
OpenPOWER on IntegriCloud