jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 1 | /* cmdline.h */ |
| 2 | |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 3 | /* File autogenerated by gengetopt version 2.17 */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 4 | |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 5 | #ifndef CMDLINE_H |
| 6 | #define CMDLINE_H |
| 7 | |
| 8 | /* If we use autoconf. */ |
| 9 | #ifdef HAVE_CONFIG_H |
| 10 | #include "config.h" |
| 11 | #endif |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif /* __cplusplus */ |
| 16 | |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 17 | #ifndef CMDLINE_PARSER_PACKAGE |
| 18 | #define CMDLINE_PARSER_PACKAGE PACKAGE |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 19 | #endif |
| 20 | |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 21 | #ifndef CMDLINE_PARSER_VERSION |
| 22 | #define CMDLINE_PARSER_VERSION VERSION |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 23 | #endif |
| 24 | |
| 25 | struct gengetopt_args_info |
| 26 | { |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 27 | const char *help_help; /* Print help and exit help description. */ |
| 28 | const char *version_help; /* Print version and exit help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 29 | int fg_flag; /* Run in foreground (default=off). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 30 | const char *fg_help; /* Run in foreground help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 31 | int debug_flag; /* Run in debug mode (default=off). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 32 | const char *debug_help; /* Run in debug mode help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 33 | char * conf_arg; /* Read configuration file (default='/etc/ggsn.conf'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 34 | char * conf_orig; /* Read configuration file original value given at command line. */ |
| 35 | const char *conf_help; /* Read configuration file help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 36 | char * pidfile_arg; /* Filename of process id file (default='/var/run/ggsn.pid'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 37 | char * pidfile_orig; /* Filename of process id file original value given at command line. */ |
| 38 | const char *pidfile_help; /* Filename of process id file help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 39 | char * statedir_arg; /* Directory of nonvolatile data (default='/var/lib/ggsn/'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 40 | char * statedir_orig; /* Directory of nonvolatile data original value given at command line. */ |
| 41 | const char *statedir_help; /* Directory of nonvolatile data help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 42 | char * listen_arg; /* Local interface. */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 43 | char * listen_orig; /* Local interface original value given at command line. */ |
| 44 | const char *listen_help; /* Local interface help description. */ |
jjako | a7cd249 | 2003-04-11 09:40:12 +0000 | [diff] [blame] | 45 | char * net_arg; /* Network (default='192.168.0.0/24'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 46 | char * net_orig; /* Network original value given at command line. */ |
| 47 | const char *net_help; /* Network help description. */ |
jjako | a7cd249 | 2003-04-11 09:40:12 +0000 | [diff] [blame] | 48 | char * ipup_arg; /* Script to run after link-up. */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 49 | char * ipup_orig; /* Script to run after link-up original value given at command line. */ |
| 50 | const char *ipup_help; /* Script to run after link-up help description. */ |
jjako | a7cd249 | 2003-04-11 09:40:12 +0000 | [diff] [blame] | 51 | char * ipdown_arg; /* Script to run after link-down. */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 52 | char * ipdown_orig; /* Script to run after link-down original value given at command line. */ |
| 53 | const char *ipdown_help; /* Script to run after link-down help description. */ |
jjako | a7c3381 | 2003-04-11 11:51:39 +0000 | [diff] [blame] | 54 | char * dynip_arg; /* Dynamic IP address pool. */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 55 | char * dynip_orig; /* Dynamic IP address pool original value given at command line. */ |
| 56 | const char *dynip_help; /* Dynamic IP address pool help description. */ |
jjako | a7c3381 | 2003-04-11 11:51:39 +0000 | [diff] [blame] | 57 | char * statip_arg; /* Static IP address pool. */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 58 | char * statip_orig; /* Static IP address pool original value given at command line. */ |
| 59 | const char *statip_help; /* Static IP address pool help description. */ |
jjako | a7cd249 | 2003-04-11 09:40:12 +0000 | [diff] [blame] | 60 | char * pcodns1_arg; /* PCO DNS Server 1 (default='0.0.0.0'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 61 | char * pcodns1_orig; /* PCO DNS Server 1 original value given at command line. */ |
| 62 | const char *pcodns1_help; /* PCO DNS Server 1 help description. */ |
jjako | a7cd249 | 2003-04-11 09:40:12 +0000 | [diff] [blame] | 63 | char * pcodns2_arg; /* PCO DNS Server 2 (default='0.0.0.0'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 64 | char * pcodns2_orig; /* PCO DNS Server 2 original value given at command line. */ |
| 65 | const char *pcodns2_help; /* PCO DNS Server 2 help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 66 | int timelimit_arg; /* Exit after timelimit seconds (default='0'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 67 | char * timelimit_orig; /* Exit after timelimit seconds original value given at command line. */ |
| 68 | const char *timelimit_help; /* Exit after timelimit seconds help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 69 | char * apn_arg; /* Access point name (default='internet'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 70 | char * apn_orig; /* Access point name original value given at command line. */ |
| 71 | const char *apn_help; /* Access point name help description. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 72 | int qos_arg; /* Requested quality of service (default='0x0b921f'). */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 73 | char * qos_orig; /* Requested quality of service original value given at command line. */ |
| 74 | const char *qos_help; /* Requested quality of service help description. */ |
| 75 | |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 76 | int help_given ; /* Whether help was given. */ |
| 77 | int version_given ; /* Whether version was given. */ |
| 78 | int fg_given ; /* Whether fg was given. */ |
| 79 | int debug_given ; /* Whether debug was given. */ |
| 80 | int conf_given ; /* Whether conf was given. */ |
| 81 | int pidfile_given ; /* Whether pidfile was given. */ |
| 82 | int statedir_given ; /* Whether statedir was given. */ |
| 83 | int listen_given ; /* Whether listen was given. */ |
| 84 | int net_given ; /* Whether net was given. */ |
jjako | a7cd249 | 2003-04-11 09:40:12 +0000 | [diff] [blame] | 85 | int ipup_given ; /* Whether ipup was given. */ |
| 86 | int ipdown_given ; /* Whether ipdown was given. */ |
| 87 | int dynip_given ; /* Whether dynip was given. */ |
| 88 | int statip_given ; /* Whether statip was given. */ |
| 89 | int pcodns1_given ; /* Whether pcodns1 was given. */ |
| 90 | int pcodns2_given ; /* Whether pcodns2 was given. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 91 | int timelimit_given ; /* Whether timelimit was given. */ |
| 92 | int apn_given ; /* Whether apn was given. */ |
| 93 | int qos_given ; /* Whether qos was given. */ |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 94 | |
| 95 | } ; |
| 96 | |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 97 | extern const char *gengetopt_args_info_purpose; |
| 98 | extern const char *gengetopt_args_info_usage; |
| 99 | extern const char *gengetopt_args_info_help[]; |
| 100 | |
| 101 | int cmdline_parser (int argc, char * const *argv, |
| 102 | struct gengetopt_args_info *args_info); |
| 103 | int cmdline_parser2 (int argc, char * const *argv, |
| 104 | struct gengetopt_args_info *args_info, |
| 105 | int override, int initialize, int check_required); |
| 106 | int cmdline_parser_file_save(const char *filename, |
| 107 | struct gengetopt_args_info *args_info); |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 108 | |
| 109 | void cmdline_parser_print_help(void); |
| 110 | void cmdline_parser_print_version(void); |
| 111 | |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 112 | void cmdline_parser_init (struct gengetopt_args_info *args_info); |
| 113 | void cmdline_parser_free (struct gengetopt_args_info *args_info); |
| 114 | |
| 115 | int cmdline_parser_configfile (char * const filename, |
| 116 | struct gengetopt_args_info *args_info, |
| 117 | int override, int initialize, int check_required); |
| 118 | |
| 119 | int cmdline_parser_required (struct gengetopt_args_info *args_info, |
| 120 | const char *prog_name); |
| 121 | |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 122 | |
| 123 | #ifdef __cplusplus |
| 124 | } |
| 125 | #endif /* __cplusplus */ |
Harald Welte | 1b3e577 | 2010-05-04 11:13:56 +0200 | [diff] [blame] | 126 | #endif /* CMDLINE_H */ |