From 9000f5d67a2bab28ae925b54f6b8a6508dc77ea2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 5 Apr 2024 22:44:30 +0200 Subject: minor cleanups. Breaks proxy.c --- opentracker.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index 9f99363..2108a98 100644 --- a/opentracker.c +++ b/opentracker.c @@ -48,7 +48,7 @@ static char * g_serverdir; static char * g_serveruser; static unsigned int g_udp_workers; -static void panic( const char *routing ) __attribute__ ((noreturn)); +static void panic( const char *routine ) __attribute__ ((noreturn)); static void panic( const char *routine ) { fprintf( stderr, "%s: %s\n", routine, strerror(errno) ); exit( 111 ); @@ -118,9 +118,9 @@ static void help( char *name ) { usage( name ); HELPLINE("-f config","include and execute the config file"); - HELPLINE("-i ip","specify ip to bind to (default: *, you may specify more than one)"); - HELPLINE("-p port","specify tcp port to bind to (default: 6969, you may specify more than one)"); - HELPLINE("-P port","specify udp port to bind to (default: 6969, you may specify more than one)"); + HELPLINE("-i ip","specify ip to bind to with next -[pP] (default: any, overrides preceeding ones)"); + HELPLINE("-p port","do bind to tcp port (default: 6969, you may specify more than one)"); + HELPLINE("-P port","do bind to udp port (default: 6969, you may specify more than one)"); HELPLINE("-r redirecturl","specify url where / should be redirected to (default none)"); HELPLINE("-d dir","specify directory to try to chroot to (default: \".\")"); HELPLINE("-u user","specify user under whose privileges opentracker should run (default: \"nobody\")"); @@ -132,6 +132,9 @@ static void help( char *name ) { #endif fprintf( stderr, "\nExample: ./opentracker -i 127.0.0.1 -p 6969 -P 6969 -f ./opentracker.conf -i 10.1.1.23 -p 2710 -p 80\n" ); + fprintf( stderr, " Here -i 127.0.0.1 selects the ip address for the next -p 6969 and -P 6969.\n"); + fprintf( stderr, " If no port is bound from config file or command line, the last address given\n"); + fprintf( stderr, " (or ::1 if none is set) will be used on port 6969.\n"); } #undef HELPLINE -- cgit v1.2.3