aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn/cmdline.h
blob: f083dbe40135f8a26b601013b8dae4e915c38457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* cmdline.h */

/* File autogenerated by gengetopt version 2.8  */

#ifndef _cmdline_h
#define _cmdline_h

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* Don't define PACKAGE and VERSION if we use automake.  */
#ifndef PACKAGE
#define PACKAGE ""
#endif

#ifndef VERSION
#define VERSION ""
#endif

struct gengetopt_args_info
{
  int fg_flag;	/* Run in foreground (default=off).  */
  int debug_flag;	/* Run in debug mode (default=off).  */
  char * conf_arg;	/* Read configuration file (default='/etc/ggsn.conf').  */
  char * pidfile_arg;	/* Filename of process id file (default='/var/run/ggsn.pid').  */
  char * statedir_arg;	/* Directory of nonvolatile data (default='/var/lib/ggsn/').  */
  char * listen_arg;	/* Local interface.  */
  char * net_arg;	/* Network (default='192.168.0.0/24').  */
  char * ipup_arg;	/* Script to run after link-up.  */
  char * ipdown_arg;	/* Script to run after link-down.  */
  char * dynip_arg;	/* Dynamic IP address pool.  */
  char * statip_arg;	/* Static IP address pool.  */
  char * pcodns1_arg;	/* PCO DNS Server 1 (default='0.0.0.0').  */
  char * pcodns2_arg;	/* PCO DNS Server 2 (default='0.0.0.0').  */
  int timelimit_arg;	/* Exit after timelimit seconds (default='0').  */
  char * apn_arg;	/* Access point name (default='internet').  */
  int qos_arg;	/* Requested quality of service (default='0x0b921f').  */

  int help_given ;	/* Whether help was given.  */
  int version_given ;	/* Whether version was given.  */
  int fg_given ;	/* Whether fg was given.  */
  int debug_given ;	/* Whether debug was given.  */
  int conf_given ;	/* Whether conf was given.  */
  int pidfile_given ;	/* Whether pidfile was given.  */
  int statedir_given ;	/* Whether statedir was given.  */
  int listen_given ;	/* Whether listen was given.  */
  int net_given ;	/* Whether net was given.  */
  int ipup_given ;	/* Whether ipup was given.  */
  int ipdown_given ;	/* Whether ipdown was given.  */
  int dynip_given ;	/* Whether dynip was given.  */
  int statip_given ;	/* Whether statip was given.  */
  int pcodns1_given ;	/* Whether pcodns1 was given.  */
  int pcodns2_given ;	/* Whether pcodns2 was given.  */
  int timelimit_given ;	/* Whether timelimit was given.  */
  int apn_given ;	/* Whether apn was given.  */
  int qos_given ;	/* Whether qos was given.  */

} ;

int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info);

void cmdline_parser_print_help(void);
void cmdline_parser_print_version(void);

int cmdline_parser_configfile (char * const filename, struct gengetopt_args_info *args_info, int override);

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _cmdline_h */