You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
961 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
7 years ago
​
  1. /* $Id: openssdpsocket.h,v 1.7 2015/07/21 15:39:38 nanard Exp $ */
  2. /* MiniUPnP project
  3. * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
  4. * (c) 2006-2015 Thomas Bernard
  5. * This software is subject to the conditions detailed
  6. * in the LICENCE file provided within the distribution */
  7. #ifndef OPENSSDPSOCKET_H_INCLUDED
  8. #define OPENSSDPSOCKET_H_INCLUDED
  9. #include "minissdpdtypes.h"
  10. /**
  11. * Open a socket and configure it for receiving SSDP packets
  12. *
  13. * @param ipv6 open INET6 or INET socket
  14. * @param ttl multicast TTL
  15. * @return socket
  16. */
  17. int OpenAndConfSSDPReceiveSocket(int ipv6, unsigned char ttl);
  18. /**
  19. * Add or Drop the multicast membership for SSDP on the interface
  20. * @param s the socket
  21. * @param lan_addr the LAN address or interface name
  22. * @param ipv6 IPv6 or IPv4
  23. * @param drop 0 to add, 1 to drop
  24. * return -1 on error, 0 on success */
  25. int AddDropMulticastMembership(int s, struct lan_addr_s * lan_addr, int ipv6, int drop);
  26. #endif