command line options for layer23 apps
Andreas.Eversberg
Andreas.Eversberg at versatel.de
Tue Oct 26 14:35:36 CEST 2010
hi,
i like to change the handling of command line options in layer23
applications, because different layer23 applications require different
individual options, and common options also. (e.g. the "mobile"
application does not required "--arfcn" option, but "--vty-port". others
do not require "--vty-port", but might require a "--gps-device". all
apps together require "--socket" and "--gsmtap-ip".)
therefore i like to leave all common options in common/main.c.
additional options i like to put in the individual app_*.c files. each
options i like to check at the individual app file. if it doesn't exist
there, the main.c checks if the option is a common option:
...
c = l23_app_handle_options();
if (c == -1)
c = getopt_long(argc, argv, "hs:S:a:i:v:d:",
long_options, &option_index);
if (c == -1)
break;
...
an individual help for each application:
l23_app_print_help();
any suggestions or complains?
best regards,
andreas
More information about the baseband-devel
mailing list