Changeset 8862
- Timestamp:
- Aug 2, 2009, 10:21:46 PM (14 years ago)
- Location:
- trunk/third-party/miniupnp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/third-party/miniupnp/Changelog.txt
r8798 r8862 1 $Id: Changelog.txt,v 1.8 2 2009/07/09 16:14:06nanard Exp $1 $Id: Changelog.txt,v 1.86 2009/07/29 08:44:29 nanard Exp $ 2 2 miniUPnP client Changelog. 3 4 2009/07/29: 5 fix in updateminiupnpcstrings.sh if OS name contains "/" 6 Sending a correct value for MX: field in SSDP request 7 8 2009/07/20: 9 Change the Makefile to compile under Mac OS X 10 Fixed a stackoverflow in getDevicesFromMiniSSDPD() 3 11 4 12 2009/07/09: … … 8 16 2009/06/04: 9 17 patching to compile under CygWin and cross compile for minGW 18 19 VERSION 1.3 : 10 20 11 21 2009/04/17: -
trunk/third-party/miniupnp/README
r8798 r8862 1 MiniUPnP is written by Thomas Bernard. 2 Its homepage is http://miniupnp.free.fr/ 3 This is from miniupnpc-20090713.tar.gz 1 Project: miniupnp 2 Project web page: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ 3 Author: Thomas Bernard 4 Copyright (c) 2005-2008 Thomas Bernard 5 This software is subject to the conditions detailed in the 6 LICENCE file provided within this distribution. 7 8 For the comfort of Win32 users, bsdqueue.h is included in the distribution. 9 Its licence is included in the header of the file. 10 bsdqueue.h is a copy of the sys/queue.h of an OpenBSD system. 11 12 * miniupnp Client * 13 14 To compile, simply run 'gmake' (could be 'make'). 15 Under win32, to compile with MinGW, type "mingw32make.bat". 16 The compilation is known to work under linux, FreeBSD, 17 OpenBSD, MacOS X and cygwin. 18 To install the library and headers on the system use : 19 > su 20 > make install 21 > exit 22 23 alternatively, to install in a specific location, use : 24 > INSTALLPREFIX=/usr/local make install 25 26 upnpc.c is a sample client using the libminiupnpc. 27 To use the libminiupnpc in your application, link it with 28 libminiupnpc.a and use the following functions found in miniupnpc.h, 29 upnpcommands.h and miniwget.h : 30 - upnpDiscover() 31 - miniwget() 32 - parserootdesc() 33 - GetUPNPUrls() 34 - UPNP_* (calling UPNP methods) 35 36 Note : use #include <miniupnpc/miniupnpc.h> etc... for the includes 37 and -lminiupnpc for the link 38 39 Discovery process is speeded up when MiniSSDPd is running on the machine. 40 41 * Python module * 42 43 you can build a python module with 'make pythonmodule' 44 and install it with 'make installpythonmodule'. 45 setup.py (and setupmingw32.py) are included in the distribution. 46 47 48 Feel free to contact me if you have any problem : 49 e-mail : miniupnp@free.fr 50 51 If you are using libminiupnpc in your application, please 52 send me an email ! 53 54 -
trunk/third-party/miniupnp/minissdpc.c
r7837 r8862 1 /* $Id: minissdpc.c,v 1. 7 2008/12/18 17:45:48nanard Exp $ */1 /* $Id: minissdpc.c,v 1.9 2009/07/20 09:18:05 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas BERNARD 4 * copyright (c) 2005-200 8Thomas Bernard4 * copyright (c) 2005-2009 Thomas Bernard 5 5 * This software is subjet to the conditions detailed in the 6 6 * provided LICENCE file. */ … … 13 13 #ifdef WIN32 14 14 #include <winsock2.h> 15 #include < Ws2tcpip.h>15 #include <ws2tcpip.h> 16 16 #include <io.h> 17 /* Hack */ 18 #define UNIX_PATH_LEN 108 19 struct sockaddr_un { 20 uint16_t sun_family; 21 char sun_path[UNIX_PATH_LEN]; 22 }; 17 23 #else 18 24 #include <sys/socket.h> … … 58 64 p = buffer + 1; 59 65 l = stsize; CODELENGTH(l, p); 66 if(p + stsize > buffer + sizeof(buffer)) 67 { 68 /* devtype is too long ! */ 69 close(s); 70 return NULL; 71 } 60 72 memcpy(p, devtype, stsize); 61 73 p += stsize; -
trunk/third-party/miniupnp/miniupnpc.c
r8798 r8862 1 /* $Id: miniupnpc.c,v 1.5 8 2009/07/09 15:59:46nanard Exp $ */1 /* $Id: miniupnpc.c,v 1.59 2009/07/29 08:44:29 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas BERNARD … … 352 352 "ST: %s\r\n" 353 353 "MAN: \"ssdp:discover\"\r\n" 354 "MX: 3\r\n"354 "MX: %u\r\n" 355 355 "\r\n"; 356 356 static const char * const deviceList[] = { … … 366 366 int n; 367 367 struct sockaddr_in sockudp_r, sockudp_w; 368 unsigned int mx; 368 369 369 370 #ifndef WIN32 … … 433 434 } 434 435 436 /* Calculating maximum response time in seconds */ 437 mx = ((unsigned int)delay) / 1000u; 435 438 /* receiving SSDP response packet */ 436 439 for(n = 0;;) … … 440 443 /* sending the SSDP M-SEARCH packet */ 441 444 n = snprintf(bufr, sizeof(bufr), 442 MSearchMsgFmt, deviceList[deviceIndex++] );445 MSearchMsgFmt, deviceList[deviceIndex++], mx); 443 446 /*printf("Sending %s", bufr);*/ 444 447 n = sendto(sudp, bufr, n, 0, … … 627 630 } 628 631 629 staticint632 int 630 633 UPNPIGD_IsConnected(struct UPNPUrls * urls, struct IGDdatas * data) 631 634 { -
trunk/third-party/miniupnp/miniwget.c
r8798 r8862 32 32 33 33 #include "miniupnpcstrings.h" 34 #include "miniwget.h"35 34 36 35 /* miniwget2() : -
trunk/third-party/miniupnp/minixml.c
r8798 r8862 36 36 * return 0 (false) in case of success and -1 (true) if the end 37 37 * of the xmlbuffer is reached. */ 38 staticint parseatt(struct xmlparser * p)38 int parseatt(struct xmlparser * p) 39 39 { 40 40 const char * attname; … … 107 107 /* parseelt parse the xml stream and 108 108 * call the callback functions when needed... */ 109 staticvoid parseelt(struct xmlparser * p)109 void parseelt(struct xmlparser * p) 110 110 { 111 111 int i; -
trunk/third-party/miniupnp/updateminiupnpcstrings.sh
r8859 r8862 1 1 #! /bin/sh 2 # $Id: updateminiupnpcstrings.sh,v 1. 3 2009/07/09 16:13:31 nanard Exp $2 # $Id: updateminiupnpcstrings.sh,v 1.4 2009/07/29 08:34:01 nanard Exp $ 3 3 4 TEMPLATE_FILE=$1 5 OUTPUT_FILE=$2 4 FILE=miniupnpcstrings.h 5 TEMPLATE_FILE=${FILE}.in 6 6 7 7 # detecting the OS name and version … … 31 31 EXPR="s|OS_STRING \".*\"|OS_STRING \"${OS_NAME}/${OS_VERSION}\"|" 32 32 #echo $EXPR 33 #echo "Back ing up $OUTPUT_FILE to $OUTPUT_FILE.bak."34 #cp $ OUTPUT_FILE $OUTPUT_FILE.bak35 test -f ${ TEMPLATE_FILE}36 echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $ OUTPUT_FILE."37 sed "$EXPR" <"$TEMPLATE_FILE" >"$OUTPUT_FILE"33 #echo "Backuping $FILE to $FILE.bak." 34 #cp $FILE $FILE.bak 35 test -f ${FILE}.in 36 echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $FILE." 37 sed -e "$EXPR" < $TEMPLATE_FILE > $FILE 38 38
Note: See TracChangeset
for help on using the changeset viewer.