diff --git a/src/iperf_api.c b/src/iperf_api.c index 11a9c70..a178adb 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -59,6 +59,12 @@ usage_long() } +void warning(char *str) +{ + fprintf(stderr, "warning: %s\n", str); +} + + /********************** Get/set test protocol structure ***********************/ struct protocol * @@ -242,8 +248,11 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv) break; case 'u': if (test->role == 's') { + warning("ignoring client only argument --udp (-u)"); + /* XXX: made a warning i_errno = IECLIENTONLY; return (-1); + */ } set_protocol(test, Pudp); test->settings->blksize = DEFAULT_UDP_BLKSIZE; diff --git a/src/iperf_api.h b/src/iperf_api.h index 60ac67e..d2e49d9 100644 --- a/src/iperf_api.h +++ b/src/iperf_api.h @@ -99,6 +99,7 @@ int iperf_recv(struct iperf_test *); void sig_handler(int); void usage(); void usage_long(); +void warning(char *); int all_data_sent(struct iperf_test *); int package_parameters(struct iperf_test *); int parse_parameters(struct iperf_test *);