File: openssdpsocket.h

package info (click to toggle)
minissdpd 1.2.20130907-3+deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 304 kB
  • ctags: 198
  • sloc: ansic: 3,891; makefile: 185; sh: 90
file content (34 lines) | stat: -rw-r--r-- 1,093 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* $Id: openssdpsocket.h,v 1.5 2012/09/27 15:40:29 nanard Exp $ */
/* MiniUPnP project
 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
 * (c) 2006-2011 Thomas Bernard
 * This software is subject to the conditions detailed
 * in the LICENCE file provided within the distribution */
#ifndef OPENSSDPSOCKET_H_INCLUDED
#define OPENSSDPSOCKET_H_INCLUDED

/**
 * Open a socket and configure it for receiving SSDP packets
 *
 * @param n_listen_addr	size of listen_addr array
 * @param listen_addr	array of address (or interface names) to listen
 * @param ipv6	open INET6 or INET socket
 * @return socket
 */
int
OpenAndConfSSDPReceiveSocket(int n_if_addr,
                             const char * * if_addr,
                             int ipv6);

/**
 * Add or Drop the multicast membership for SSDP on the interface
 * @param s	the socket
 * @param ifaddr	the IPv4 address or interface name
 * @param ipv6	IPv6 or IPv4
 * @param drop	0 to add, 1 to drop
 * return -1 on error, 0 on success */
int
AddDropMulticastMembership(int s, const char * ifaddr, int ipv6, int drop);

#endif