From: Ralph Ronnquist Date: Thu, 29 Sep 2022 05:51:57 +0000 (+1000) Subject: fixup startup error message X-Git-Tag: 1.5.3~4 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=2df8ce02843318715c59343b73e258d1c318febb;p=rrq%2Frrqnet.git fixup startup error message --- diff --git a/rrqnet.c b/rrqnet.c index fa8d3f6..efd7066 100644 --- a/rrqnet.c +++ b/rrqnet.c @@ -574,6 +574,7 @@ static int parse_bits(char *bits,int max,struct Allowed *into) { // Formats: [/][:][=keyfile] // Formats: [/][=keyfile] // Formats: \[[/]\][:][=keyfile] +// Formats: hostname:port[=keyfile] static int parse_allowed(char *arg,struct Allowed *into) { static char buffer[10000]; int n = strlen( arg ); @@ -1309,10 +1310,10 @@ static void heartbeat(int fd) { // Tell how to use this program and exit with failure. static void usage(void) { fprintf( stderr, "Packet tunneling over UDP, multiple channels, " ); - fprintf( stderr, "version 0.2.5\n" ); + fprintf( stderr, "version 1.5.3\n" ); fprintf( stderr, "Usage: " ); fprintf( stderr, - "%s [-v] [-4] [-B n] [-T n] [-m mcast] [-t tap] port [remote]+ \n", + "%s [-v] [-tpg] [-4] [-B n] [-T n] [-m mcast] [-t tap] port [remote]+ \n", progname ); exit( 1 ); } @@ -1473,7 +1474,7 @@ int main(int argc, char *argv[]) { } // then: required port if ( sscanf( argv[i++], "%d", &port ) != 1 ) { - fprintf( stderr, "Bad local port" ); + fprintf( stderr, "Bad local port: %s\n", argv[i-1] ); usage(); } // then: any number of allowed remotes