41#include <sys/socket.h>
42#include <netinet/in.h>
58#define LOCALHOST_IPV4 "127.0.0.1"
59#define LOCALHOST_IPV6 "::1"
61#define NETLINK_BUFSIZE 16384
142 if ((
addr >> 28) != 0xE) {
184 for (
i = 0;
i < 16;
i++) {
240 switch (
sa->sa_family) {
273#ifdef HAVE_SOCK_SIN_LEN
287#ifdef HAVE_SOCK_SIN6_LEN
292 sin->sin6_scope_id = 2;
328 switch (ip_version) {
378 }
else if (
ret == 0) {
462 ifa->ifa_netmask->sa_family != 0))
465 if (
ifa->ifa_netmask->sa_family == 0) {
466 ifa->ifa_netmask->sa_family =
ifa->ifa_addr->sa_family;
560 switch (bindnet->
family) {
587 *interface_up =
if_addr->interface_up;
588 *interface_num =
if_addr->interface_num;
604#define TOTEMIP_UDP_HEADER_SIZE 8
605#define TOTEMIP_IPV4_HEADER_SIZE 20
606#define TOTEMIP_IPV6_HEADER_SIZE 40
unsigned char addr[TOTEMIP_ADDRLEN]
#define log_printf(level, format, args...)
#define LOGSYS_LEVEL_DEBUG
The totem_ip_address struct.
unsigned char addr[TOTEMIP_ADDRLEN]
#define TOTEMIP_UDP_HEADER_SIZE
const char * totemip_sa_print(const struct sockaddr *sa)
int totemip_sockaddr_to_totemip_convert(const struct sockaddr_storage *saddr, struct totem_ip_address *ip_addr)
int totemip_localhost_check(const struct totem_ip_address *addr)
int totemip_parse(struct totem_ip_address *totemip, const char *addr, enum totem_ip_version_enum ip_version)
int totemip_sa_equal(const struct totem_ip_address *totem_ip, const struct sockaddr *sa)
#define TOTEMIP_IPV6_HEADER_SIZE
void totemip_freeifaddrs(struct qb_list_head *addrs)
int totemip_iface_check(struct totem_ip_address *bindnet, struct totem_ip_address *boundto, int *interface_up, int *interface_num, int mask_high_bit)
int totemip_getifaddrs(struct qb_list_head *addrs)
int totemip_equal(const struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
void totemip_copy(struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
size_t totemip_udpip_header_size(int family)
int totemip_compare(const void *a, const void *b)
int totemip_totemip_to_sockaddr_convert(struct totem_ip_address *ip_addr, uint16_t port, struct sockaddr_storage *saddr, int *addrlen)
const char * totemip_print(const struct totem_ip_address *addr)
int32_t totemip_is_mcast(struct totem_ip_address *ip_addr)
#define TOTEMIP_IPV4_HEADER_SIZE
int totemip_localhost(int family, struct totem_ip_address *localhost)
#define totemip_nosigpipe(s)