Repository navigation
Expand file tree
/
Copy pathoptions.h
More file actions
87 lines (77 loc) · 2.37 KB
/
Copy pathoptions.h
File metadata and controls
87 lines (77 loc) · 2.37 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* $Id: options.h,v 1.21 2012/06/29 19:26:09 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* author: Ryan Wagoner
* (c) 2006-2013 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
#ifndef OPTIONS_H_INCLUDED
#define OPTIONS_H_INCLUDED
#include "config.h"
#ifndef DISABLE_CONFIG_FILE
/* enum of option available in the miniupnpd.conf */
enum upnpconfigoptions {
UPNP_INVALID = 0,
UPNPEXT_IFNAME = 1, /* ext_ifname */
UPNPEXT_IP, /* ext_ip */
UPNPLISTENING_IP, /* listening_ip */
UPNPPORT, /* "port" */
UPNPBITRATE_UP, /* "bitrate_up" */
UPNPBITRATE_DOWN, /* "bitrate_down" */
UPNPPRESENTATIONURL, /* presentation_url */
#ifdef ENABLE_MANUFACTURER_INFO_CONFIGURATION
UPNPFRIENDLY_NAME, /* "friendly_name" */
UPNPMANUFACTURER_NAME, /* "manufacturer_name" */
UPNPMANUFACTURER_URL, /* "manufacturer_url" */
UPNPMODEL_NAME, /* "model_name" */
UPNPMODEL_DESCRIPTION, /* "model_description" */
UPNPMODEL_URL, /* "model_url" */
#endif
UPNPNOTIFY_INTERVAL, /* notify_interval */
UPNPSYSTEM_UPTIME, /* "system_uptime" */
UPNPPACKET_LOG, /* "packet_log" */
UPNPUUID, /* uuid */
UPNPSERIAL, /* serial */
UPNPMODEL_NUMBER, /* model_number */
UPNPCLEANTHRESHOLD, /* clean_ruleset_threshold */
UPNPCLEANINTERVAL, /* clean_ruleset_interval */
UPNPENABLENATPMP, /* enable_natpmp */
UPNPPCPMINLIFETIME, /* minimum lifetime for PCP mapping */
UPNPPCPMAXLIFETIME, /* maximum lifetime for PCP mapping */
#ifdef USE_NETFILTER
UPNPFORWARDCHAIN,
UPNPNATCHAIN,
#endif
#ifdef USE_PF
UPNPANCHOR, /* anchor */
UPNPQUEUE, /* queue */
UPNPTAG, /* tag */
#endif
#ifdef PF_ENABLE_FILTER_RULES
UPNPQUICKRULES, /* quickrules */
#endif
UPNPSECUREMODE, /* secure_mode */
#ifdef ENABLE_LEASEFILE
UPNPLEASEFILE, /* lease_file */
#endif
UPNPMINISSDPDSOCKET, /* minissdpdsocket */
UPNPENABLE /* enable_upnp */
};
/* readoptionsfile()
* parse and store the option file values
* returns: 0 success, -1 failure */
int
readoptionsfile(const char * fname);
/* freeoptions()
* frees memory allocated to option values */
void
freeoptions(void);
struct option
{
enum upnpconfigoptions id;
const char * value;
};
extern struct option * ary_options;
extern unsigned int num_options;
#endif /* DISABLE_CONFIG_FILE */
#endif /* OPTIONS_H_INCLUDED */