diff --git a/third-party/libnatpmp/README b/third-party/libnatpmp/README index 50fdd1093..c8b37718d 100644 --- a/third-party/libnatpmp/README +++ b/third-party/libnatpmp/README @@ -1,4 +1,4 @@ libnatpmp is written by Thomas Bernard. Its homepage is http://miniupnp.tuxfamily.org/libnatpmp.html -This code is from the libnatpmp-20090310 snapshot +This code is from the libnatpmp-20090605 snapshot diff --git a/third-party/libnatpmp/getgateway.c b/third-party/libnatpmp/getgateway.c index 3c84de3a6..7eed5cb15 100644 --- a/third-party/libnatpmp/getgateway.c +++ b/third-party/libnatpmp/getgateway.c @@ -1,4 +1,4 @@ -/* $Id: getgateway.c,v 1.13 2009/03/10 10:15:31 nanard Exp $ */ +/* $Id: getgateway.c,v 1.14 2009/06/04 22:27:53 nanard Exp $ */ /* libnatpmp * Copyright (c) 2007-2008, Thomas BERNARD * @@ -56,6 +56,17 @@ #define USE_WIN32_CODE #endif +#ifdef __CYGWIN__ +#undef USE_PROC_NET_ROUTE +#undef USE_SOCKET_ROUTE +#undef USE_SYSCTL_NET_ROUTE +#define USE_WIN32_CODE +#include +#include +#include +#include +#endif + #ifdef USE_SYSCTL_NET_ROUTE #include #include @@ -261,7 +272,7 @@ int getdefaultgateway(in_addr_t *addr) #endif /* #ifdef USE_SOCKET_ROUTE */ #ifdef USE_WIN32_CODE -int getdefaultgateway(in_addr_t * addr) +LIBSPEC int getdefaultgateway(in_addr_t * addr) { HKEY networkCardsKey; HKEY networkCardKey; diff --git a/third-party/libnatpmp/natpmp.c b/third-party/libnatpmp/natpmp.c index f1c95b1ad..5c6ca13cd 100644 --- a/third-party/libnatpmp/natpmp.c +++ b/third-party/libnatpmp/natpmp.c @@ -1,4 +1,4 @@ -/* $Id: natpmp.c,v 1.8 2008/07/02 22:33:06 nanard Exp $ */ +/* $Id: natpmp.c,v 1.9 2009/06/04 22:27:53 nanard Exp $ */ /* libnatpmp * Copyright (c) 2007-2008, Thomas BERNARD * http://miniupnp.free.fr/libnatpmp.html @@ -18,8 +18,9 @@ #include #include #ifdef WIN32 +#include #include -#include +#include #include #define EWOULDBLOCK WSAEWOULDBLOCK #define ECONNREFUSED WSAECONNREFUSED @@ -34,7 +35,7 @@ #include "natpmp.h" #include "getgateway.h" -int initnatpmp(natpmp_t * p) +LIBSPEC int initnatpmp(natpmp_t * p) { #ifdef WIN32 u_long ioctlArg = 1; @@ -70,7 +71,7 @@ int initnatpmp(natpmp_t * p) return 0; } -int closenatpmp(natpmp_t * p) +LIBSPEC int closenatpmp(natpmp_t * p) { if(!p) return NATPMP_ERR_INVALIDARGS; @@ -79,7 +80,7 @@ int closenatpmp(natpmp_t * p) return 0; } -static int sendpendingrequest(natpmp_t * p) +int sendpendingrequest(natpmp_t * p) { int r; /* struct sockaddr_in addr;*/ @@ -95,7 +96,7 @@ static int sendpendingrequest(natpmp_t * p) return (r<0) ? NATPMP_ERR_SENDERR : r; } -static int sendnatpmprequest(natpmp_t * p) +int sendnatpmprequest(natpmp_t * p) { int n; if(!p) @@ -113,7 +114,7 @@ static int sendnatpmprequest(natpmp_t * p) return n; } -int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout) +LIBSPEC int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout) { struct timeval now; if(!p || !timeout) @@ -131,7 +132,7 @@ int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout) return 0; } -int sendpublicaddressrequest(natpmp_t * p) +LIBSPEC int sendpublicaddressrequest(natpmp_t * p) { if(!p) return NATPMP_ERR_INVALIDARGS; @@ -143,7 +144,7 @@ int sendpublicaddressrequest(natpmp_t * p) return sendnatpmprequest(p); } -int sendnewportmappingrequest(natpmp_t * p, int protocol, +LIBSPEC int sendnewportmappingrequest(natpmp_t * p, int protocol, uint16_t privateport, uint16_t publicport, uint32_t lifetime) { @@ -160,7 +161,7 @@ int sendnewportmappingrequest(natpmp_t * p, int protocol, return sendnatpmprequest(p); } -static int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response) +LIBSPEC int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response) { unsigned char buf[16]; struct sockaddr_in addr; @@ -268,7 +269,7 @@ int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response) } #ifdef ENABLE_STRNATPMPERR -const char * strnatpmperr(int r) +LIBSPEC const char * strnatpmperr(int r) { const char * s; switch(r) { diff --git a/third-party/miniupnp/README b/third-party/miniupnp/README index 45aec9084..7e08e8cfa 100644 --- a/third-party/miniupnp/README +++ b/third-party/miniupnp/README @@ -1,3 +1,3 @@ MiniUPnP is written by Thomas Bernard. Its homepage is http://miniupnp.free.fr/ -This is from miniupnpc-1.3.tar.gz +This is from miniupnpc-20090605.tar.gz diff --git a/third-party/miniupnp/miniupnpcstrings.h b/third-party/miniupnp/miniupnpcstrings.h index b1b38533a..8f1b6c26d 100644 --- a/third-party/miniupnp/miniupnpcstrings.h +++ b/third-party/miniupnp/miniupnpcstrings.h @@ -1,15 +1,15 @@ -/* $Id: miniupnpcstrings.h,v 1.2 2008/10/14 17:39:04 nanard Exp $ */ +/* $Id: miniupnpcstrings.h,v 1.3 2009/06/04 09:05:56 nanard Exp $ */ /* Project: miniupnp * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * Author: Thomas Bernard - * Copyright (c) 2005-2008 Thomas Bernard + * Copyright (c) 2005-2009 Thomas Bernard * This software is subjects to the conditions detailed * in the LICENCE file provided within this distribution */ #ifndef __MINIUPNPCSTRINGS_H__ #define __MINIUPNPCSTRINGS_H__ -#define OS_STRING "Debian/4.0" -#define MINIUPNPC_VERSION_STRING "1.2" +#define OS_STRING "OpenBSD/4.3" +#define MINIUPNPC_VERSION_STRING "1.3" #endif