Tomato 1.28
[tomato.git] / release / src / router / miniupnpd / upnpglobalvars.c
blobf021c983eac2e56d1dd9b79b55bc7b156cb8ed18
1 /* $Id: upnpglobalvars.c,v 1.18 2008/10/06 13:22:02 nanard Exp $ */
2 /* MiniUPnP project
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006 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 #if 0
36 /* use system uptime */
37 int sysuptime = 0;
39 /* log packets flag */
40 int logpackets = 0;
42 #ifdef ENABLE_NATPMP
43 int enablenatpmp = 0;
44 #endif
45 #endif
47 int runtime_flags = 0;
49 const char * pidfilename = "/var/run/miniupnpd.pid";
51 char uuidvalue[] = "uuid:00000000-0000-0000-0000-000000000000";
52 char serialnumber[SERIALNUMBER_MAX_LEN] = "00000000";
54 char modelnumber[MODELNUMBER_MAX_LEN] = "1";
56 /* presentation url :
57 * http://nnn.nnn.nnn.nnn:ppppp/ => max 30 bytes including terminating 0 */
58 char presentationurl[PRESENTATIONURL_MAX_LEN];
60 /* UPnP permission rules : */
61 struct upnpperm * upnppermlist = 0;
62 unsigned int num_upnpperm = 0;
64 #ifdef ENABLE_NATPMP
65 /* NAT-PMP */
66 unsigned int nextnatpmptoclean_timestamp = 0;
67 unsigned short nextnatpmptoclean_eport = 0;
68 unsigned short nextnatpmptoclean_proto = 0;
69 #endif
71 #ifdef USE_PF
72 const char * queue = 0;
73 const char * tag = 0;
74 #endif
76 #ifdef USE_NETFILTER
77 /* chain name to use, both in the nat table
78 * and the filter table */
79 const char * miniupnpd_nat_chain = "MINIUPNPD";
80 const char * miniupnpd_forward_chain = "MINIUPNPD";
81 #endif
83 int n_lan_addr = 0;
84 struct lan_addr_s lan_addr[MAX_LAN_ADDR];
86 /* Path of the Unix socket used to communicate with MiniSSDPd */
87 const char * minissdpdsocketpath = "/var/run/minissdpd.sock";