diff --git a/infrastructure-centred/owlps-listener/owlps-listener.h b/infrastructure-centred/owlps-listener/owlps-listener.h index 394d1c0..e5a0afd 100644 --- a/infrastructure-centred/owlps-listener/owlps-listener.h +++ b/infrastructure-centred/owlps-listener/owlps-listener.h @@ -46,7 +46,7 @@ /* Arguments & program configuration */ -#define OPTIONS "d:f:kl:m:p:qr:vw:" // getopt string +#define OPTIONS "d:f:hkl:m:p:qr:vw:" // getopt string #define DEFAULT_CONFIG_FILE "/usr/local/etc/owlps/owlps-listener.conf" enum {MODE_ACTIVE = 'a', MODE_PASSIVE = 'p', MODE_MIXED = 'm'} ; diff --git a/infrastructure-centred/owlps-listener/owlps-listenerd.c b/infrastructure-centred/owlps-listener/owlps-listenerd.c index 47b0023..3e4c082 100644 --- a/infrastructure-centred/owlps-listener/owlps-listenerd.c +++ b/infrastructure-centred/owlps-listener/owlps-listenerd.c @@ -140,6 +140,9 @@ int main(int argc, char *argv[]) break ; case 'f' : // Config file break ; // (already parsed) + case 'h' : + print_usage(argv[0]) ; + exit(0) ; case 'k' : #ifdef USE_PTHREAD SET_KEEP_MONITOR() ; @@ -692,6 +695,7 @@ void print_usage(char *prog) " [-w wifi_iface] [-k] [-v | -q]\n" "Main options:\n" + "\t-h\t\tPrint this help.\n" "\t-f config_file\tUse 'config_file' instead of the default" " configuration file (%s). Available only if program was" " compiled with libconfuse.\n"