Add option to make DNS configuration retrieved by pptp exclusive
[tomato.git] / release / src / router / miniupnpd / upnpglobalvars.c
blob25349a809a1ba4787116981b93dc118fac944f78
1 /* $Id: upnpglobalvars.c,v 1.25 2011/05/27 21:36:22 nanard Exp $ */
2 /* MiniUPnP project
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006-2010 Thomas Bernard
5 * This software is subject to the conditions detailed
6 * in the LICENCE file provided within the distribution */
8 #include <sys/types.h>
9 #include <netinet/in.h>
11 #include "config.h"
12 #include "upnpglobalvars.h"
14 /* network interface for internet */
15 const char * ext_if_name = 0;
17 /* file to store leases */
18 #ifdef ENABLE_LEASEFILE
19 const char* lease_file = 0;
20 #endif
22 /* forced ip address to use for this interface
23 * when NULL, getifaddr() is used */
24 const char * use_ext_ip_addr = 0;
26 /* LAN address */
27 /*const char * listen_addr = 0;*/
29 unsigned long downstream_bitrate = 0;
30 unsigned long upstream_bitrate = 0;
32 /* startup time */
33 time_t startup_time = 0;
35 int runtime_flags = 0;
37 const char * pidfilename = "/var/run/miniupnpd.pid";
39 char uuidvalue[] = "uuid:00000000-0000-0000-0000-000000000000";
40 char serialnumber[SERIALNUMBER_MAX_LEN] = "00000000";
42 char modelnumber[MODELNUMBER_MAX_LEN] = "1";
44 /* presentation url :
45 * http://nnn.nnn.nnn.nnn:ppppp/ => max 30 bytes including terminating 0 */
46 char presentationurl[PRESENTATIONURL_MAX_LEN];
48 /* UPnP permission rules : */
49 struct upnpperm * upnppermlist = 0;
50 unsigned int num_upnpperm = 0;
52 #ifdef ENABLE_NATPMP
53 /* NAT-PMP */
54 #if 0
55 unsigned int nextnatpmptoclean_timestamp = 0;
56 unsigned short nextnatpmptoclean_eport = 0;
57 unsigned short nextnatpmptoclean_proto = 0;
58 #endif
59 #endif
61 /* For automatic removal of expired rules (with LeaseDuration) */
62 unsigned int nextruletoclean_timestamp = 0;
64 #ifdef USE_PF
65 const char * queue = 0;
66 const char * tag = 0;
67 #endif
69 #ifdef USE_NETFILTER
70 /* chain name to use, both in the nat table
71 * and the filter table */
72 const char * miniupnpd_nat_chain = "MINIUPNPD";
73 const char * miniupnpd_forward_chain = "MINIUPNPD";
74 #endif
75 #ifdef ENABLE_NFQUEUE
76 int nfqueue = -1;
77 int n_nfqix = 0;
78 unsigned nfqix[MAX_LAN_ADDR];
79 #endif
80 struct lan_addr_list lan_addrs;
82 #ifdef ENABLE_IPV6
83 /* ipv6 address used for HTTP */
84 char ipv6_addr_for_http_with_brackets[64];
85 #endif
87 /* Path of the Unix socket used to communicate with MiniSSDPd */
88 const char * minissdpdsocketpath = "/var/run/minissdpd.sock";
90 /* BOOTID.UPNP.ORG and CONFIGID.UPNP.ORG */
91 unsigned int upnp_bootid = 1;
92 unsigned int upnp_configid = 1337;
94 #ifdef ENABLE_6FC_SERVICE
95 int ipv6fc_firewall_enabled = 1;
96 int ipv6fc_inbound_pinhole_allowed = 1;
97 #endif