1: /* $Id: options.h,v 1.1.1.2 2013/07/22 00:32:35 misho Exp $ */
2: /* MiniUPnP project
3: * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4: * author: Ryan Wagoner
5: * (c) 2006-2012 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 */
16: enum upnpconfigoptions {
17: UPNP_INVALID = 0,
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" */
29: UPNPUUID, /* uuid */
30: UPNPSERIAL, /* serial */
31: UPNPMODEL_NUMBER, /* model_number */
32: UPNPCLEANTHRESHOLD, /* clean_ruleset_threshold */
33: UPNPCLEANINTERVAL, /* clean_ruleset_interval */
34: UPNPENABLENATPMP, /* enable_natpmp */
35: #ifdef USE_NETFILTER
36: UPNPFORWARDCHAIN,
37: UPNPNATCHAIN,
38: #endif
39: #ifdef USE_PF
40: UPNPANCHOR, /* anchor */
41: UPNPQUEUE, /* queue */
42: UPNPTAG, /* tag */
43: #endif
44: #ifdef PF_ENABLE_FILTER_RULES
45: UPNPQUICKRULES, /* quickrules */
46: #endif
47: UPNPSECUREMODE, /* secure_mode */
48: #ifdef ENABLE_LEASEFILE
49: UPNPLEASEFILE, /* lease_file */
50: #endif
51: UPNPMINISSDPDSOCKET, /* minissdpdsocket */
52: UPNPENABLE /* enable_upnp */
53: };
54:
55: /* readoptionsfile()
56: * parse and store the option file values
57: * returns: 0 success, -1 failure */
58: int
59: readoptionsfile(const char * fname);
60:
61: /* freeoptions()
62: * frees memory allocated to option values */
63: void
64: freeoptions(void);
65:
66: struct option
67: {
68: enum upnpconfigoptions id;
69: const char * value;
70: };
71:
72: extern struct option * ary_options;
73: extern unsigned int num_options;
74:
75: #endif /* DISABLE_CONFIG_FILE */
76:
77: #endif /* OPTIONS_H_INCLUDED */
78:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>