• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

java/H03-May-2022-116100

man3/H03-May-2022-5654

msvc/H03-May-2022-1,7561,722

testdesc/H03-May-2022-237226

testreplyparse/H03-May-2022-3822

LICENSEH A D09-Nov-20201.4 KiB2823

MANIFEST.inH A D02-Nov-2017150 109

MakefileH A D03-May-202213.4 KiB417306

Makefile.mingwH A D02-Mar-20214.2 KiB14597

READMEH A D09-Nov-20203.4 KiB9369

VERSIONH A D02-Mar-20216 21

addr_is_reserved.cH A D02-Mar-20212.8 KiB8058

addr_is_reserved.hH A D28-Sep-2020540 154

codelength.hH A D15-Jul-20151.5 KiB5525

connecthostport.cH A D09-Nov-20207.4 KiB285247

connecthostport.hH A D06-Apr-2018643 216

external-ip.shH A D02-Nov-2017161 51

igd_desc_parse.cH A D17-Sep-20154.5 KiB12493

igd_desc_parse.hH A D26-Nov-20141.6 KiB5027

listdevices.cH A D03-May-20185.6 KiB198179

mingw32make.batH A D19-Dec-2009212 98

minihttptestserver.cH A D29-May-202015.7 KiB691582

minisoap.cH A D09-Nov-20203.4 KiB11879

minisoap.hH A D06-Apr-2018540 186

minissdpc.cH A D02-Mar-202127.4 KiB995873

minissdpc.hH A D10-Feb-20191.6 KiB5936

miniupnpc-config.cmakeH A D03-Dec-2020306 76

miniupnpc.cH A D02-Mar-202119.9 KiB699582

miniupnpc.defH A D10-May-20201 KiB4947

miniupnpc.hH A D02-Mar-20215 KiB15471

miniupnpc.rcH A D03-Dec-20201.2 KiB3735

miniupnpc_declspec.hH A D21-Jul-2015560 2216

miniupnpc_socketdef.hH A D02-Mar-20211,014 4529

miniupnpcmodule.cH A D02-Mar-202120.6 KiB731642

miniupnpcstrings.h.cmakeH A D07-Nov-2014376 1612

miniupnpcstrings.h.inH A D07-Nov-2014693 2419

miniupnpctypes.hH A D04-Oct-2012610 2010

miniwget.cH A D09-Nov-202016.5 KiB665572

miniwget.hH A D06-Apr-2018690 2813

miniwget_private.hH A D06-Apr-2018452 165

minixml.cH A D12-Dec-20175.7 KiB232181

minixml.hH A D10-Feb-20191.2 KiB3816

minixmlvalid.cH A D15-Jul-20153.5 KiB164133

portlistingparse.cH A D29-Mar-20203.9 KiB178149

portlistingparse.hH A D21-Jul-20151.8 KiB6637

pymoduletest.pyH A D10-May-20202.7 KiB8963

receivedata.cH A D02-Mar-20213 KiB10691

receivedata.hH A D06-Apr-2018749 227

setup.pyH A D03-May-20221.1 KiB3621

setupmingw32.pyH A D15-Oct-20201.2 KiB3624

testaddr_is_reserved.cH A D15-Oct-20201.2 KiB4735

testigddescparse.cH A D10-Feb-20194.4 KiB188170

testminiwget.cH A D18-Jan-20181.5 KiB5740

testminiwget.shH A D29-May-20202.7 KiB12386

testminixml.cH A D26-Nov-20141.8 KiB9069

testportlistingparse.cH A D01-Nov-20144.7 KiB152133

testupnpigd.pyH A D10-May-20202.4 KiB8956

testupnpreplyparse.cH A D12-Dec-20172.3 KiB116103

testupnpreplyparse.shH A D14-May-2013208 1510

updateminiupnpcstrings.shH A D27-Jan-20111.5 KiB5436

upnpc.cH A D02-Mar-202127.5 KiB875785

upnpcommands.cH A D30-Apr-201934.3 KiB1,2391,045

upnpcommands.hH A D10-Feb-201913.3 KiB349146

upnpdev.cH A D28-Aug-2015569 2412

upnpdev.hH A D29-May-2020948 4525

upnperrors.cH A D24-Aug-20192.2 KiB113102

upnperrors.hH A D21-Jul-2015624 2711

upnpreplyparse.cH A D08-Apr-20194.4 KiB198170

upnpreplyparse.hH A D27-Oct-20141.3 KiB6440

win32_snprintf.hH A D09-Nov-20202.4 KiB7243

wingenminiupnpcstrings.cH A D03-Dec-20203.5 KiB11685

README

1Project: miniupnp
2Project web page: http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
3github: https://github.com/miniupnp/miniupnp
4Author: Thomas Bernard
5Copyright (c) 2005-2020 Thomas Bernard
6This software is subject to the conditions detailed in the
7LICENSE file provided within this distribution.
8
9
10* miniUPnP Client - miniUPnPc *
11
12To compile, simply run 'gmake' (could be 'make' on your system).
13Under win32, to compile with MinGW, type "mingw32make.bat".
14MS Visual C solution and project files are supplied in the msvc/ subdirectory.
15The miniupnpc library is available as a static library or as a DLL :
16define MINIUPNP_STATICLIB if you want to link against the static library.
17
18The compilation is known to work under linux, FreeBSD,
19OpenBSD, MacOS X, AmigaOS and cygwin.
20The official AmigaOS4.1 SDK was used for AmigaOS4 and GeekGadgets for AmigaOS3.
21upx (http://upx.sourceforge.net) is used to compress the win32 .exe files.
22
23To install the library and headers on the system use :
24> su
25> make install
26> exit
27
28alternatively, to install into a specific location, use :
29> INSTALLPREFIX=/usr/local make install
30
31upnpc.c is a sample client using the libminiupnpc.
32To use the libminiupnpc in your application, link it with
33libminiupnpc.a (or .so) and use the following functions found in miniupnpc.h,
34upnpcommands.h and miniwget.h :
35- upnpDiscover()
36- UPNP_GetValidIGD()
37- miniwget()
38- parserootdesc()
39- GetUPNPUrls()
40- UPNP_* (calling UPNP methods)
41
42Note : use #include <miniupnpc/miniupnpc.h> etc... for the includes
43and -lminiupnpc for the link
44
45Discovery process is speeded up when MiniSSDPd is running on the machine.
46
47
48* Python module *
49
50you can build a python module with 'make pythonmodule'
51and install it with 'make installpythonmodule'.
52setup.py (and setupmingw32.py) are included in the distribution.
53
54
55Feel free to contact me if you have any problem :
56e-mail : miniupnp@free.fr
57
58If you are using libminiupnpc in your application, please
59send me an email !
60
61For any question, you can use the web forum :
62https://miniupnp.tuxfamily.org/forum/
63
64Bugs should be reported on github :
65https://github.com/miniupnp/miniupnp/issues
66
67* Linux firewall configuration for UPnP clients *
68
69Due to how UPnP protocol is designed, unicast responses to UPnP multicast client
70requests are not tracked by Linux netfilter. And therefore netfilter executes
71default action for them (which is in most cases DROP response packet).
72
73To workaround this limitation, custom ipset hash table can be used. It is
74supported since Linux kernel >= 2.6.39.
75
76Rules 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
82Rules 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
90Detailed description is available on:
91https://serverfault.com/a/911286
92https://unix.stackexchange.com/a/444804
93