Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / miniupnpd / upnpglobalvars.h
blob04811d0ad8368eb0871d5ecbc5012cba3a42c001
1 /* $Id: upnpglobalvars.h,v 1.34 2012/09/27 15:47:15 nanard Exp $ */
2 /* MiniUPnP project
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006-2012 Thomas Bernard
5 * This software is subject to the conditions detailed
6 * in the LICENCE file provided within the distribution */
8 #ifndef UPNPGLOBALVARS_H_INCLUDED
9 #define UPNPGLOBALVARS_H_INCLUDED
11 #include <time.h>
12 #include "upnppermissions.h"
13 #include "miniupnpdtypes.h"
14 #include "config.h"
16 /* name of the network interface used to acces internet */
17 extern const char * ext_if_name;
19 /* file to store all leases */
20 #ifdef ENABLE_LEASEFILE
21 extern const char * lease_file;
22 #endif
24 /* forced ip address to use for this interface
25 * when NULL, getifaddr() is used */
26 extern const char * use_ext_ip_addr;
28 /* parameters to return to upnp client when asked */
29 extern unsigned long downstream_bitrate;
30 extern unsigned long upstream_bitrate;
32 /* statup time */
33 extern time_t startup_time;
35 /* runtime boolean flags */
36 extern int runtime_flags;
37 #define LOGPACKETSMASK 0x0001
38 #define SYSUPTIMEMASK 0x0002
39 #ifdef ENABLE_NATPMP
40 #define ENABLENATPMPMASK 0x0004
41 #endif
42 #define CHECKCLIENTIPMASK 0x0008
43 #define SECUREMODEMASK 0x0010
45 #define ENABLEUPNPMASK 0x0020
47 #ifdef PF_ENABLE_FILTER_RULES
48 #define PFNOQUICKRULESMASK 0x0040
49 #endif
51 #define SETFLAG(mask) runtime_flags |= mask
52 #define GETFLAG(mask) (runtime_flags & mask)
53 #define CLEARFLAG(mask) runtime_flags &= ~mask
55 extern const char * pidfilename;
57 extern char uuidvalue[];
59 #define SERIALNUMBER_MAX_LEN (10)
60 extern char serialnumber[];
62 #define MODELNUMBER_MAX_LEN (48)
63 extern char modelnumber[];
65 #define PRESENTATIONURL_MAX_LEN (64)
66 extern char presentationurl[];
68 #define FRIENDLY_NAME_MAX_LEN (64)
69 extern char friendly_name[];
71 /* UPnP permission rules : */
72 extern struct upnpperm * upnppermlist;
73 extern unsigned int num_upnpperm;
75 #ifdef ENABLE_NATPMP
76 /* NAT-PMP */
77 #if 0
78 extern unsigned int nextnatpmptoclean_timestamp;
79 extern unsigned short nextnatpmptoclean_eport;
80 extern unsigned short nextnatpmptoclean_proto;
81 #endif
82 #endif
84 /* For automatic removal of expired rules (with LeaseDuration) */
85 extern unsigned int nextruletoclean_timestamp;
87 #ifdef USE_PF
88 extern const char * anchor_name;
89 /* queue and tag for PF rules */
90 extern const char * queue;
91 extern const char * tag;
92 #endif
94 #ifdef USE_NETFILTER
95 extern const char * miniupnpd_nat_chain;
96 extern const char * miniupnpd_forward_chain;
97 #ifdef ENABLE_6FC_SERVICE
98 extern const char * miniupnpd_v6_filter_chain;
99 #endif
100 #endif
102 #ifdef ENABLE_NFQUEUE
103 extern int nfqueue;
104 extern int n_nfqix;
105 extern unsigned nfqix[];
106 #endif
108 /* lan addresses to listen to SSDP traffic */
109 extern struct lan_addr_list lan_addrs;
111 #ifdef ENABLE_IPV6
112 /* ipv6 address used for HTTP */
113 extern char ipv6_addr_for_http_with_brackets[64];
114 #endif
116 extern const char * minissdpdsocketpath;
118 /* BOOTID.UPNP.ORG and CONFIGID.UPNP.ORG */
119 extern unsigned int upnp_bootid;
120 extern unsigned int upnp_configid;
122 #ifdef ENABLE_6FC_SERVICE
123 extern int ipv6fc_firewall_enabled;
124 extern int ipv6fc_inbound_pinhole_allowed;
125 #endif
127 #endif