1 /* $Id: options.h,v 1.27 2016/02/09 09:37:44 nanard Exp $ */
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
5 * (c) 2006-2014 Thomas Bernard
6 * This software is subject to the conditions detailed
7 * in the LICENCE file provided within the distribution */
9 #ifndef OPTIONS_H_INCLUDED
10 #define OPTIONS_H_INCLUDED
14 #ifndef DISABLE_CONFIG_FILE
15 /* enum of option available in the miniupnpd.conf */
16 enum upnpconfigoptions
{
18 UPNPEXT_IFNAME
= 1, /* ext_ifname */
19 UPNPEXT_IP
, /* ext_ip */
20 UPNPLISTENING_IP
, /* listening_ip */
22 UPNPIPV6_LISTENING_IP
, /* listening address for IPv6 */
23 #endif /* ENABLE_IPV6 */
24 UPNPPORT
, /* "port" / "http_port" */
26 UPNPHTTPSPORT
, /* "https_port" */
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" */
39 UPNPNOTIFY_INTERVAL
, /* notify_interval */
40 UPNPSYSTEM_UPTIME
, /* "system_uptime" */
41 UPNPPACKET_LOG
, /* "packet_log" */
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 */
57 UPNPANCHOR
, /* anchor */
58 UPNPQUEUE
, /* queue */
61 #ifdef PF_ENABLE_FILTER_RULES
62 UPNPQUICKRULES
, /* quickrules */
64 UPNPSECUREMODE
, /* secure_mode */
65 #ifdef ENABLE_LEASEFILE
66 UPNPLEASEFILE
, /* lease_file */
68 UPNPMINISSDPDSOCKET
, /* minissdpdsocket */
69 UPNPENABLE
/* enable_upnp */
73 * parse and store the option file values
74 * returns: 0 success, -1 failure */
76 readoptionsfile(const char * fname
);
79 * frees memory allocated to option values */
85 enum upnpconfigoptions id
;
89 extern struct option
* ary_options
;
90 extern unsigned int num_options
;
92 #endif /* DISABLE_CONFIG_FILE */
94 #endif /* OPTIONS_H_INCLUDED */