EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Functions
mcast.h File Reference

File containing the definition of mDNS utils. More...

#include <stdint.h>
#include <sys/socket.h>
Include dependency graph for mcast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int join_mcast (int fd, const struct sockaddr_storage *sa, socklen_t sa_len, uint32_t ifindex)
 Join a multicast socket. More...
 
int create_recv_mcast (const struct sockaddr_storage *sa, socklen_t sa_len, uint32_t ifindex)
 Create a receive multicast socket. More...
 
int create_send_mcast (const struct sockaddr_storage *sa, socklen_t sa_len, uint32_t ifindex)
 Create a send multicast socket. More...
 

Detailed Description

File containing the definition of mDNS utils.

Author
Alexandru Mereacre
Date
2021

Function Documentation

◆ create_recv_mcast()

int create_recv_mcast ( const struct sockaddr_storage *  sa,
socklen_t  sa_len,
uint32_t  ifindex 
)

Create a receive multicast socket.

Parameters
saThe socket address
sa_lenThe socket address length
ifindexThe interface index
Returns
0 on success, -1 on failuer

◆ create_send_mcast()

int create_send_mcast ( const struct sockaddr_storage *  sa,
socklen_t  sa_len,
uint32_t  ifindex 
)

Create a send multicast socket.

Parameters
saThe socket address
sa_lenThe socket address length
ifindexThe interface index
Returns
0 on success, -1 on failuer

◆ join_mcast()

int join_mcast ( int  fd,
const struct sockaddr_storage *  sa,
socklen_t  sa_len,
uint32_t  ifindex 
)

Join a multicast socket.

Parameters
fdThe socket descriptor
saThe socket address
sa_lenThe socket address length
ifindexThe interface index
Returns
0 on success, -1 on failuer