#include "mcast.h"#include <stdio.h>#include <stdlib.h>#include <arpa/inet.h>#include <unistd.h>#include <string.h>#include <sys/ioctl.h>#include <net/if.h>#include <errno.h>#include <limits.h>#include <libnfnetlink/libnfnetlink.h>
Macros | |
| #define | SO_RCVBUFFORCE 33 |
| #define | SO_SNDBUFFORCE 32 |
Functions | |
| struct mcast_sock * | mcast_server_create (struct mcast_conf *conf) |
| void | mcast_server_destroy (struct mcast_sock *m) |
| struct mcast_sock * | mcast_client_create (struct mcast_conf *conf) |
| void | mcast_client_destroy (struct mcast_sock *m) |
| ssize_t | mcast_send (struct mcast_sock *m, const void *data, int size) |
| ssize_t | mcast_recv (struct mcast_sock *m, void *data, int size) |
| int | mcast_get_fd (struct mcast_sock *m) |
| int | mcast_isset (struct mcast_sock *m, fd_set *readfds) |
| int | mcast_snprintf_stats (char *buf, size_t buflen, char *ifname, struct mcast_stats *s, struct mcast_stats *r) |
| int | mcast_snprintf_stats2 (char *buf, size_t buflen, const char *ifname, const char *status, int active, struct mcast_stats *s, struct mcast_stats *r) |
| #define SO_RCVBUFFORCE 33 |
Referenced by mcast_server_create().
| #define SO_SNDBUFFORCE 32 |
Referenced by mcast_client_create().
| struct mcast_sock* mcast_client_create | ( | struct mcast_conf * | conf | ) |
References mcast_conf::checksum, mcast_sock::fd, mcast_conf::ipproto, NULL, mcast_conf::sndbuf, and SO_SNDBUFFORCE.
| void mcast_client_destroy | ( | struct mcast_sock * | m | ) |
References mcast_sock::fd.
| int mcast_get_fd | ( | struct mcast_sock * | m | ) |
References mcast_sock::fd.
| int mcast_isset | ( | struct mcast_sock * | m, |
| fd_set * | readfds | ||
| ) |
References mcast_sock::fd.
| ssize_t mcast_recv | ( | struct mcast_sock * | m, |
| void * | data, | ||
| int | size | ||
| ) |
References mcast_sock::addr, mcast_stats::bytes, mcast_stats::error, mcast_sock::fd, mcast_stats::messages, and mcast_sock::stats.
| ssize_t mcast_send | ( | struct mcast_sock * | m, |
| const void * | data, | ||
| int | size | ||
| ) |
| struct mcast_sock* mcast_server_create | ( | struct mcast_conf * | conf | ) |
References mcast_sock::addr, mcast_sock::fd, mcast_conf::ifa, mcast_conf::in, mcast_conf::inet_addr, mcast_conf::inet_addr6, mcast_conf::interface_addr, mcast_conf::interface_index6, mcast_conf::ipproto, mcast_sock::ipv4, mcast_sock::ipv6, NULL, mcast_conf::port, mcast_conf::rcvbuf, SO_RCVBUFFORCE, and mcast_sock::sockaddr_len.
| void mcast_server_destroy | ( | struct mcast_sock * | m | ) |
References mcast_sock::fd.
| int mcast_snprintf_stats | ( | char * | buf, |
| size_t | buflen, | ||
| char * | ifname, | ||
| struct mcast_stats * | s, | ||
| struct mcast_stats * | r | ||
| ) |
References mcast_stats::bytes, mcast_stats::error, mcast_stats::messages, and size.
| int mcast_snprintf_stats2 | ( | char * | buf, |
| size_t | buflen, | ||
| const char * | ifname, | ||
| const char * | status, | ||
| int | active, | ||
| struct mcast_stats * | s, | ||
| struct mcast_stats * | r | ||
| ) |
References mcast_stats::bytes, mcast_stats::error, mcast_stats::messages, and size.