2015-07-21 15:40:51 +00:00
|
|
|
/* $Id: openssdpsocket.h,v 1.7 2015/07/21 15:39:38 nanard Exp $ */
|
2011-09-28 19:14:08 +00:00
|
|
|
/* MiniUPnP project
|
|
|
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
2015-07-21 15:40:51 +00:00
|
|
|
* (c) 2006-2015 Thomas Bernard
|
2011-09-28 19:14:08 +00:00
|
|
|
* This software is subject to the conditions detailed
|
|
|
|
* in the LICENCE file provided within the distribution */
|
2012-09-20 20:52:51 +00:00
|
|
|
#ifndef OPENSSDPSOCKET_H_INCLUDED
|
|
|
|
#define OPENSSDPSOCKET_H_INCLUDED
|
2011-09-28 19:14:08 +00:00
|
|
|
|
2014-11-28 16:38:54 +00:00
|
|
|
#include "minissdpdtypes.h"
|
|
|
|
|
2011-09-28 19:14:08 +00:00
|
|
|
/**
|
|
|
|
* Open a socket and configure it for receiving SSDP packets
|
|
|
|
*
|
|
|
|
* @param ipv6 open INET6 or INET socket
|
2015-07-21 15:40:51 +00:00
|
|
|
* @param ttl multicast TTL
|
2011-09-28 19:14:08 +00:00
|
|
|
* @return socket
|
|
|
|
*/
|
|
|
|
int
|
2015-07-21 15:40:51 +00:00
|
|
|
OpenAndConfSSDPReceiveSocket(int ipv6, unsigned char ttl);
|
2011-09-28 19:14:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add or Drop the multicast membership for SSDP on the interface
|
|
|
|
* @param s the socket
|
2014-11-28 16:38:54 +00:00
|
|
|
* @param lan_addr the LAN address or interface name
|
2011-09-28 19:14:08 +00:00
|
|
|
* @param ipv6 IPv6 or IPv4
|
|
|
|
* @param drop 0 to add, 1 to drop
|
|
|
|
* return -1 on error, 0 on success */
|
|
|
|
int
|
2014-11-28 16:38:54 +00:00
|
|
|
AddDropMulticastMembership(int s, struct lan_addr_s * lan_addr, int ipv6, int drop);
|
2011-09-28 19:14:08 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|