Electroneum
Toggle main menu visibility
Loading...
Searching...
No Matches
upnpglobalvars.h
Go to the documentation of this file.
1
/* $Id: upnpglobalvars.h,v 1.45 2018/01/16 00:50:49 nanard Exp $ */
2
/* vim: tabstop=4 shiftwidth=4 noexpandtab
3
* MiniUPnP project
4
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
5
* (c) 2006-2018 Thomas Bernard
6
* This software is subject to the conditions detailed
7
* in the LICENCE file provided within the distribution */
8
9
#ifndef UPNPGLOBALVARS_H_INCLUDED
10
#define UPNPGLOBALVARS_H_INCLUDED
11
12
#include <time.h>
13
#include "
upnppermissions.h
"
14
#include "
miniupnpdtypes.h
"
15
#include "config.h"
16
17
/* name of the network interface used to access internet */
18
extern
const
char
*
ext_if_name
;
19
20
/* file to store all leases */
21
#ifdef ENABLE_LEASEFILE
22
extern
const
char
* lease_file;
23
#endif
24
25
/* forced ip address to use for this interface
26
* when NULL, getifaddr() is used */
27
extern
const
char
*
use_ext_ip_addr
;
28
29
/* parameters to return to upnp client when asked */
30
extern
unsigned
long
downstream_bitrate
;
31
extern
unsigned
long
upstream_bitrate
;
32
33
/* statup time */
34
extern
time_t
startup_time
;
35
#if defined(ENABLE_NATPMP) || defined(ENABLE_PCP)
36
/* origin for "epoch time" sent into NATPMP and PCP responses */
37
extern
time_t epoch_origin;
38
#endif
/* defined(ENABLE_NATPMP) || defined(ENABLE_PCP) */
39
40
extern
unsigned
long
int
min_lifetime
;
41
extern
unsigned
long
int
max_lifetime
;
42
43
/* runtime boolean flags */
44
extern
int
runtime_flags
;
45
#define LOGPACKETSMASK 0x0001
46
#define SYSUPTIMEMASK 0x0002
47
#ifdef ENABLE_NATPMP
48
#define ENABLENATPMPMASK 0x0004
49
#endif
50
#define CHECKCLIENTIPMASK 0x0008
51
#define SECUREMODEMASK 0x0010
52
53
#define ENABLEUPNPMASK 0x0020
54
55
#ifdef PF_ENABLE_FILTER_RULES
56
#define PFNOQUICKRULESMASK 0x0040
57
#endif
58
#ifdef ENABLE_IPV6
59
#define IPV6DISABLEDMASK 0x0080
60
#endif
61
#ifdef ENABLE_6FC_SERVICE
62
#define IPV6FCFWDISABLEDMASK 0x0100
63
#define IPV6FCINBOUNDDISALLOWEDMASK 0x0200
64
#endif
65
#ifdef ENABLE_PCP
66
#define PCP_ALLOWTHIRDPARTYMASK 0x0400
67
#endif
68
#ifdef IGD_V2
69
#define FORCEIGDDESCV1MASK 0x0800
70
#endif
71
72
#define SETFLAG(mask) runtime_flags |= mask
73
#define GETFLAG(mask) (runtime_flags & mask)
74
#define CLEARFLAG(mask) runtime_flags &= ~mask
75
76
extern
const
char
*
pidfilename
;
77
78
extern
char
uuidvalue_igd
[];
/* uuid of root device (IGD) */
79
extern
char
uuidvalue_wan
[];
/* uuid of WAN Device */
80
extern
char
uuidvalue_wcd
[];
/* uuid of WAN Connection Device */
81
82
#define SERIALNUMBER_MAX_LEN (10)
83
extern
char
serialnumber
[];
84
85
#define MODELNUMBER_MAX_LEN (48)
86
extern
char
modelnumber
[];
87
88
#define PRESENTATIONURL_MAX_LEN (64)
89
extern
char
presentationurl
[];
90
91
#ifdef ENABLE_MANUFACTURER_INFO_CONFIGURATION
92
#define FRIENDLY_NAME_MAX_LEN (64)
93
extern
char
friendly_name[];
94
95
#define MANUFACTURER_NAME_MAX_LEN (64)
96
extern
char
manufacturer_name[];
97
98
#define MANUFACTURER_URL_MAX_LEN (64)
99
extern
char
manufacturer_url[];
100
101
#define MODEL_NAME_MAX_LEN (64)
102
extern
char
model_name[];
103
104
#define MODEL_DESCRIPTION_MAX_LEN (64)
105
extern
char
model_description[];
106
107
#define MODEL_URL_MAX_LEN (64)
108
extern
char
model_url[];
109
#endif
110
111
/* UPnP permission rules : */
112
extern
struct
upnpperm
*
upnppermlist
;
113
extern
unsigned
int
num_upnpperm
;
114
115
#ifdef PCP_SADSCP
116
extern
struct
dscp_values
* dscp_values_list;
117
extern
unsigned
int
num_dscp_values;
118
#endif
119
120
/* For automatic removal of expired rules (with LeaseDuration) */
121
extern
unsigned
int
nextruletoclean_timestamp
;
122
123
#ifdef USE_PF
124
extern
const
char
* anchor_name;
125
/* queue and tag for PF rules */
126
extern
const
char
* queue;
127
extern
const
char
* tag;
128
#endif
129
130
#ifdef USE_NETFILTER
131
extern
const
char
* miniupnpd_nat_chain;
132
extern
const
char
* miniupnpd_nat_postrouting_chain;
133
extern
const
char
* miniupnpd_forward_chain;
134
#ifdef ENABLE_UPNPPINHOLE
135
extern
const
char
* miniupnpd_v6_filter_chain;
136
#endif
137
#endif
138
139
#ifdef ENABLE_NFQUEUE
140
extern
int
nfqueue;
141
extern
int
n_nfqix;
142
extern
unsigned
nfqix[];
143
#endif
144
145
/* lan addresses to listen to SSDP traffic */
146
extern
struct
lan_addr_list
lan_addrs
;
147
148
#ifdef ENABLE_IPV6
149
/* ipv6 address used for HTTP */
150
extern
char
ipv6_addr_for_http_with_brackets[64];
151
152
/* address used to bind local services */
153
extern
struct
in6_addr
ipv6_bind_addr;
154
155
#endif
/* ENABLE_IPV6 */
156
157
extern
const
char
*
minissdpdsocketpath
;
158
159
/* BOOTID.UPNP.ORG and CONFIGID.UPNP.ORG */
160
extern
unsigned
int
upnp_bootid
;
161
extern
unsigned
int
upnp_configid
;
162
163
#ifdef RANDOMIZE_URLS
164
#define RANDOM_URL_MAX_LEN (16)
165
extern
char
random_url[];
166
#endif
/* RANDOMIZE_URLS */
167
168
#endif
/* UPNPGLOBALVARS_H_INCLUDED */
miniupnpdtypes.h
dscp_values
Definition
pcplearndscp.h:36
in6_addr
Definition
fake-rfc2553.h:68
upnpperm
Definition
upnppermissions.h:19
nextruletoclean_timestamp
unsigned int nextruletoclean_timestamp
uuidvalue_wcd
char uuidvalue_wcd[]
num_upnpperm
unsigned int num_upnpperm
lan_addrs
struct lan_addr_list lan_addrs
downstream_bitrate
unsigned long downstream_bitrate
startup_time
time_t startup_time
max_lifetime
unsigned long int max_lifetime
use_ext_ip_addr
const char * use_ext_ip_addr
minissdpdsocketpath
const char * minissdpdsocketpath
upnp_configid
unsigned int upnp_configid
upnppermlist
struct upnpperm * upnppermlist
runtime_flags
int runtime_flags
ext_if_name
const char * ext_if_name
upnp_bootid
unsigned int upnp_bootid
serialnumber
char serialnumber[]
presentationurl
char presentationurl[]
modelnumber
char modelnumber[]
min_lifetime
unsigned long int min_lifetime
upstream_bitrate
unsigned long upstream_bitrate
uuidvalue_igd
char uuidvalue_igd[]
uuidvalue_wan
char uuidvalue_wan[]
pidfilename
const char * pidfilename
upnppermissions.h
external
miniupnp
miniupnpd
upnpglobalvars.h
Generated on
for Electroneum by
1.17.0