2014-02-03 09:45:59 +00:00
|
|
|
/* $Id: natpmp.h,v 1.11 2014/02/01 17:17:35 nanard Exp $ */
|
2011-09-28 19:13:20 +00:00
|
|
|
/* MiniUPnP project
|
|
|
|
* author : Thomas Bernard
|
|
|
|
* website : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
|
|
|
*/
|
2012-09-20 20:52:51 +00:00
|
|
|
#ifndef NATPMP_H_INCLUDED
|
|
|
|
#define NATPMP_H_INCLUDED
|
2011-09-28 19:13:20 +00:00
|
|
|
|
|
|
|
/* The NAT-PMP specification which can be found at the url :
|
|
|
|
* http://files.dns-sd.org/draft-cheshire-nat-pmp.txt
|
|
|
|
* draft version 3 of April 2008
|
|
|
|
* define 5351 as listening port for the gateway,
|
|
|
|
* and the 224.0.0.1 port 5350 as the local link
|
|
|
|
* multicast address for address change announces.
|
|
|
|
* Previous versions of the specification defined 5351
|
|
|
|
* as the port for address change announces. */
|
|
|
|
#define NATPMP_PORT (5351)
|
|
|
|
#define NATPMP_NOTIF_PORT (5350)
|
|
|
|
#define NATPMP_NOTIF_ADDR ("224.0.0.1")
|
|
|
|
|
|
|
|
int OpenAndConfNATPMPSockets(int * sockets);
|
|
|
|
|
2013-07-09 13:36:53 +00:00
|
|
|
int ReceiveNATPMPOrPCPPacket(int s, struct sockaddr_in* senderaddr,
|
|
|
|
unsigned char *msg_buff, size_t msg_buff_size);
|
|
|
|
|
|
|
|
void ProcessIncomingNATPMPPacket(int s, unsigned char *msg_buff, int len,
|
|
|
|
struct sockaddr_in *senderaddr);
|
2011-09-28 19:13:20 +00:00
|
|
|
|
|
|
|
void SendNATPMPPublicAddressChangeNotification(int * sockets, int n_sockets);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|