nrfxlib API 0.1.0
|
Address resolution utility functions. More...
Data Structures | |
struct | nrf_in6_addr |
IPv6 address. More... | |
struct | nrf_in_addr |
IPv4 address structure. More... | |
struct | nrf_sockaddr_in6 |
Address record for IPv6 addresses. More... | |
struct | nrf_sockaddr_in |
Address record for IPv4 addresses. More... | |
struct | nrf_sockaddr |
Generic socket address. More... | |
struct | nrf_addrinfo |
Address information. More... | |
struct | nrf_ifaddrs |
Interface address information. More... | |
Macros | |
#define | NRF_HTONS(x) ((uint16_t) ((((x) & 0xff00) >> 8) | (((x) & 0x00ff) << 8))) |
Host to network byte-orders on half word. | |
#define | NRF_HTONL(x) |
Host to network byte-orders on full word. | |
#define | NRF_NTOHS(x) NRF_HTONS(x) |
Network to host byte-orders on half word. | |
#define | NRF_NTOHL(x) NRF_HTONL(x) |
Network to host byte-orders on full word. | |
#define | nrf_htons(x) NRF_HTONS(x) |
#define | nrf_htonl(x) NRF_HTONL(x) |
#define | nrf_ntohs(x) NRF_NTOHS(x) |
#define | nrf_ntohl(x) NRF_NTOHL(x) |
#define | NRF_INET_ADDRSTRLEN 16 |
Maximum length of IPv4 in string form, including null-termination character. | |
#define | NRF_INET6_ADDRSTRLEN 46 |
Maximum length of IPv6 in string form, including null-termination character. | |
#define | NRF_AI_CANONNAME 0x2 |
#define | NRF_AI_NUMERICSERV 0x400 |
#define | NRF_AI_PDNSERV 0x1000 |
Typedefs | |
typedef uint16_t | nrf_in_port_t |
Socket port type. | |
typedef unsigned short int | nrf_sa_family_t |
Socket families. | |
typedef uint32_t | nrf_in_addr_t |
IPv4 address. | |
typedef uint32_t | nrf_socklen_t |
typedef uint32_t | nrf_nfds_t |
Functions | |
int | nrf_inet_pton (int af, const char *restrict src, void *restrict dst) |
Convert IPv4 and IPv6 addresses between binary and text form. | |
const char * | nrf_inet_ntop (int af, const void *restrict src, char *restrict dst, nrf_socklen_t size) |
Convert IPv4 and IPv6 addresses between binary and text form. | |
int | nrf_getaddrinfo (const char *restrict nodename, const char *restrict servname, const struct nrf_addrinfo *restrict hints, struct nrf_addrinfo **restrict res) |
Get address information. | |
void | nrf_freeaddrinfo (struct nrf_addrinfo *ai) |
Free address information returned by nrf_getaddrinfo(). | |
int | nrf_getifaddrs (struct nrf_ifaddrs **ifa) |
Get interface address information. | |
void | nrf_freeifaddrs (struct nrf_ifaddrs *ifa) |
Free address information returned by nrf_getifaddrs(). | |
int | nrf_setdnsaddr (int family, const void *in_addr, nrf_socklen_t in_size) |
Set a secondary DNS address. | |
Variables | |
const struct nrf_in6_addr | nrf_in6addr_any |
Global IPv6 any-address. | |
const struct nrf_in_addr | nrf_inaddr_any |
Global IPv4 any-address. | |
Address resolution utility functions.