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