1 /* $Id: options.h,v 1.22 2012/09/27 15:47:15 nanard Exp $ */
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
5 * (c) 2006-2012 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 */
21 UPNPPORT
, /* "port" */
22 UPNPBITRATE_UP
, /* "bitrate_up" */
23 UPNPBITRATE_DOWN
, /* "bitrate_down" */
24 UPNPPRESENTATIONURL
, /* presentation_url */
25 UPNPFRIENDLY_NAME
, /* "friendly_name" */
26 UPNPNOTIFY_INTERVAL
, /* notify_interval */
27 UPNPSYSTEM_UPTIME
, /* "system_uptime" */
28 UPNPPACKET_LOG
, /* "packet_log" */
30 UPNPSERIAL
, /* serial */
31 UPNPMODEL_NUMBER
, /* model_number */
32 UPNPCLEANTHRESHOLD
, /* clean_ruleset_threshold */
33 UPNPCLEANINTERVAL
, /* clean_ruleset_interval */
34 UPNPENABLENATPMP
, /* enable_natpmp */
40 UPNPANCHOR
, /* anchor */
41 UPNPQUEUE
, /* queue */
44 #ifdef PF_ENABLE_FILTER_RULES
45 UPNPQUICKRULES
, /* quickrules */
47 UPNPSECUREMODE
, /* secure_mode */
48 #ifdef ENABLE_LEASEFILE
49 UPNPLEASEFILE
, /* lease_file */
51 UPNPMINISSDPDSOCKET
, /* minissdpdsocket */
52 UPNPENABLE
/* enable_upnp */
56 * parse and store the option file values
57 * returns: 0 success, -1 failure */
59 readoptionsfile(const char * fname
);
62 * frees memory allocated to option values */
68 enum upnpconfigoptions id
;
72 extern struct option
* ary_options
;
73 extern unsigned int num_options
;
75 #endif /* DISABLE_CONFIG_FILE */
77 #endif /* OPTIONS_H_INCLUDED */