command line options for layer23 apps

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Andreas.Eversberg Andreas.Eversberg at versatel.de
Tue Oct 26 12:35:36 UTC 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