miniupnpc 2.0.2__tar.gz → 2.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- miniupnpc-2.2.8/LICENSE +1 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/MANIFEST.in +3 -2
- miniupnpc-2.2.8/Makefile +405 -0
- miniupnpc-2.2.8/PKG-INFO +10 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/README +31 -2
- miniupnpc-2.2.8/VERSION +1 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/external-ip.sh +1 -1
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/miniupnpc.h +15 -11
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/miniupnpctypes.h +4 -2
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/miniwget.h +0 -3
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/upnpcommands.h +7 -7
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/upnpdev.h +13 -5
- miniupnpc-2.2.8/miniupnpc.egg-info/PKG-INFO +10 -0
- miniupnpc-2.2.8/miniupnpc.egg-info/SOURCES.txt +61 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/miniupnpcstrings.h.in +5 -1
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/setup.cfg +4 -5
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/setup.py +9 -9
- miniupnpc-2.2.8/setupmingw32.py +35 -0
- miniupnpc-2.2.8/src/addr_is_reserved.c +86 -0
- miniupnpc-2.2.8/src/addr_is_reserved.h +14 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/connecthostport.c +61 -39
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/connecthostport.h +6 -4
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/listdevices.c +89 -1
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minihttptestserver.c +70 -39
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minisoap.c +16 -19
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minisoap.h +4 -2
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minissdpc.c +279 -147
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minissdpc.h +3 -3
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/miniupnpc.c +80 -119
- miniupnpc-2.2.8/src/miniupnpc_socketdef.h +44 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/miniupnpcmodule.c +65 -25
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/miniwget.c +100 -135
- miniupnpc-2.2.8/src/miniwget_private.h +15 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minixml.c +6 -4
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minixml.h +1 -1
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/portlistingparse.c +6 -1
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/receivedata.c +9 -9
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/receivedata.h +4 -2
- miniupnpc-2.2.8/src/testaddr_is_reserved.c +46 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/testigddescparse.c +2 -2
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/testminiwget.c +5 -4
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/testupnpreplyparse.c +23 -4
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/upnpc.c +156 -69
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/upnpcommands.c +32 -34
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/upnperrors.c +47 -6
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/upnpreplyparse.c +8 -8
- miniupnpc-2.2.8/src/win32_snprintf.h +71 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/testminiwget.sh +46 -9
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/testupnpreplyparse.sh +5 -2
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/updateminiupnpcstrings.sh +20 -6
- miniupnpc-2.0.2/LICENSE +0 -27
- miniupnpc-2.0.2/Makefile +0 -390
- miniupnpc-2.0.2/PKG-INFO +0 -37
- miniupnpc-2.0.2/VERSION +0 -1
- miniupnpc-2.0.2/miniupnpc.egg-info/PKG-INFO +0 -37
- miniupnpc-2.0.2/miniupnpc.egg-info/SOURCES.txt +0 -55
- miniupnpc-2.0.2/wingenminiupnpcstrings.c +0 -83
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/igd_desc_parse.h +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/miniupnpc_declspec.h +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/portlistingparse.h +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/upnperrors.h +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/include}/upnpreplyparse.h +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/miniupnpc.egg-info/dependency_links.txt +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8}/miniupnpc.egg-info/top_level.txt +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/codelength.h +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/igd_desc_parse.c +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/minixmlvalid.c +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/testminixml.c +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/testportlistingparse.c +0 -0
- {miniupnpc-2.0.2 → miniupnpc-2.2.8/src}/upnpdev.c +0 -0
miniupnpc-2.2.8/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../LICENSE
|
miniupnpc-2.2.8/Makefile
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
# $Id: Makefile,v 1.150 2023/06/15 22:55:24 nanard Exp $
|
|
2
|
+
# MiniUPnP Project
|
|
3
|
+
# http://miniupnp.free.fr/
|
|
4
|
+
# https://miniupnp.tuxfamily.org/
|
|
5
|
+
# https://github.com/miniupnp/miniupnp
|
|
6
|
+
# (c) 2005-2024 Thomas Bernard
|
|
7
|
+
# to install use :
|
|
8
|
+
# $ make DESTDIR=/tmp/dummylocation install
|
|
9
|
+
# or
|
|
10
|
+
# $ INSTALLPREFIX=/usr/local make install
|
|
11
|
+
# or
|
|
12
|
+
# $ make install (default INSTALLPREFIX is /usr)
|
|
13
|
+
OS = $(shell $(CC) -dumpmachine)
|
|
14
|
+
VERSION = $(shell cat VERSION)
|
|
15
|
+
|
|
16
|
+
ifneq (, $(findstring darwin, $(OS)))
|
|
17
|
+
JARSUFFIX=mac
|
|
18
|
+
LIBTOOL ?= $(shell which libtool)
|
|
19
|
+
endif
|
|
20
|
+
ifneq (, $(findstring linux, $(OS)))
|
|
21
|
+
JARSUFFIX=linux
|
|
22
|
+
endif
|
|
23
|
+
ifneq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS)))
|
|
24
|
+
JARSUFFIX=win32
|
|
25
|
+
endif
|
|
26
|
+
|
|
27
|
+
HAVE_IPV6 ?= yes
|
|
28
|
+
export HAVE_IPV6
|
|
29
|
+
|
|
30
|
+
# directories
|
|
31
|
+
INCDIR = include
|
|
32
|
+
SRCDIR = src
|
|
33
|
+
BUILD = build
|
|
34
|
+
|
|
35
|
+
CC ?= gcc
|
|
36
|
+
#AR = gar
|
|
37
|
+
#CFLAGS = -O -g
|
|
38
|
+
# to debug :
|
|
39
|
+
ASANFLAGS = -fsanitize=address -fsanitize=undefined -fsanitize=leak
|
|
40
|
+
#CFLAGS = -g -ggdb -O0 $(ASANFLAGS) -fno-omit-frame-pointer
|
|
41
|
+
#CPPFLAGS += -DDEBUG
|
|
42
|
+
#LDFLAGS += $(ASANFLAGS)
|
|
43
|
+
CFLAGS ?= -O
|
|
44
|
+
CFLAGS += -Wall
|
|
45
|
+
CFLAGS += -W -Wstrict-prototypes
|
|
46
|
+
CFLAGS += -fno-common
|
|
47
|
+
CPPFLAGS += -I$(BUILD)
|
|
48
|
+
CPPFLAGS += -DMINIUPNPC_SET_SOCKET_TIMEOUT
|
|
49
|
+
CPPFLAGS += -DMINIUPNPC_GET_SRC_ADDR
|
|
50
|
+
CPPFLAGS += -D_BSD_SOURCE
|
|
51
|
+
CPPFLAGS += -D_DEFAULT_SOURCE
|
|
52
|
+
ifneq (, $(findstring netbsd, $(OS)))
|
|
53
|
+
CPPFLAGS += -D_NETBSD_SOURCE
|
|
54
|
+
endif
|
|
55
|
+
ifeq (, $(findstring freebsd, $(OS))$(findstring darwin, $(OS)))
|
|
56
|
+
#CPPFLAGS += -D_POSIX_C_SOURCE=200112L
|
|
57
|
+
CPPFLAGS += -D_XOPEN_SOURCE=600
|
|
58
|
+
endif
|
|
59
|
+
#CFLAGS += -ansi
|
|
60
|
+
#CPPFLAGS += -DNO_GETADDRINFO
|
|
61
|
+
|
|
62
|
+
DEPFLAGS = -MM -MG
|
|
63
|
+
|
|
64
|
+
MKDIR = mkdir -p
|
|
65
|
+
INSTALL = install
|
|
66
|
+
SH = /bin/sh
|
|
67
|
+
JAVA = java
|
|
68
|
+
# see http://code.google.com/p/jnaerator/
|
|
69
|
+
#JNAERATOR = jnaerator-0.9.7.jar
|
|
70
|
+
#JNAERATOR = jnaerator-0.9.8-shaded.jar
|
|
71
|
+
#JNAERATORARGS = -library miniupnpc
|
|
72
|
+
#JNAERATOR = jnaerator-0.10-shaded.jar
|
|
73
|
+
#JNAERATOR = jnaerator-0.11-shaded.jar
|
|
74
|
+
# https://repo1.maven.org/maven2/com/nativelibs4java/jnaerator/0.12/jnaerator-0.12-shaded.jar
|
|
75
|
+
JNAERATOR = jnaerator-0.12-shaded.jar
|
|
76
|
+
JNAERATORARGS = -mode StandaloneJar -runtime JNAerator -library miniupnpc
|
|
77
|
+
#JNAERATORBASEURL = http://jnaerator.googlecode.com/files/
|
|
78
|
+
JNAERATORBASEURL = https://repo1.maven.org/maven2/com/nativelibs4java/jnaerator/0.12
|
|
79
|
+
|
|
80
|
+
ifneq (, $(findstring sun, $(OS))$(findstring solaris, $(OS)))
|
|
81
|
+
LDLIBS=-lsocket -lnsl -lresolv
|
|
82
|
+
CPPFLAGS += -D__EXTENSIONS__
|
|
83
|
+
CFLAGS += -std=c99
|
|
84
|
+
endif
|
|
85
|
+
|
|
86
|
+
# APIVERSION is used to build SONAME
|
|
87
|
+
APIVERSION = 18
|
|
88
|
+
|
|
89
|
+
SRCS = $(wildcard $(SRCDIR)/*.c)
|
|
90
|
+
|
|
91
|
+
LIBOBJS = $(addprefix $(BUILD)/,miniwget.o minixml.o igd_desc_parse.o minisoap.o \
|
|
92
|
+
miniupnpc.o upnpreplyparse.o upnpcommands.o upnperrors.o \
|
|
93
|
+
connecthostport.o portlistingparse.o receivedata.o upnpdev.o \
|
|
94
|
+
addr_is_reserved.o)
|
|
95
|
+
|
|
96
|
+
BUILDINCLUDES = $(addprefix $(BUILD)/, miniupnpcstrings.h)
|
|
97
|
+
|
|
98
|
+
OBJS = $(patsubst $(SRCDIR)/%.c,$(BUILD)/%.o,$(SRCS))
|
|
99
|
+
DEPS = $(patsubst $(SRCDIR)/%.c,$(BUILD)/%.d,$(SRCS))
|
|
100
|
+
|
|
101
|
+
# HEADERS to install
|
|
102
|
+
CPPFLAGS += -I$(INCDIR)
|
|
103
|
+
HEADERS = $(wildcard $(INCDIR)/*.h)
|
|
104
|
+
|
|
105
|
+
# library names
|
|
106
|
+
LIBRARY = $(BUILD)/libminiupnpc.a
|
|
107
|
+
ifneq (, $(findstring darwin, $(OS)))
|
|
108
|
+
SHAREDLIBRARY = $(BUILD)/libminiupnpc.dylib
|
|
109
|
+
SONAME = $(notdir $(basename $(SHAREDLIBRARY))).$(APIVERSION).dylib
|
|
110
|
+
CPPFLAGS += -D_DARWIN_C_SOURCE
|
|
111
|
+
else
|
|
112
|
+
ifeq ($(JARSUFFIX), win32)
|
|
113
|
+
SHAREDLIBRARY = $(BUILD)/miniupnpc.dll
|
|
114
|
+
else
|
|
115
|
+
# Linux/BSD/etc.
|
|
116
|
+
SHAREDLIBRARY = $(BUILD)/libminiupnpc.so
|
|
117
|
+
SONAME = $(notdir $(SHAREDLIBRARY)).$(APIVERSION)
|
|
118
|
+
endif
|
|
119
|
+
endif
|
|
120
|
+
|
|
121
|
+
EXECUTABLES = $(addprefix $(BUILD)/, upnpc-static upnp-listdevices-static)
|
|
122
|
+
EXECUTABLES_ADDTESTS = $(addprefix $(BUILD)/, testminixml minixmlvalid \
|
|
123
|
+
testupnpreplyparse testigddescparse testminiwget testportlistingparse)
|
|
124
|
+
|
|
125
|
+
TESTMINIXMLOBJS = $(addprefix $(BUILD)/, minixml.o igd_desc_parse.o testminixml.o)
|
|
126
|
+
|
|
127
|
+
TESTMINIWGETOBJS = $(addprefix $(BUILD)/, miniwget.o testminiwget.o connecthostport.o receivedata.o)
|
|
128
|
+
|
|
129
|
+
TESTUPNPREPLYPARSE = $(addprefix $(BUILD)/, testupnpreplyparse.o minixml.o upnpreplyparse.o)
|
|
130
|
+
|
|
131
|
+
TESTPORTLISTINGPARSE = $(addprefix $(BUILD)/, testportlistingparse.o minixml.o portlistingparse.o)
|
|
132
|
+
|
|
133
|
+
TESTADDR_IS_RESERVED = $(addprefix $(BUILD)/, testaddr_is_reserved.o addr_is_reserved.o)
|
|
134
|
+
|
|
135
|
+
TESTIGDDESCPARSE = $(addprefix $(BUILD)/, testigddescparse.o igd_desc_parse.o minixml.o \
|
|
136
|
+
miniupnpc.o miniwget.o upnpcommands.o upnpreplyparse.o \
|
|
137
|
+
minisoap.o connecthostport.o receivedata.o \
|
|
138
|
+
portlistingparse.o addr_is_reserved.o)
|
|
139
|
+
|
|
140
|
+
ifeq (, $(findstring amiga, $(OS)))
|
|
141
|
+
ifeq (, $(findstring mingw, $(OS))$(findstring cygwin, $(OS))$(findstring msys, $(OS)))
|
|
142
|
+
CFLAGS += -fPIC
|
|
143
|
+
endif
|
|
144
|
+
EXECUTABLES += $(BUILD)/upnpc-shared $(BUILD)/upnp-listdevices-shared
|
|
145
|
+
TESTMINIWGETOBJS += $(BUILD)/minissdpc.o
|
|
146
|
+
TESTIGDDESCPARSE += $(BUILD)/minissdpc.o
|
|
147
|
+
LIBOBJS += $(BUILD)/minissdpc.o
|
|
148
|
+
endif
|
|
149
|
+
|
|
150
|
+
LIBDIR ?= lib
|
|
151
|
+
# install directories
|
|
152
|
+
ifeq ($(strip $(PREFIX)),)
|
|
153
|
+
INSTALLPREFIX ?= /usr
|
|
154
|
+
else
|
|
155
|
+
INSTALLPREFIX ?= $(PREFIX)
|
|
156
|
+
endif
|
|
157
|
+
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
|
|
158
|
+
INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR)
|
|
159
|
+
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
|
|
160
|
+
INSTALLDIRMAN = $(INSTALLPREFIX)/share/man
|
|
161
|
+
PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfig
|
|
162
|
+
|
|
163
|
+
FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
|
|
164
|
+
ifeq (, $(findstring amiga, $(OS)))
|
|
165
|
+
FILESTOINSTALL += $(SHAREDLIBRARY) $(BUILD)/miniupnpc.pc
|
|
166
|
+
endif
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
.PHONY: install clean depend all check test everything \
|
|
170
|
+
installpythonmodule updateversion
|
|
171
|
+
|
|
172
|
+
all: $(LIBRARY) $(EXECUTABLES)
|
|
173
|
+
|
|
174
|
+
test: check
|
|
175
|
+
|
|
176
|
+
check: validateminixml validateminiwget validateupnpreplyparse \
|
|
177
|
+
validateportlistingparse validateigddescparse validateaddr_is_reserved
|
|
178
|
+
|
|
179
|
+
everything: all $(EXECUTABLES_ADDTESTS)
|
|
180
|
+
|
|
181
|
+
# note : the python module "wheel" is required for bdist_wheel
|
|
182
|
+
pythonmodule: $(LIBRARY) $(SRCDIR)/miniupnpcmodule.c setup.py
|
|
183
|
+
MAKE=$(MAKE) python setup.py build
|
|
184
|
+
MAKE=$(MAKE) python setup.py sdist
|
|
185
|
+
MAKE=$(MAKE) python setup.py bdist_wheel --skip-build
|
|
186
|
+
touch $@
|
|
187
|
+
|
|
188
|
+
installpythonmodule: pythonmodule
|
|
189
|
+
MAKE=$(MAKE) python setup.py install
|
|
190
|
+
|
|
191
|
+
pythonmodule3: $(LIBRARY) $(SRCDIR)/miniupnpcmodule.c setup.py
|
|
192
|
+
MAKE=$(MAKE) python3 setup.py build
|
|
193
|
+
touch $@
|
|
194
|
+
|
|
195
|
+
installpythonmodule3: pythonmodule3
|
|
196
|
+
MAKE=$(MAKE) python3 setup.py install
|
|
197
|
+
|
|
198
|
+
validateminixml: $(BUILD)/minixmlvalid
|
|
199
|
+
@echo "minixml validation test"
|
|
200
|
+
./$<
|
|
201
|
+
touch $@
|
|
202
|
+
|
|
203
|
+
validateminiwget: testminiwget.sh $(BUILD)/testminiwget $(BUILD)/minihttptestserver
|
|
204
|
+
@echo "miniwget validation test"
|
|
205
|
+
./$<
|
|
206
|
+
touch $@
|
|
207
|
+
|
|
208
|
+
validateupnpreplyparse: testupnpreplyparse.sh $(BUILD)/testupnpreplyparse
|
|
209
|
+
@echo "upnpreplyparse validation test"
|
|
210
|
+
./$<
|
|
211
|
+
touch $@
|
|
212
|
+
|
|
213
|
+
validateportlistingparse: $(BUILD)/testportlistingparse
|
|
214
|
+
@echo "portlistingparse validation test"
|
|
215
|
+
./$<
|
|
216
|
+
touch $@
|
|
217
|
+
|
|
218
|
+
validateigddescparse: $(BUILD)/testigddescparse
|
|
219
|
+
@echo "igd desc parse validation test"
|
|
220
|
+
./$< testdesc/new_LiveBox_desc.xml testdesc/new_LiveBox_desc.values
|
|
221
|
+
./$< testdesc/linksys_WAG200G_desc.xml testdesc/linksys_WAG200G_desc.values
|
|
222
|
+
touch $@
|
|
223
|
+
|
|
224
|
+
validateaddr_is_reserved: $(BUILD)/testaddr_is_reserved
|
|
225
|
+
@echo "addr_is_reserved() validation test"
|
|
226
|
+
./$<
|
|
227
|
+
touch $@
|
|
228
|
+
|
|
229
|
+
clean:
|
|
230
|
+
$(RM) $(LIBRARY) $(SHAREDLIBRARY) $(EXECUTABLES) $(OBJS) $(BUILDINCLUDES)
|
|
231
|
+
$(RM) $(EXECUTABLES_ADDTESTS)
|
|
232
|
+
# clean python stuff
|
|
233
|
+
$(RM) pythonmodule pythonmodule3
|
|
234
|
+
$(RM) validateminixml validateminiwget validateupnpreplyparse
|
|
235
|
+
$(RM) validateigddescparse
|
|
236
|
+
$(RM) minihttptestserver
|
|
237
|
+
$(RM) testaddr_is_reserved
|
|
238
|
+
$(RM) -r build/ dist/
|
|
239
|
+
#python setup.py clean
|
|
240
|
+
# clean jnaerator stuff
|
|
241
|
+
$(RM) _jnaerator.* java/miniupnpc_$(OS).jar
|
|
242
|
+
|
|
243
|
+
distclean: clean
|
|
244
|
+
$(RM) $(JNAERATOR) java/*.jar java/*.class out.errors.txt
|
|
245
|
+
|
|
246
|
+
updateversion: include/miniupnpc.h
|
|
247
|
+
cp $< $<.bak
|
|
248
|
+
sed 's/\(.*MINIUPNPC_API_VERSION\s\+\)[0-9]\+/\1$(APIVERSION)/' < $<.bak > $<
|
|
249
|
+
|
|
250
|
+
install: updateversion $(FILESTOINSTALL)
|
|
251
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRINC)
|
|
252
|
+
$(INSTALL) -m 644 $(HEADERS) $(DESTDIR)$(INSTALLDIRINC)
|
|
253
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRLIB)
|
|
254
|
+
$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
|
|
255
|
+
ifeq (, $(findstring amiga, $(OS)))
|
|
256
|
+
$(INSTALL) -m 644 $(SHAREDLIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
|
|
257
|
+
ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(notdir $(SHAREDLIBRARY))
|
|
258
|
+
$(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
|
|
259
|
+
$(INSTALL) -m 644 $(BUILD)/miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
|
|
260
|
+
endif
|
|
261
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
|
|
262
|
+
ifneq (, $(findstring amiga, $(OS)))
|
|
263
|
+
$(INSTALL) -m 755 $(BUILD)/upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
|
|
264
|
+
$(INSTALL) -m 755 $(BUILD)/upnp-listdevices-static $(DESTDIR)$(INSTALLDIRBIN)/upnp-listdevices
|
|
265
|
+
else
|
|
266
|
+
$(INSTALL) -m 755 $(BUILD)/upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
|
|
267
|
+
$(INSTALL) -m 755 $(BUILD)/upnp-listdevices-shared $(DESTDIR)$(INSTALLDIRBIN)/upnp-listdevices
|
|
268
|
+
endif
|
|
269
|
+
$(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip
|
|
270
|
+
ifeq (, $(findstring amiga, $(OS)))
|
|
271
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRMAN)/man3
|
|
272
|
+
$(INSTALL) -m 644 man3/miniupnpc.3 $(DESTDIR)$(INSTALLDIRMAN)/man3/miniupnpc.3
|
|
273
|
+
ifneq (, $(findstring linux, $(OS)))
|
|
274
|
+
gzip -f $(DESTDIR)$(INSTALLDIRMAN)/man3/miniupnpc.3
|
|
275
|
+
endif
|
|
276
|
+
endif
|
|
277
|
+
|
|
278
|
+
install-static: updateversion $(FILESTOINSTALL)
|
|
279
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRINC)
|
|
280
|
+
$(INSTALL) -m 644 $(HEADERS) $(DESTDIR)$(INSTALLDIRINC)
|
|
281
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRLIB)
|
|
282
|
+
$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
|
|
283
|
+
$(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
|
|
284
|
+
$(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip
|
|
285
|
+
|
|
286
|
+
cleaninstall:
|
|
287
|
+
$(RM) -r $(DESTDIR)$(INSTALLDIRINC)
|
|
288
|
+
$(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(LIBRARY)
|
|
289
|
+
$(RM) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
|
|
290
|
+
|
|
291
|
+
$(BUILD)/miniupnpc.pc: VERSION
|
|
292
|
+
@$(MKDIR) $(@D)
|
|
293
|
+
$(RM) $@
|
|
294
|
+
echo "prefix=$(INSTALLPREFIX)" >> $@
|
|
295
|
+
echo "exec_prefix=\$${prefix}" >> $@
|
|
296
|
+
echo "libdir=\$${exec_prefix}/$(LIBDIR)" >> $@
|
|
297
|
+
echo "includedir=\$${prefix}/include" >> $@
|
|
298
|
+
echo "" >> $@
|
|
299
|
+
echo "Name: miniUPnPc" >> $@
|
|
300
|
+
echo "Description: UPnP IGD client lightweight library" >> $@
|
|
301
|
+
echo "URL: https://miniupnp.tuxfamily.org/" >> $@
|
|
302
|
+
echo "Version: $(VERSION)" >> $@
|
|
303
|
+
echo "Libs: -L\$${libdir} -lminiupnpc" >> $@
|
|
304
|
+
echo "Cflags: -I\$${includedir}" >> $@
|
|
305
|
+
|
|
306
|
+
depend: $(DEPS)
|
|
307
|
+
|
|
308
|
+
$(LIBRARY): $(LIBOBJS)
|
|
309
|
+
ifneq (, $(findstring darwin, $(OS)))
|
|
310
|
+
$(LIBTOOL) -static -o $@ $?
|
|
311
|
+
else
|
|
312
|
+
$(AR) crs $@ $?
|
|
313
|
+
endif
|
|
314
|
+
|
|
315
|
+
$(SHAREDLIBRARY): $(LIBOBJS)
|
|
316
|
+
ifneq (, $(findstring darwin, $(OS)))
|
|
317
|
+
# $(CC) -dynamiclib $(LDFLAGS) -Wl,-install_name,$(SONAME) -o $@ $^
|
|
318
|
+
$(CC) -dynamiclib $(LDFLAGS) -Wl,-install_name,$(INSTALLDIRLIB)/$(SONAME) -o $@ $^
|
|
319
|
+
else
|
|
320
|
+
$(CC) -shared $(LDFLAGS) -Wl,-soname,$(SONAME) -o $@ $^
|
|
321
|
+
endif
|
|
322
|
+
|
|
323
|
+
$(BUILD)/%.o: $(SRCDIR)/%.c $(BUILD)/%.d
|
|
324
|
+
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
|
325
|
+
|
|
326
|
+
$(DEPS): $(BUILDINCLUDES)
|
|
327
|
+
|
|
328
|
+
$(BUILD)/%.d: $(SRCDIR)/%.c
|
|
329
|
+
@$(MKDIR) $(@D)
|
|
330
|
+
$(CC) $(CPPFLAGS) $(DEPFLAGS) -MT $@ -o $@ $<
|
|
331
|
+
|
|
332
|
+
$(BUILD)/upnpc-static: $(BUILD)/upnpc.o $(LIBRARY)
|
|
333
|
+
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
|
|
334
|
+
|
|
335
|
+
$(BUILD)/upnpc-shared: $(BUILD)/upnpc.o $(SHAREDLIBRARY)
|
|
336
|
+
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
|
|
337
|
+
|
|
338
|
+
$(BUILD)/upnp-listdevices-static: $(BUILD)/listdevices.o $(LIBRARY)
|
|
339
|
+
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
|
|
340
|
+
|
|
341
|
+
$(BUILD)/upnp-listdevices-shared: $(BUILD)/listdevices.o $(SHAREDLIBRARY)
|
|
342
|
+
$(CC) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
|
|
343
|
+
|
|
344
|
+
$(BUILD)/testminixml: $(TESTMINIXMLOBJS)
|
|
345
|
+
|
|
346
|
+
$(BUILD)/testminiwget: $(TESTMINIWGETOBJS)
|
|
347
|
+
|
|
348
|
+
$(BUILD)/minixmlvalid: $(addprefix $(BUILD)/, minixml.o minixmlvalid.o)
|
|
349
|
+
|
|
350
|
+
$(BUILD)/testupnpreplyparse: $(TESTUPNPREPLYPARSE)
|
|
351
|
+
|
|
352
|
+
$(BUILD)/testigddescparse: $(TESTIGDDESCPARSE)
|
|
353
|
+
|
|
354
|
+
$(BUILD)/testportlistingparse: $(TESTPORTLISTINGPARSE)
|
|
355
|
+
|
|
356
|
+
$(BUILD)/testaddr_is_reserved: $(TESTADDR_IS_RESERVED)
|
|
357
|
+
|
|
358
|
+
$(BUILD)/miniupnpcstrings.h: miniupnpcstrings.h.in updateminiupnpcstrings.sh VERSION
|
|
359
|
+
@$(MKDIR) $(@D)
|
|
360
|
+
$(SH) updateminiupnpcstrings.sh $@ $<
|
|
361
|
+
|
|
362
|
+
# ftp tool supplied with OpenBSD can download files from http.
|
|
363
|
+
jnaerator-%.jar:
|
|
364
|
+
wget $(JNAERATORBASEURL)/$@ || \
|
|
365
|
+
curl -o $@ $(JNAERATORBASEURL)/$@ || \
|
|
366
|
+
ftp $(JNAERATORBASEURL)/$@
|
|
367
|
+
|
|
368
|
+
jar: $(SHAREDLIBRARY) $(JNAERATOR)
|
|
369
|
+
$(JAVA) -jar $(JNAERATOR) $(JNAERATORARGS) \
|
|
370
|
+
miniupnpc.h miniupnpc_declspec.h upnpcommands.h upnpreplyparse.h \
|
|
371
|
+
igd_desc_parse.h miniwget.h upnperrors.h $(SHAREDLIBRARY) \
|
|
372
|
+
-package fr.free.miniupnp -o . -jar java/miniupnpc_$(JARSUFFIX).jar -v
|
|
373
|
+
|
|
374
|
+
mvn_install:
|
|
375
|
+
mvn install:install-file -Dfile=java/miniupnpc_$(JARSUFFIX).jar \
|
|
376
|
+
-DgroupId=com.github \
|
|
377
|
+
-DartifactId=miniupnp \
|
|
378
|
+
-Dversion=$(VERSION) \
|
|
379
|
+
-Dpackaging=jar \
|
|
380
|
+
-Dclassifier=$(JARSUFFIX) \
|
|
381
|
+
-DgeneratePom=true \
|
|
382
|
+
-DcreateChecksum=true
|
|
383
|
+
|
|
384
|
+
# make .deb packages
|
|
385
|
+
deb: /usr/share/pyshared/stdeb all
|
|
386
|
+
(python setup.py --command-packages=stdeb.command bdist_deb)
|
|
387
|
+
|
|
388
|
+
# install .deb packages
|
|
389
|
+
ideb:
|
|
390
|
+
(sudo dpkg -i deb_dist/*.deb)
|
|
391
|
+
|
|
392
|
+
/usr/share/pyshared/stdeb: /usr/share/doc/python-all-dev
|
|
393
|
+
(sudo apt-get install python-stdeb)
|
|
394
|
+
|
|
395
|
+
/usr/share/doc/python-all-dev:
|
|
396
|
+
(sudo apt-get install python-all-dev)
|
|
397
|
+
|
|
398
|
+
minihttptestserver: minihttptestserver.o
|
|
399
|
+
|
|
400
|
+
print-%:
|
|
401
|
+
@echo "$* = $($*)"
|
|
402
|
+
|
|
403
|
+
ifneq ($(MAKECMDGOALS),clean)
|
|
404
|
+
-include $(DEPS)
|
|
405
|
+
endif
|
miniupnpc-2.2.8/PKG-INFO
ADDED
|
@@ -2,7 +2,7 @@ Project: miniupnp
|
|
|
2
2
|
Project web page: http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
3
3
|
github: https://github.com/miniupnp/miniupnp
|
|
4
4
|
Author: Thomas Bernard
|
|
5
|
-
Copyright (c) 2005-
|
|
5
|
+
Copyright (c) 2005-2023 Thomas Bernard
|
|
6
6
|
This software is subject to the conditions detailed in the
|
|
7
7
|
LICENSE file provided within this distribution.
|
|
8
8
|
|
|
@@ -12,6 +12,8 @@ LICENSE file provided within this distribution.
|
|
|
12
12
|
To compile, simply run 'gmake' (could be 'make' on your system).
|
|
13
13
|
Under win32, to compile with MinGW, type "mingw32make.bat".
|
|
14
14
|
MS Visual C solution and project files are supplied in the msvc/ subdirectory.
|
|
15
|
+
The miniupnpc library is available as a static library or as a DLL :
|
|
16
|
+
define MINIUPNP_STATICLIB if you want to link against the static library.
|
|
15
17
|
|
|
16
18
|
The compilation is known to work under linux, FreeBSD,
|
|
17
19
|
OpenBSD, MacOS X, AmigaOS and cygwin.
|
|
@@ -59,5 +61,32 @@ send me an email !
|
|
|
59
61
|
For any question, you can use the web forum :
|
|
60
62
|
https://miniupnp.tuxfamily.org/forum/
|
|
61
63
|
|
|
62
|
-
Bugs should be reported on
|
|
64
|
+
Bugs should be reported on GitHub :
|
|
63
65
|
https://github.com/miniupnp/miniupnp/issues
|
|
66
|
+
|
|
67
|
+
* Linux firewall configuration for UPnP clients *
|
|
68
|
+
|
|
69
|
+
Due to how UPnP protocol is designed, unicast responses to UPnP multicast client
|
|
70
|
+
requests are not tracked by Linux netfilter. And therefore netfilter executes
|
|
71
|
+
default action for them (which is in most cases DROP response packet).
|
|
72
|
+
|
|
73
|
+
To workaround this limitation, custom ipset hash table can be used. It is
|
|
74
|
+
supported since Linux kernel >= 2.6.39.
|
|
75
|
+
|
|
76
|
+
Rules for IPv4:
|
|
77
|
+
$ ipset create upnp hash:ip,port timeout 3
|
|
78
|
+
$ iptables -A OUTPUT -d 239.255.255.250/32 -p udp -m udp --dport 1900 -j SET --add-set upnp src,src --exist
|
|
79
|
+
$ iptables -A INPUT -p udp -m set --match-set upnp dst,dst -j ACCEPT
|
|
80
|
+
$ iptables -A INPUT -d 239.255.255.250/32 -p udp -m udp --dport 1900 -j ACCEPT
|
|
81
|
+
|
|
82
|
+
Rules for IPv6:
|
|
83
|
+
$ ipset create upnp6 hash:ip,port timeout 3 family inet6
|
|
84
|
+
$ ip6tables -A OUTPUT -d ff02::c/128 -p udp -m udp --dport 1900 -j SET --add-set upnp6 src,src --exist
|
|
85
|
+
$ ip6tables -A OUTPUT -d ff05::c/128 -p udp -m udp --dport 1900 -j SET --add-set upnp6 src,src --exist
|
|
86
|
+
$ ip6tables -A INPUT -p udp -m set --match-set upnp6 dst,dst -j ACCEPT
|
|
87
|
+
$ ip6tables -A INPUT -d ff02::c/128 -p udp -m udp --dport 1900 -j ACCEPT
|
|
88
|
+
$ ip6tables -A INPUT -d ff05::c/128 -p udp -m udp --dport 1900 -j ACCEPT
|
|
89
|
+
|
|
90
|
+
Detailed description is available on:
|
|
91
|
+
https://serverfault.com/a/911286
|
|
92
|
+
https://unix.stackexchange.com/a/444804
|
miniupnpc-2.2.8/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.2.8
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/* $Id: miniupnpc.h,v 1.
|
|
2
|
-
/*
|
|
3
|
-
*
|
|
1
|
+
/* $Id: miniupnpc.h,v 1.66 2024/06/08 22:13:14 nanard Exp $ */
|
|
2
|
+
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
3
|
+
* Project: miniupnp
|
|
4
|
+
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
4
5
|
* Author: Thomas Bernard
|
|
5
|
-
* Copyright (c) 2005-
|
|
6
|
+
* Copyright (c) 2005-2024 Thomas Bernard
|
|
6
7
|
* This software is subjects to the conditions detailed
|
|
7
8
|
* in the LICENCE file provided within this distribution */
|
|
8
9
|
#ifndef MINIUPNPC_H_INCLUDED
|
|
@@ -19,11 +20,11 @@
|
|
|
19
20
|
#define UPNPDISCOVER_MEMORY_ERROR (-102)
|
|
20
21
|
|
|
21
22
|
/* versions : */
|
|
22
|
-
#define MINIUPNPC_VERSION "2.
|
|
23
|
-
#define MINIUPNPC_API_VERSION
|
|
23
|
+
#define MINIUPNPC_VERSION "2.2.8"
|
|
24
|
+
#define MINIUPNPC_API_VERSION 18
|
|
24
25
|
|
|
25
26
|
/* Source port:
|
|
26
|
-
Using "1" as an alias for 1900 for backwards
|
|
27
|
+
Using "1" as an alias for 1900 for backwards compatibility
|
|
27
28
|
(presuming one would have used that for the "sameport" parameter) */
|
|
28
29
|
#define UPNP_LOCAL_PORT_ANY 0
|
|
29
30
|
#define UPNP_LOCAL_PORT_SAME 1
|
|
@@ -107,9 +108,11 @@ struct UPNPUrls {
|
|
|
107
108
|
* return values :
|
|
108
109
|
* 0 = NO IGD found
|
|
109
110
|
* 1 = A valid connected IGD has been found
|
|
110
|
-
* 2 = A valid IGD has been found but
|
|
111
|
+
* 2 = A valid connected IGD has been found but its
|
|
112
|
+
* IP address is reserved (non routable)
|
|
113
|
+
* 3 = A valid IGD has been found but it reported as
|
|
111
114
|
* not connected
|
|
112
|
-
*
|
|
115
|
+
* 4 = an UPnP device has been found but was not recognized as an IGD
|
|
113
116
|
*
|
|
114
117
|
* In any non zero return case, the urls and data structures
|
|
115
118
|
* passed as parameters are set. Donc forget to call FreeUPNPUrls(urls) to
|
|
@@ -118,8 +121,9 @@ struct UPNPUrls {
|
|
|
118
121
|
MINIUPNP_LIBSPEC int
|
|
119
122
|
UPNP_GetValidIGD(struct UPNPDev * devlist,
|
|
120
123
|
struct UPNPUrls * urls,
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
struct IGDdatas * data,
|
|
125
|
+
char * lanaddr, int lanaddrlen,
|
|
126
|
+
char * wanaddr, int wanaddrlen);
|
|
123
127
|
|
|
124
128
|
/* UPNP_GetIGDFromUrl()
|
|
125
129
|
* Used when skipping the discovery process.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/* $Id: miniupnpctypes.h,v 1.1 2011/02/15 11:10:40 nanard Exp $ */
|
|
2
2
|
/* Miniupnp project : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org
|
|
3
3
|
* Author : Thomas Bernard
|
|
4
|
-
* Copyright (c)
|
|
4
|
+
* Copyright (c) 2021 Thomas Bernard
|
|
5
5
|
* This software is subject to the conditions detailed in the
|
|
6
6
|
* LICENCE file provided within this distribution */
|
|
7
7
|
#ifndef MINIUPNPCTYPES_H_INCLUDED
|
|
8
8
|
#define MINIUPNPCTYPES_H_INCLUDED
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/* Use unsigned long long when available :
|
|
11
|
+
* strtoull is C99 */
|
|
12
|
+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
11
13
|
#define UNSIGNED_INTEGER unsigned long long
|
|
12
14
|
#define STRTOUI strtoull
|
|
13
15
|
#else
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
extern "C" {
|
|
15
15
|
#endif
|
|
16
16
|
|
|
17
|
-
MINIUPNP_LIBSPEC void * getHTTPResponse(int s, int * size, int * status_code);
|
|
18
|
-
|
|
19
17
|
MINIUPNP_LIBSPEC void * miniwget(const char *, int *, unsigned int, int *);
|
|
20
18
|
|
|
21
19
|
MINIUPNP_LIBSPEC void * miniwget_getaddr(const char *, int *, char *, int, unsigned int, int *);
|
|
@@ -27,4 +25,3 @@ int parseURL(const char *, char *, unsigned short *, char * *, unsigned int *);
|
|
|
27
25
|
#endif
|
|
28
26
|
|
|
29
27
|
#endif
|
|
30
|
-
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
/* $Id: upnpcommands.h,v 1.
|
|
1
|
+
/* $Id: upnpcommands.h,v 1.32 2018/03/13 23:34:47 nanard Exp $ */
|
|
2
2
|
/* Miniupnp project : http://miniupnp.free.fr/
|
|
3
3
|
* Author : Thomas Bernard
|
|
4
|
-
* Copyright (c) 2005-
|
|
4
|
+
* Copyright (c) 2005-2018 Thomas Bernard
|
|
5
5
|
* This software is subject to the conditions detailed in the
|
|
6
6
|
* LICENCE file provided within this distribution */
|
|
7
7
|
#ifndef UPNPCOMMANDS_H_INCLUDED
|
|
8
8
|
#define UPNPCOMMANDS_H_INCLUDED
|
|
9
9
|
|
|
10
|
-
#include "upnpreplyparse.h"
|
|
11
|
-
#include "portlistingparse.h"
|
|
12
10
|
#include "miniupnpc_declspec.h"
|
|
13
11
|
#include "miniupnpctypes.h"
|
|
14
12
|
|
|
@@ -24,6 +22,8 @@
|
|
|
24
22
|
extern "C" {
|
|
25
23
|
#endif
|
|
26
24
|
|
|
25
|
+
struct PortMappingParserData;
|
|
26
|
+
|
|
27
27
|
MINIUPNP_LIBSPEC UNSIGNED_INTEGER
|
|
28
28
|
UPNP_GetTotalBytesSent(const char * controlURL,
|
|
29
29
|
const char * servicetype);
|
|
@@ -206,9 +206,9 @@ UPNP_DeletePortMappingRange(const char * controlURL, const char * servicetype,
|
|
|
206
206
|
/* UPNP_GetPortMappingNumberOfEntries()
|
|
207
207
|
* not supported by all routers */
|
|
208
208
|
MINIUPNP_LIBSPEC int
|
|
209
|
-
UPNP_GetPortMappingNumberOfEntries(const char* controlURL,
|
|
210
|
-
const char* servicetype,
|
|
211
|
-
unsigned int *
|
|
209
|
+
UPNP_GetPortMappingNumberOfEntries(const char * controlURL,
|
|
210
|
+
const char * servicetype,
|
|
211
|
+
unsigned int * numEntries);
|
|
212
212
|
|
|
213
213
|
/* UPNP_GetSpecificPortMappingEntry()
|
|
214
214
|
* retrieves an existing port mapping
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* $Id: upnpdev.h,v 1.
|
|
1
|
+
/* $Id: upnpdev.h,v 1.4 2021/08/21 09:45:01 nanard Exp $ */
|
|
2
2
|
/* Project : miniupnp
|
|
3
|
-
* Web : http://miniupnp.free.fr/
|
|
3
|
+
* Web : http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
4
4
|
* Author : Thomas BERNARD
|
|
5
|
-
* copyright (c) 2005-
|
|
5
|
+
* copyright (c) 2005-2021 Thomas Bernard
|
|
6
6
|
* This software is subjet to the conditions detailed in the
|
|
7
7
|
* provided LICENSE file. */
|
|
8
8
|
#ifndef UPNPDEV_H_INCLUDED
|
|
@@ -18,9 +18,17 @@ struct UPNPDev {
|
|
|
18
18
|
struct UPNPDev * pNext;
|
|
19
19
|
char * descURL;
|
|
20
20
|
char * st;
|
|
21
|
-
unsigned int scope_id;
|
|
22
21
|
char * usn;
|
|
23
|
-
|
|
22
|
+
unsigned int scope_id;
|
|
23
|
+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
24
|
+
/* C99 flexible array member */
|
|
25
|
+
char buffer[];
|
|
26
|
+
#elif defined(__GNUC__)
|
|
27
|
+
char buffer[0];
|
|
28
|
+
#else
|
|
29
|
+
/* Fallback to a hack */
|
|
30
|
+
char buffer[1];
|
|
31
|
+
#endif
|
|
24
32
|
};
|
|
25
33
|
|
|
26
34
|
/* freeUPNPDevlist()
|