command line options for layer23 apps

Andreas.Eversberg Andreas.Eversberg at
Tue Oct 26 12:35:36 UTC 2010

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)
an individual help for each application:
any suggestions or complains?
best regards,

More information about the baseband-devel mailing list