Annotation of embedaddon/miniupnpd/miniupnpd/options.h, revision 1.1.1.1

1.1       misho       1: /* $Id: options.h,v 1.32 2020/04/09 18:40:42 nanard Exp $ */
                      2: /* vim: tabstop=4 shiftwidth=4 noexpandtab
                      3:  * MiniUPnP project
                      4:  * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
                      5:  * author: Ryan Wagoner
                      6:  * (c) 2006-2021 Thomas Bernard
                      7:  * This software is subject to the conditions detailed
                      8:  * in the LICENCE file provided within the distribution */
                      9: 
                     10: #ifndef OPTIONS_H_INCLUDED
                     11: #define OPTIONS_H_INCLUDED
                     12: 
                     13: #include "config.h"
                     14: 
                     15: #ifndef DISABLE_CONFIG_FILE
                     16: /* enum of option available in the miniupnpd.conf */
                     17: enum upnpconfigoptions {
                     18:    UPNP_INVALID = 0,
                     19:    UPNPEXT_IFNAME = 1,     /* ext_ifname */
                     20: #ifdef ENABLE_IPV6
                     21:    UPNPEXT_IFNAME6,        /* ext_ifname6 */
                     22: #endif
                     23:    UPNPEXT_IP,             /* ext_ip */
                     24:    UPNPEXT_PERFORM_STUN,       /* ext_perform_stun */
                     25:    UPNPEXT_STUN_HOST,      /* ext_stun_host */
                     26:    UPNPEXT_STUN_PORT,      /* ext_stun_port */
                     27:    UPNPLISTENING_IP,       /* listening_ip */
                     28: #ifdef ENABLE_IPV6
                     29:    UPNPIPV6_LISTENING_IP,      /* listening address for IPv6 */
                     30:    UPNPIPV6_DISABLE,       /* ipv6_disable */
                     31: #endif /* ENABLE_IPV6 */
                     32:    UPNPPORT,               /* "port" / "http_port" */
                     33: #ifdef ENABLE_HTTPS
                     34:    UPNPHTTPSPORT,          /* "https_port" */
                     35: #endif
                     36:    UPNPBITRATE_UP,         /* "bitrate_up" */
                     37:    UPNPBITRATE_DOWN,       /* "bitrate_down" */
                     38:    UPNPPRESENTATIONURL,    /* presentation_url */
                     39: #ifdef ENABLE_MANUFACTURER_INFO_CONFIGURATION
                     40:    UPNPFRIENDLY_NAME,      /* "friendly_name" */
                     41:    UPNPMANUFACTURER_NAME,  /* "manufacturer_name" */
                     42:    UPNPMANUFACTURER_URL,   /* "manufacturer_url" */
                     43:    UPNPMODEL_NAME, /* "model_name" */
                     44:    UPNPMODEL_DESCRIPTION,  /* "model_description" */
                     45:    UPNPMODEL_URL,  /* "model_url" */
                     46: #endif
                     47:    UPNPNOTIFY_INTERVAL,    /* notify_interval */
                     48:    UPNPSYSTEM_UPTIME,      /* "system_uptime" */
                     49:    UPNPPACKET_LOG,         /* "packet_log" */
                     50:    UPNPUUID,               /* uuid */
                     51:    UPNPSERIAL,             /* serial */
                     52:    UPNPMODEL_NUMBER,       /* model_number */
                     53:    UPNPCLEANTHRESHOLD,     /* clean_ruleset_threshold */
                     54:    UPNPCLEANINTERVAL,      /* clean_ruleset_interval */
                     55:    UPNPENABLENATPMP,       /* enable_natpmp */
                     56:    UPNPPCPMINLIFETIME,     /* minimum lifetime for PCP mapping */
                     57:    UPNPPCPMAXLIFETIME,     /* maximum lifetime for PCP mapping */
                     58:    UPNPPCPALLOWTHIRDPARTY,     /* allow third-party requests */
                     59: #ifdef USE_NETFILTER
                     60:    UPNPTABLENAME,
                     61:    UPNPNATTABLENAME,
                     62:    UPNPFORWARDCHAIN,
                     63:    UPNPNATCHAIN,
                     64:    UPNPNATPOSTCHAIN,
                     65: #endif
                     66: #ifdef USE_PF
                     67:    UPNPANCHOR,             /* anchor */
                     68:    UPNPQUEUE,              /* queue */
                     69:    UPNPTAG,                /* tag */
                     70: #endif
                     71: #ifdef PF_ENABLE_FILTER_RULES
                     72:    UPNPQUICKRULES,         /* quickrules */
                     73: #endif
                     74:    UPNPSECUREMODE,         /* secure_mode */
                     75: #ifdef ENABLE_LEASEFILE
                     76:    UPNPLEASEFILE,          /* lease_file */
                     77: #ifdef ENABLE_UPNPPINHOLE
                     78:    UPNPLEASEFILE6,         /* lease_file v6 */
                     79: #endif
                     80: #endif
                     81:    UPNPMINISSDPDSOCKET,    /* minissdpdsocket */
                     82: #ifdef IGD_V2
                     83:    UPNPFORCEIGDDESCV1,
                     84: #endif
                     85:    UPNPENABLE              /* enable_upnp */
                     86: };
                     87: 
                     88: /* readoptionsfile()
                     89:  * parse and store the option file values
                     90:  * returns: 0 success, -1 failure */
                     91: int
                     92: readoptionsfile(const char * fname, int debug_flag);
                     93: 
                     94: /* freeoptions()
                     95:  * frees memory allocated to option values */
                     96: void
                     97: freeoptions(void);
                     98: 
                     99: struct option
                    100: {
                    101:    enum upnpconfigoptions id;
                    102:    const char * value;
                    103: };
                    104: 
                    105: extern struct option * ary_options;
                    106: extern unsigned int num_options;
                    107: 
                    108: #endif /* DISABLE_CONFIG_FILE */
                    109: 
                    110: #endif /* OPTIONS_H_INCLUDED */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>