|
version 1.1, 2012/02/21 23:16:02
|
version 1.1.1.2, 2013/07/22 00:32:35
|
|
Line 2
|
Line 2
|
| /* MiniUPnP project |
/* MiniUPnP project |
| * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
| * author: Ryan Wagoner |
* author: Ryan Wagoner |
| * (c) 2006 Thomas Bernard | * (c) 2006-2012 Thomas Bernard |
| * This software is subject to the conditions detailed |
* This software is subject to the conditions detailed |
| * in the LICENCE file provided within the distribution */ |
* in the LICENCE file provided within the distribution */ |
| |
|
| #ifndef __OPTIONS_H__ | #ifndef OPTIONS_H_INCLUDED |
| #define __OPTIONS_H__ | #define OPTIONS_H_INCLUDED |
| |
|
| #include "config.h" |
#include "config.h" |
| |
|
| |
#ifndef DISABLE_CONFIG_FILE |
| /* enum of option available in the miniupnpd.conf */ |
/* enum of option available in the miniupnpd.conf */ |
| enum upnpconfigoptions { |
enum upnpconfigoptions { |
| UPNP_INVALID = 0, |
UPNP_INVALID = 0, |
|
Line 21 enum upnpconfigoptions {
|
Line 22 enum upnpconfigoptions {
|
| UPNPBITRATE_UP, /* "bitrate_up" */ |
UPNPBITRATE_UP, /* "bitrate_up" */ |
| UPNPBITRATE_DOWN, /* "bitrate_down" */ |
UPNPBITRATE_DOWN, /* "bitrate_down" */ |
| UPNPPRESENTATIONURL, /* presentation_url */ |
UPNPPRESENTATIONURL, /* presentation_url */ |
| |
UPNPFRIENDLY_NAME, /* "friendly_name" */ |
| UPNPNOTIFY_INTERVAL, /* notify_interval */ |
UPNPNOTIFY_INTERVAL, /* notify_interval */ |
| UPNPSYSTEM_UPTIME, /* "system_uptime" */ |
UPNPSYSTEM_UPTIME, /* "system_uptime" */ |
| UPNPPACKET_LOG, /* "packet_log" */ |
UPNPPACKET_LOG, /* "packet_log" */ |
|
Line 35 enum upnpconfigoptions {
|
Line 37 enum upnpconfigoptions {
|
| UPNPNATCHAIN, |
UPNPNATCHAIN, |
| #endif |
#endif |
| #ifdef USE_PF |
#ifdef USE_PF |
| |
UPNPANCHOR, /* anchor */ |
| UPNPQUEUE, /* queue */ |
UPNPQUEUE, /* queue */ |
| UPNPTAG, /* tag */ |
UPNPTAG, /* tag */ |
| #endif |
#endif |
|
Line 55 enum upnpconfigoptions {
|
Line 58 enum upnpconfigoptions {
|
| int |
int |
| readoptionsfile(const char * fname); |
readoptionsfile(const char * fname); |
| |
|
| /* freeoptions() | /* freeoptions() |
| * frees memory allocated to option values */ |
* frees memory allocated to option values */ |
| void |
void |
| freeoptions(void); |
freeoptions(void); |
| |
|
| #define MAX_OPTION_VALUE_LEN (80) |
|
| struct option |
struct option |
| { |
{ |
| enum upnpconfigoptions id; |
enum upnpconfigoptions id; |
| char value[MAX_OPTION_VALUE_LEN]; | const char * value; |
| }; |
}; |
| |
|
| extern struct option * ary_options; |
extern struct option * ary_options; |
| extern int num_options; | extern unsigned int num_options; |
| |
|
| #endif | #endif /* DISABLE_CONFIG_FILE */ |
| | |
| | #endif /* OPTIONS_H_INCLUDED */ |
| |
|