blob: d9e3086ac8187845ea1c5e1d8846838103049867 [file] [log] [blame]
jjako52c24142002-12-16 13:33:51 +00001/* cmdline.h */
2
Harald Welte1b3e5772010-05-04 11:13:56 +02003/* File autogenerated by gengetopt version 2.17 */
jjako52c24142002-12-16 13:33:51 +00004
Harald Welte1b3e5772010-05-04 11:13:56 +02005#ifndef CMDLINE_H
6#define CMDLINE_H
7
8/* If we use autoconf. */
9#ifdef HAVE_CONFIG_H
10#include "config.h"
11#endif
jjako52c24142002-12-16 13:33:51 +000012
13#ifdef __cplusplus
14extern "C" {
15#endif /* __cplusplus */
16
Harald Welte1b3e5772010-05-04 11:13:56 +020017#ifndef CMDLINE_PARSER_PACKAGE
18#define CMDLINE_PARSER_PACKAGE PACKAGE
jjako52c24142002-12-16 13:33:51 +000019#endif
20
Harald Welte1b3e5772010-05-04 11:13:56 +020021#ifndef CMDLINE_PARSER_VERSION
22#define CMDLINE_PARSER_VERSION VERSION
jjako52c24142002-12-16 13:33:51 +000023#endif
24
25struct gengetopt_args_info
26{
Harald Welte1b3e5772010-05-04 11:13:56 +020027 const char *help_help; /* Print help and exit help description. */
28 const char *version_help; /* Print version and exit help description. */
jjako52c24142002-12-16 13:33:51 +000029 int fg_flag; /* Run in foreground (default=off). */
Harald Welte1b3e5772010-05-04 11:13:56 +020030 const char *fg_help; /* Run in foreground help description. */
jjako52c24142002-12-16 13:33:51 +000031 int debug_flag; /* Run in debug mode (default=off). */
Harald Welte1b3e5772010-05-04 11:13:56 +020032 const char *debug_help; /* Run in debug mode help description. */
jjako52c24142002-12-16 13:33:51 +000033 char * conf_arg; /* Read configuration file (default='/etc/ggsn.conf'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020034 char * conf_orig; /* Read configuration file original value given at command line. */
35 const char *conf_help; /* Read configuration file help description. */
jjako52c24142002-12-16 13:33:51 +000036 char * pidfile_arg; /* Filename of process id file (default='/var/run/ggsn.pid'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020037 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. */
jjako52c24142002-12-16 13:33:51 +000039 char * statedir_arg; /* Directory of nonvolatile data (default='/var/lib/ggsn/'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020040 char * statedir_orig; /* Directory of nonvolatile data original value given at command line. */
41 const char *statedir_help; /* Directory of nonvolatile data help description. */
jjako52c24142002-12-16 13:33:51 +000042 char * listen_arg; /* Local interface. */
Harald Welte1b3e5772010-05-04 11:13:56 +020043 char * listen_orig; /* Local interface original value given at command line. */
44 const char *listen_help; /* Local interface help description. */
jjakoa7cd2492003-04-11 09:40:12 +000045 char * net_arg; /* Network (default='192.168.0.0/24'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020046 char * net_orig; /* Network original value given at command line. */
47 const char *net_help; /* Network help description. */
jjakoa7cd2492003-04-11 09:40:12 +000048 char * ipup_arg; /* Script to run after link-up. */
Harald Welte1b3e5772010-05-04 11:13:56 +020049 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. */
jjakoa7cd2492003-04-11 09:40:12 +000051 char * ipdown_arg; /* Script to run after link-down. */
Harald Welte1b3e5772010-05-04 11:13:56 +020052 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. */
jjakoa7c33812003-04-11 11:51:39 +000054 char * dynip_arg; /* Dynamic IP address pool. */
Harald Welte1b3e5772010-05-04 11:13:56 +020055 char * dynip_orig; /* Dynamic IP address pool original value given at command line. */
56 const char *dynip_help; /* Dynamic IP address pool help description. */
jjakoa7c33812003-04-11 11:51:39 +000057 char * statip_arg; /* Static IP address pool. */
Harald Welte1b3e5772010-05-04 11:13:56 +020058 char * statip_orig; /* Static IP address pool original value given at command line. */
59 const char *statip_help; /* Static IP address pool help description. */
jjakoa7cd2492003-04-11 09:40:12 +000060 char * pcodns1_arg; /* PCO DNS Server 1 (default='0.0.0.0'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020061 char * pcodns1_orig; /* PCO DNS Server 1 original value given at command line. */
62 const char *pcodns1_help; /* PCO DNS Server 1 help description. */
jjakoa7cd2492003-04-11 09:40:12 +000063 char * pcodns2_arg; /* PCO DNS Server 2 (default='0.0.0.0'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020064 char * pcodns2_orig; /* PCO DNS Server 2 original value given at command line. */
65 const char *pcodns2_help; /* PCO DNS Server 2 help description. */
jjako52c24142002-12-16 13:33:51 +000066 int timelimit_arg; /* Exit after timelimit seconds (default='0'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020067 char * timelimit_orig; /* Exit after timelimit seconds original value given at command line. */
68 const char *timelimit_help; /* Exit after timelimit seconds help description. */
jjako52c24142002-12-16 13:33:51 +000069 char * apn_arg; /* Access point name (default='internet'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020070 char * apn_orig; /* Access point name original value given at command line. */
71 const char *apn_help; /* Access point name help description. */
jjako52c24142002-12-16 13:33:51 +000072 int qos_arg; /* Requested quality of service (default='0x0b921f'). */
Harald Welte1b3e5772010-05-04 11:13:56 +020073 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
jjako52c24142002-12-16 13:33:51 +000076 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. */
jjakoa7cd2492003-04-11 09:40:12 +000085 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. */
jjako52c24142002-12-16 13:33:51 +000091 int timelimit_given ; /* Whether timelimit was given. */
92 int apn_given ; /* Whether apn was given. */
93 int qos_given ; /* Whether qos was given. */
jjako52c24142002-12-16 13:33:51 +000094
95} ;
96
Harald Welte1b3e5772010-05-04 11:13:56 +020097extern const char *gengetopt_args_info_purpose;
98extern const char *gengetopt_args_info_usage;
99extern const char *gengetopt_args_info_help[];
100
101int cmdline_parser (int argc, char * const *argv,
102 struct gengetopt_args_info *args_info);
103int cmdline_parser2 (int argc, char * const *argv,
104 struct gengetopt_args_info *args_info,
105 int override, int initialize, int check_required);
106int cmdline_parser_file_save(const char *filename,
107 struct gengetopt_args_info *args_info);
jjako52c24142002-12-16 13:33:51 +0000108
109void cmdline_parser_print_help(void);
110void cmdline_parser_print_version(void);
111
Harald Welte1b3e5772010-05-04 11:13:56 +0200112void cmdline_parser_init (struct gengetopt_args_info *args_info);
113void cmdline_parser_free (struct gengetopt_args_info *args_info);
114
115int cmdline_parser_configfile (char * const filename,
116 struct gengetopt_args_info *args_info,
117 int override, int initialize, int check_required);
118
119int cmdline_parser_required (struct gengetopt_args_info *args_info,
120 const char *prog_name);
121
jjako52c24142002-12-16 13:33:51 +0000122
123#ifdef __cplusplus
124}
125#endif /* __cplusplus */
Harald Welte1b3e5772010-05-04 11:13:56 +0200126#endif /* CMDLINE_H */