lwIP
2.1.0
Lightweight IP stack
|
Modules | |
IPv4 only | |
IPv6 only | |
Data Structures | |
struct | ip_addr |
Macros | |
#define | IP_IS_ANY_TYPE_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_ANY) |
#define | IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } IPADDR6_ZONE_INIT } }, IPADDR_TYPE_ANY } |
#define | ip_addr_copy(dest, src) |
#define | ip_addr_set(dest, src) |
#define | ip_addr_set_ipaddr(dest, src) ip_addr_set(dest, src) |
#define | ip_addr_set_zero(ipaddr) |
#define | ip_addr_set_any(is_ipv6, ipaddr) |
#define | ip_addr_set_any_val(is_ipv6, ipaddr) |
#define | ip_addr_set_loopback(is_ipv6, ipaddr) |
#define | ip_addr_set_loopback_val(is_ipv6, ipaddr) |
#define | ip_addr_set_hton(dest, src) |
#define | ip_addr_get_network(target, host, netmask) |
#define | ip_addr_netcmp(addr1, addr2, mask) |
#define | ip_addr_cmp(addr1, addr2) |
#define | ip_addr_cmp_zoneless(addr1, addr2) |
#define | ip_addr_isany(ipaddr) |
#define | ip_addr_isany_val(ipaddr) |
#define | ip_addr_isbroadcast(ipaddr, netif) |
#define | ip_addr_ismulticast(ipaddr) |
#define | ip_addr_isloopback(ipaddr) |
#define | ip_addr_islinklocal(ipaddr) |
#define | IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX |
#define | ip4_2_ipv4_mapped_ipv6(ip6addr, ip4addr) |
#define | unmap_ipv4_mapped_ipv6(ip4addr, ip6addr) (ip4addr)->addr = (ip6addr)->addr[3]; |
#define | IP_ANY_TYPE (&ip_addr_any_type) |
Typedefs | |
typedef struct ip_addr | ip_addr_t |
Enumerations | |
enum | lwip_ip_addr_type { IPADDR_TYPE_V4 = 0U, IPADDR_TYPE_V6 = 6U, IPADDR_TYPE_ANY = 46U } |
Functions | |
char * | ipaddr_ntoa (const ip_addr_t *addr) |
char * | ipaddr_ntoa_r (const ip_addr_t *addr, char *buf, int buflen) |
int | ipaddr_aton (const char *cp, ip_addr_t *addr) |
#define ip4_2_ipv4_mapped_ipv6 | ( | ip6addr, | |
ip4addr | |||
) |
#define ip_addr_cmp | ( | addr1, | |
addr2 | |||
) |
#define ip_addr_cmp_zoneless | ( | addr1, | |
addr2 | |||
) |
#define ip_addr_copy | ( | dest, | |
src | |||
) |
#define ip_addr_get_network | ( | target, | |
host, | |||
netmask | |||
) |
#define ip_addr_isany | ( | ipaddr | ) |
#define ip_addr_isany_val | ( | ipaddr | ) |
#define ip_addr_isbroadcast | ( | ipaddr, | |
netif | |||
) |
#define ip_addr_islinklocal | ( | ipaddr | ) |
#define ip_addr_isloopback | ( | ipaddr | ) |
#define ip_addr_ismulticast | ( | ipaddr | ) |
#define ip_addr_netcmp | ( | addr1, | |
addr2, | |||
mask | |||
) |
#define ip_addr_set | ( | dest, | |
src | |||
) |
#define ip_addr_set_any | ( | is_ipv6, | |
ipaddr | |||
) |
#define ip_addr_set_any_val | ( | is_ipv6, | |
ipaddr | |||
) |
#define ip_addr_set_hton | ( | dest, | |
src | |||
) |
#define ip_addr_set_ipaddr | ( | dest, | |
src | |||
) | ip_addr_set(dest, src) |
#define ip_addr_set_loopback | ( | is_ipv6, | |
ipaddr | |||
) |
#define ip_addr_set_loopback_val | ( | is_ipv6, | |
ipaddr | |||
) |
#define ip_addr_set_zero | ( | ipaddr | ) |
#define IP_ANY_TYPE (&ip_addr_any_type) |
#define IP_IS_ANY_TYPE_VAL | ( | ipaddr | ) | (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_ANY) |
#define IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } IPADDR6_ZONE_INIT } }, IPADDR_TYPE_ANY } |
#define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX |
#define unmap_ipv4_mapped_ipv6 | ( | ip4addr, | |
ip6addr | |||
) | (ip4addr)->addr = (ip6addr)->addr[3]; |
A union struct for both IP version's addresses. ATTENTION: watch out for its size when adding IPv6 address scope!
enum lwip_ip_addr_type |
IP address types for use in ip_addr_t.type member.
Enumerator | |
---|---|
IPADDR_TYPE_V4 | IPv4 |
IPADDR_TYPE_V6 | IPv6 |
IPADDR_TYPE_ANY | IPv4+IPv6 ("dual-stack") |
int ipaddr_aton | ( | const char * | cp, |
ip_addr_t * | addr | ||
) |
Convert IP address string (both versions) to numeric. The version is auto-detected from the string.
cp | IP address string to convert |
addr | conversion result is stored here |
char* ipaddr_ntoa | ( | const ip_addr_t * | addr | ) |
Convert numeric IP address (both versions) into ASCII representation. returns ptr to static buffer; not reentrant!
addr | ip address in network order to convert |
char* ipaddr_ntoa_r | ( | const ip_addr_t * | addr, |
char * | buf, | ||
int | buflen | ||
) |
Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used.
addr | ip address in network order to convert |
buf | target buffer where the string is stored |
buflen | length of buf |