blob: 23a6eeee8b03f27357dbf4cc92dfe91d79fe0f3e [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" {
Harald Weltebed35df2011-11-02 13:06:18 +010015#endif /* __cplusplus */
jjako52c24142002-12-16 13:33:51 +000016
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
Harald Weltebed35df2011-11-02 13:06:18 +010025 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. */
jjako52c24142002-12-16 13:33:51 +000074
Harald Weltebed35df2011-11-02 13:06:18 +010075 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. */
jjako52c24142002-12-16 13:33:51 +000093
Harald Weltebed35df2011-11-02 13:06:18 +010094 };
Harald Welte1b3e5772010-05-04 11:13:56 +020095
Harald Weltebed35df2011-11-02 13:06:18 +010096 extern const char *gengetopt_args_info_purpose;
97 extern const char *gengetopt_args_info_usage;
98 extern const char *gengetopt_args_info_help[];
jjako52c24142002-12-16 13:33:51 +000099
Harald Weltebed35df2011-11-02 13:06:18 +0100100 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);
jjako52c24142002-12-16 13:33:51 +0000107
Harald Weltebed35df2011-11-02 13:06:18 +0100108 void cmdline_parser_print_help(void);
109 void cmdline_parser_print_version(void);
Harald Welte1b3e5772010-05-04 11:13:56 +0200110
Harald Weltebed35df2011-11-02 13:06:18 +0100111 void cmdline_parser_init(struct gengetopt_args_info *args_info);
112 void cmdline_parser_free(struct gengetopt_args_info *args_info);
Harald Welte1b3e5772010-05-04 11:13:56 +0200113
Harald Weltebed35df2011-11-02 13:06:18 +0100114 int cmdline_parser_configfile(char *const filename,
115 struct gengetopt_args_info *args_info,
116 int override, int initialize,
117 int check_required);
Harald Welte1b3e5772010-05-04 11:13:56 +0200118
Harald Weltebed35df2011-11-02 13:06:18 +0100119 int cmdline_parser_required(struct gengetopt_args_info *args_info,
120 const char *prog_name);
jjako52c24142002-12-16 13:33:51 +0000121
122#ifdef __cplusplus
123}
Harald Weltebed35df2011-11-02 13:06:18 +0100124#endif /* __cplusplus */
125#endif /* CMDLINE_H */