Electroneum
options.h
Go to the documentation of this file.
1 /* $Id: options.h,v 1.21 2012/06/29 19:26:09 nanard Exp $ */
2 /* MiniUPnP project
3  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4  * author: Ryan Wagoner
5  * (c) 2006-2014 Thomas Bernard
6  * This software is subject to the conditions detailed
7  * in the LICENCE file provided within the distribution */
8 
9 #ifndef OPTIONS_H_INCLUDED
10 #define OPTIONS_H_INCLUDED
11 
12 #include "config.h"
13 
14 #ifndef DISABLE_CONFIG_FILE
15 /* enum of option available in the miniupnpd.conf */
18  UPNPEXT_IFNAME = 1, /* ext_ifname */
19  UPNPEXT_IP, /* ext_ip */
20  UPNPLISTENING_IP, /* listening_ip */
21 #ifdef ENABLE_IPV6
22  UPNPIPV6_LISTENING_IP, /* listening address for IPv6 */
23 #endif /* ENABLE_IPV6 */
24  UPNPPORT, /* "port" / "http_port" */
25 #ifdef ENABLE_HTTPS
26  UPNPHTTPSPORT, /* "https_port" */
27 #endif
28  UPNPBITRATE_UP, /* "bitrate_up" */
29  UPNPBITRATE_DOWN, /* "bitrate_down" */
30  UPNPPRESENTATIONURL, /* presentation_url */
31 #ifdef ENABLE_MANUFACTURER_INFO_CONFIGURATION
32  UPNPFRIENDLY_NAME, /* "friendly_name" */
33  UPNPMANUFACTURER_NAME, /* "manufacturer_name" */
34  UPNPMANUFACTURER_URL, /* "manufacturer_url" */
35  UPNPMODEL_NAME, /* "model_name" */
36  UPNPMODEL_DESCRIPTION, /* "model_description" */
37  UPNPMODEL_URL, /* "model_url" */
38 #endif
39  UPNPNOTIFY_INTERVAL, /* notify_interval */
40  UPNPSYSTEM_UPTIME, /* "system_uptime" */
41  UPNPPACKET_LOG, /* "packet_log" */
42  UPNPUUID, /* uuid */
43  UPNPSERIAL, /* serial */
44  UPNPMODEL_NUMBER, /* model_number */
45  UPNPCLEANTHRESHOLD, /* clean_ruleset_threshold */
46  UPNPCLEANINTERVAL, /* clean_ruleset_interval */
47  UPNPENABLENATPMP, /* enable_natpmp */
48  UPNPPCPMINLIFETIME, /* minimum lifetime for PCP mapping */
49  UPNPPCPMAXLIFETIME, /* maximum lifetime for PCP mapping */
50  UPNPPCPALLOWTHIRDPARTY, /* allow third-party requests */
51 #ifdef USE_NETFILTER
52  UPNPFORWARDCHAIN,
53  UPNPNATCHAIN,
54  UPNPNATPOSTCHAIN,
55 #endif
56 #ifdef USE_PF
57  UPNPANCHOR, /* anchor */
58  UPNPQUEUE, /* queue */
59  UPNPTAG, /* tag */
60 #endif
61 #ifdef PF_ENABLE_FILTER_RULES
62  UPNPQUICKRULES, /* quickrules */
63 #endif
64  UPNPSECUREMODE, /* secure_mode */
65 #ifdef ENABLE_LEASEFILE
66  UPNPLEASEFILE, /* lease_file */
67 #endif
68  UPNPMINISSDPDSOCKET, /* minissdpdsocket */
69 #ifdef IGD_V2
70  UPNPFORCEIGDDESCV1,
71 #endif
72  UPNPENABLE /* enable_upnp */
73 };
74 
75 /* readoptionsfile()
76  * parse and store the option file values
77  * returns: 0 success, -1 failure */
78 int
79 readoptionsfile(const char * fname);
80 
81 /* freeoptions()
82  * frees memory allocated to option values */
83 void
84 freeoptions(void);
85 
86 struct option
87 {
89  const char * value;
90 };
91 
92 extern struct option * ary_options;
93 extern unsigned int num_options;
94 
95 #endif /* DISABLE_CONFIG_FILE */
96 
97 #endif /* OPTIONS_H_INCLUDED */
98 
struct option * ary_options
unsigned int num_options
enum upnpconfigoptions id
Definition: options.h:88
const char * value
Definition: options.h:89
int readoptionsfile(const char *fname)
Definition: options.h:86
upnpconfigoptions
Definition: options.h:16
void freeoptions(void)