![]() |
PDK API Guide for J721E
|
Bindings to POSIX network IP layer functions.
Go to the source code of this file.
Data Structures | |
struct | cb_inetaddr_t |
Network address encapsulation structure for IPv4 or IPv6 address This structure is used to encapsulation of address type such that the implementation does not need to have separate containers for IPv4 and IPv6 address. It now supports either AF_INET or AF_INET6 network addresses. This structure may not hold both address type at a given time. Dual-stack implementation must assume that IPv4 can be effective in parallel with IPv6 address, thus it is expected that the the implementation uses two instances of this structure/. More... | |
struct | cb_inetaddr_map_t |
Network address to socket address mapping This structure is used to store mapping between network address and socket address. More... | |
Macros | |
#define | CB_ADDRINFO_T struct addrinfo |
#define | CB_GETADDRINFO getaddrinfo |
#define | CB_FREEADDRINFO freeaddrinfo |
#define | CB_ADDRINFO_AI_FAMILY(x) ((x)->ai_family) |
#define | CB_ADDRINFO_AI_SOCKTYPE(x) ((x)->ai_socktype) |
#define | CB_ADDRINFO_AI_ADDR(x) ((x)->ai_addr) |
#define | CB_ADDRINFO_AI_ADDRLEN(x) ((x)->ai_addrlen) |
#define | CB_ADDRINFO_SA_FAMILY(x) ((x)->ai_addr->sa_family) |
#define | CB_SOCKADDR_SA_FAMILY(x) ((x)->sa_family) |
#define | CB_SOCKADDR_IN_ADDR(x) (((CB_SOCKADDR_IN_T *)(x))->sin_addr.s_addr) |
#define | CB_SOCKADDR_IN6_ADDR(x) (((CB_SOCKADDR_IN6_T *)(x))->sin6_addr) |
#define | CB_SOCK_BIND bind |
#define | CB_GETSOCKNAME getsockname |
#define | CB_GETNAMEINFO getnameinfo |
#define | CB_ADDRINFO_FOREACH_ITER(list, node) (node) = (list); (node); (node) = (node)->ai_next |
Traverse CB_ADDRINFO_T. More... | |
Functions | |
CB_ADDRINFO_T * | cb_name_to_addrinfo (int family, int socktype, const char *name, int port, bool numeric_only) |
Converts a name or ip address and port into CB_ADDRINFO_T. More... | |
int | cb_sockaddr_to_ipaddr (CB_SOCKADDR_T *sa, CB_SOCKLEN_T salen, char *ip, size_t ip_size, int *port) |
Translates socket address structure to IP address. More... | |
int | cb_addrinfo_to_ipaddr (const CB_ADDRINFO_T *ai, char *ip, size_t ip_size, int *port) |
Translate socket information to IP address. More... | |
bool | cb_is_multicast_addr (CB_SOCKADDR_T *addr) |
Checks if the proveded socket address is a multicast address. More... | |