lwIP
2.1.2
Lightweight IP stack
|
Modules | |
IPv4 only | |
IPv6 only | |
Data Structures | |
struct | ip_addr |
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) |
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 |