2012-05-01 09:52:21 +00:00
|
|
|
/* $Id: options.h,v 1.20 2012/04/30 13:38:21 nanard Exp $ */
|
2011-09-28 19:13:20 +00:00
|
|
|
/* MiniUPnP project
|
|
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
|
|
|
* author: Ryan Wagoner
|
2012-03-01 01:44:38 +00:00
|
|
|
* (c) 2006-2012 Thomas Bernard
|
2011-09-28 19:13:20 +00:00
|
|
|
* This software is subject to the conditions detailed
|
|
|
|
* in the LICENCE file provided within the distribution */
|
|
|
|
|
|
|
|
#ifndef __OPTIONS_H__
|
|
|
|
#define __OPTIONS_H__
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
/* 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 */
|
2012-02-04 23:24:13 +00:00
|
|
|
UPNPFRIENDLY_NAME, /* "friendly_name" */
|
2011-09-28 19:13:20 +00:00
|
|
|
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 */
|
|
|
|
#ifdef USE_NETFILTER
|
|
|
|
UPNPFORWARDCHAIN,
|
|
|
|
UPNPNATCHAIN,
|
|
|
|
#endif
|
|
|
|
#ifdef USE_PF
|
2012-02-03 12:14:10 +00:00
|
|
|
UPNPANCHOR, /* anchor */
|
2011-09-28 19:13:20 +00:00
|
|
|
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);
|
|
|
|
|
2012-03-01 01:44:38 +00:00
|
|
|
/* freeoptions()
|
2011-09-28 19:13:20 +00:00
|
|
|
* frees memory allocated to option values */
|
|
|
|
void
|
|
|
|
freeoptions(void);
|
|
|
|
|
|
|
|
struct option
|
|
|
|
{
|
|
|
|
enum upnpconfigoptions id;
|
2012-02-05 00:31:27 +00:00
|
|
|
const char * value;
|
2011-09-28 19:13:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct option * ary_options;
|
2012-05-01 09:52:21 +00:00
|
|
|
extern unsigned int num_options;
|
2011-09-28 19:13:20 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|