aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn/cmdline.h
blob: e08cfe89970d566d413fa881f0f75e984c0eb7ff (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
/* cmdline.h */

/* File autogenerated by gengetopt version 2.8rc  */

#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').  */
  char * mask_arg;	/* Network mask (default='255.255.255.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 mask_given ;	/* Whether mask 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 */