// Formats: <ipv4-address>[/<bits>][:<port>][=keyfile]
// Formats: <ipv6-address>[/<bits>][=keyfile]
// Formats: \[<ipv6-address>[/<bits>]\][:<port>][=keyfile]
+// Formats: hostname:port[=keyfile]
static int parse_allowed(char *arg,struct Allowed *into) {
static char buffer[10000];
int n = strlen( arg );
// 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 );
}
}
// 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