Commit Graph

80 Commits

Author SHA1 Message Date
Thomas Bernard c4991916e5 miniupnpc: change miniwget to return HTTP status code
increments API_VERSION to 16
2016-01-24 18:30:41 +01:00
Thomas Bernard d274456d07 UPNP_GetValidIGD() checks external ip address = 0.0.0.0
(or empty string)
2016-01-24 17:38:40 +01:00
Thomas Bernard d1243e157d parse HTTP response status line in miniwget.c 2016-01-22 16:53:19 +01:00
Thomas Bernard 99c7aeef4d Improve UPNPIGD_IsConnected() to check if WAN address is not private. 2016-01-22 15:22:01 +01:00
Thomas Bernard 2e30127cee 2016 ! 2016-01-17 19:36:29 +01:00
Thomas Bernard 6e8fda2358 fix previous commit 53804c3db
allow calling UPNP_GetValidIGD() with lanaddr=NULL
2015-12-11 17:48:43 +01:00
Denis Leroy 53804c3db3 Fix bug in returning IGD LAN address 2015-12-11 16:59:38 +01:00
Thomas Bernard 06417600f8 miniupnpc.c: simpleUPnPcommand2() C++ => C comments
also reindentation, move declaration of soapbodylen up
vim stuff :)
2015-10-26 11:44:40 +01:00
Wladimir J. van der Laan fb02299fff More accurate checking while writing buffer in simpleUPnPcommand2
Account exactly for bytes when building buffer in simpleUPnPcommand2.
The margin of 100 is not guaranteed to always be enough. When long
parameters are passed in, it was possible to overflow the buffer.
2015-10-25 21:48:00 +01:00
Wladimir J. van der Laan 4c90b87ce3 Check snprintf result
Verify that the buffer size was large enough to write the output,
raise an error condition if not.
2015-10-25 21:13:23 +01:00
Thomas Bernard d4af610c51 Merge branch 'master' into local_port
Conflicts:
	miniupnpc/miniupnpc.c
	miniupnpc/miniupnpc.h
	miniupnpc/miniupnpcmodule.c
	miniupnpc/upnpc.c
2015-10-08 17:42:45 +02:00
Thomas Bernard e1344f74aa removed unused variable under win32 2015-09-16 00:12:35 +02:00
Thomas Bernard 46f4679508 miniupnpc.c: clean #define's 2015-09-04 17:37:11 +02:00
Thomas Bernard 2400d2f8d2 Merge branch 'refact_ssdpc'
Conflicts:
	miniupnpc/miniupnpc.c

was because of aba8c3f3d7
2015-08-27 22:29:53 +02:00
Thomas Bernard d0c8154d74 miniupnpc.c: add minissdpd and discovered devices list 2015-08-27 22:22:35 +02:00
Thomas Bernard aba8c3f3d7 miniupnpc.c: use unsigned long for IP_MULTICAST_TTL with win32
fixes 1da63faa4f for win32
2015-08-26 18:47:27 +02:00
Thomas Bernard fd8e8e7593 miniupnpc: Also accept "Up" as ConnectionStatus value 2015-08-16 22:10:48 +02:00
Konstantin Tokarev 353f101655 Moved SSDP discovery code into minissdpc.c 2015-08-03 20:09:26 +03:00
Konstantin Tokarev fd65c0a9df Moved UPNPDev definition to separate header. 2015-08-03 20:09:26 +03:00
Thomas Bernard 1da63faa4f miniupnpc: add ttl argument to upnpDiscover() functions
increments API_VERSION to 14
2015-07-23 22:44:37 +02:00
Konstantin Tokarev cffba15387 Split getDevicesFromMiniSSDPD into 4 steps to allow reuse of local socket.
It allows allows client application to use event loop instead of blocking
in read() while waiting for server reply.
2015-07-23 16:22:23 +03:00
Konstantin Tokarev 2c56ffceeb Fixed typo in setsockopt invocation which sets TTL. 2015-07-23 12:40:42 +03:00
Thomas Bernard af2ec81f14 Merge branch 'read_usn' 2015-07-22 23:50:44 +02:00
Thomas Bernard 963eefcae5 miniupnpc.c: dont break if USN is not set
USN is mandatory, but don't break if the packet don't follow the standard and misses USN: header
2015-07-22 23:46:44 +02:00
Thomas Bernard 151b16a1ed miniupnpc.c: set multicast TTL to 2 by default 2015-07-22 15:00:01 +02:00
Konstantin Tokarev eb74f5c886 Read USN from SSDP messages. 2015-07-22 12:08:52 +03:00
Thomas Bernard e0999ace78 miniupnpc: Check malloc/calloc return values
fixes #136
2015-07-15 14:48:57 +02:00
Thomas Bernard 27e2aa3841 miniupnpc: update getDevicesFromMiniSSDPD() to process longer minissdpd responses 2015-06-16 17:33:59 +02:00
Thomas Bernard eec3f12012 miniupnpc: minor code/comments modifications 2015-06-11 14:28:35 +02:00
Thomas Bernard 76f52c81de fixes 5c6a140098 2015-06-09 17:20:30 +02:00
Thomas Bernard a2adfcd05d miniupnpc/miniupnpc.c: don't wait several times for the timeout in upnpDiscoverDevices() 2015-05-22 12:44:38 +02:00
Thomas Bernard 0bf168d306 miniupnpc.c: minor comment reformatting 2015-05-22 12:27:38 +02:00
Thomas Bernard 5c6a140098 miniupnpc: add searchalltypes param to upnpDiscoverDevices()
increase API_VERSION to 13
2015-05-22 12:25:51 +02:00
Nevo Hed 94a5af0c15 Allow user to explicitly specify local (source) port
See https://github.com/miniupnp/miniupnp/issues/119

- Replace the sameport parameter to the upnpDiscover* functions
- Added constants UPNP_LOCAL_PORT_ANY(0) & UPNP_LOCAL_PORT_SAME(1).  The
  value "1" was chosen for presumed backwards compatability with the
  previous "sameport" parameter (assuming usesr would have set to 1 if
  they wanted same port)
- Can be specified with "-z" to the test programs "upnpc" & "pymoduletest.py"
2015-05-12 19:05:48 -04:00
Maks Naumov 81dc08d290 Fix setsockopt() for IPV6_MULTICAST_IF
32bit: sizeof(&ifindex) == sizeof(void *) == 4
64bit: sizeof(&ifindex) == sizeof(void *) == 8

As a result, it is "ifindex" oob acces on 64bit platforms.
2015-01-21 16:44:36 +01:00
Thomas Bernard c72591e72e miniupnpc/miniupnpc.c: fix compilation under WIN32 2014-12-01 10:31:50 +01:00
Thomas Bernard 4cae31c948 miniupnpc.c: dont use if_indextoname() under MS Windows
fixes #85
2014-11-27 12:59:12 +01:00
Thomas Bernard 3690785a79 miniupnpc/miniupnpc.c: accept all versions of urn:schemas-upnp-org:service:WANCommonInterfaceConfig: service 2014-11-18 00:01:48 +01:00
Thomas Bernard 04b7126079 miniupnpc: fix LIBSPEC => MINIUPNP_LIBSPEC 2014-11-13 11:05:09 +01:00
Thomas Bernard 9325bacbfc Merge branch 'master' into search_all
Conflicts:
	miniupnpc/.gitignore
	miniupnpc/Makefile
	miniupnpc/miniupnpc.c
2014-11-13 11:02:28 +01:00
Thomas Bernard edfd211276 miniupnpc/miniupnpc.c: simplified function GetUPNPUrls() 2014-11-05 07:09:42 +01:00
Thomas Bernard 78d32ba012 Merge remote branch 'mikedld/remove-macosx-macro' 2014-06-16 10:54:03 +02:00
Mike Gelfand 920845b107 Use built-in __APPLE__ macro instead of MACOSX
GCC and Clang on Mac OS have a built-in __APPLE__ macro. Use it instead of
manually-defined MACOSX.
2014-06-15 04:14:43 +03:00
Thomas BERNARD 011e7e7acd Merge pull request #77 from mikedld/miniupnp-staticlib
Rename STATICLIB macro to resolve natpmp/miniupnp conflict
2014-06-02 18:54:33 +02:00
Thomas Bernard e222e50b24 miniupnpc: Compile with GNU/Hurd and GNU/kFreeBSD 2014-06-02 17:13:52 +02:00
Mike Gelfand 2e4011ce33 Rename LIBSPEC macro to resolve natpmp/miniupnp conflict
Same macro name is used in both natpmp and miniupnp libraries so it's
impossble to link one statically and another dynamically. This patch
renames the macro to have library-specific name.
2014-06-01 13:35:13 +03:00
Thomas Bernard 4e44ef642a Merge branch 'master' into search_all
Conflicts:
	miniupnpc/miniupnpc.c
2014-04-14 17:32:27 +02:00
Thomas Bernard ab7865ae99 miniupnpc.c: translate comment from French to English :) 2014-01-31 15:20:15 +01:00
Thomas Bernard bf3a91ba83 miniupnpc.c: added upnpDiscoverDevice() 2014-01-31 14:59:21 +01:00
Thomas Bernard 18d54e2ae0 miniupnpc.c: MX cannot be 0 2013-12-13 12:50:25 +01:00