corosync  2.3.5-dirty
Data Structures | Macros | Functions | Variables
totemip.h File Reference
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdint.h>
#include <corosync/list.h>
Include dependency graph for totemip.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  totem_ip_address
 
struct  totem_ip_if_address
 

Macros

#define totemip_nosigpipe(s)
 
#define TOTEMIP_ADDRLEN   (sizeof(struct in6_addr))
 
#define TOTEM_IP_ADDRESS
 

Functions

struct totem_ip_address __attribute__ ((packed))
 
int totemip_equal (const struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
 
int totemip_compare (const void *a, const void *b)
 
int totemip_is_mcast (struct totem_ip_address *addr)
 
void totemip_copy (struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
 
void totemip_copy_endian_convert (struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
 
int totemip_localhost (int family, struct totem_ip_address *localhost)
 
int totemip_localhost_check (const struct totem_ip_address *addr)
 
const char * totemip_print (const struct totem_ip_address *addr)
 
int totemip_sockaddr_to_totemip_convert (const struct sockaddr_storage *saddr, struct totem_ip_address *ip_addr)
 
int totemip_totemip_to_sockaddr_convert (struct totem_ip_address *ip_addr, uint16_t port, struct sockaddr_storage *saddr, int *addrlen)
 
int totemip_parse (struct totem_ip_address *totemip, const char *addr, int family)
 
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 list_head *addrs)
 
void totemip_freeifaddrs (struct list_head *addrs)
 
size_t totemip_udpip_header_size (int family)
 

Variables

unsigned int nodeid
 
unsigned short family
 
unsigned char addr [TOTEMIP_ADDRLEN]
 
struct totem_ip_if_address __attribute__
 

Macro Definition Documentation

#define TOTEM_IP_ADDRESS

Definition at line 62 of file totemip.h.

#define TOTEMIP_ADDRLEN   (sizeof(struct in6_addr))

Definition at line 59 of file totemip.h.

#define totemip_nosigpipe (   s)

Definition at line 56 of file totemip.h.

Function Documentation

struct totem_ip_address __attribute__ ( (packed)  )
int totemip_compare ( const void *  a,
const void *  b 
)
void totemip_copy ( struct totem_ip_address addr1,
const struct totem_ip_address addr2 
)
void totemip_copy_endian_convert ( struct totem_ip_address addr1,
const struct totem_ip_address addr2 
)
int totemip_equal ( const struct totem_ip_address addr1,
const struct totem_ip_address addr2 
)
void totemip_freeifaddrs ( struct list_head addrs)
int totemip_getifaddrs ( struct 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_is_mcast ( struct totem_ip_address addr)

Definition at line 114 of file totemip.c.

References addr, totem_ip_address::addr, and totem_ip_address::family.

Referenced by totem_config_validate().

int totemip_localhost ( int  family,
struct totem_ip_address localhost 
)
int totemip_localhost_check ( const struct totem_ip_address addr)

Definition at line 205 of file totemip.c.

References totem_ip_address::family, totemip_equal(), and totemip_localhost().

int totemip_parse ( struct totem_ip_address totemip,
const char *  addr,
int  family 
)
const char* totemip_print ( const struct totem_ip_address addr)
int totemip_sockaddr_to_totemip_convert ( const struct sockaddr_storage *  saddr,
struct totem_ip_address ip_addr 
)

Definition at line 295 of file totemip.c.

References totem_ip_address::addr, totem_ip_address::family, and totem_ip_address::nodeid.

Referenced by totemip_getifaddrs().

int totemip_totemip_to_sockaddr_convert ( struct totem_ip_address ip_addr,
uint16_t  port,
struct sockaddr_storage *  saddr,
int *  addrlen 
)

Definition at line 222 of file totemip.c.

References totem_ip_address::addr, and totem_ip_address::family.

Referenced by totemiba_token_target_set().

size_t totemip_udpip_header_size ( int  family)

Variable Documentation

struct totem_ip_if_address __attribute__
unsigned char addr[TOTEMIP_ADDRLEN]

Definition at line 293 of file totemip.h.

unsigned short family

Definition at line 292 of file totemip.h.

unsigned int nodeid

Definition at line 291 of file totemip.h.