lwIP 2.2.0
Lightweight IP stack
|
Modules | |
IPv4 only | |
IPv6 only | |
Data Structures | |
struct | ip_addr |
Macros | |
#define | ip_addr_netcmp(addr1, addr2, mask) ip_addr_net_eq((addr1), (addr2), (mask)) |
#define | ip_addr_net_eq(addr1, addr2, mask) |
#define | ip_addr_cmp(addr1, addr2) ip_addr_eq((addr1), (addr2)) |
#define | ip_addr_eq(addr1, addr2) |
#define | ip_addr_cmp_zoneless(addr1, addr2) ip_addr_zoneless_eq((addr1), (addr2)) |
#define | ip_addr_zoneless_eq(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 | 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 ip_addr_cmp | ( | addr1, | |
addr2 | |||
) | ip_addr_eq((addr1), (addr2)) |
#define ip_addr_cmp_zoneless | ( | addr1, | |
addr2 | |||
) | ip_addr_zoneless_eq((addr1), (addr2)) |
#define ip_addr_eq | ( | addr1, | |
addr2 | |||
) |
Check if two ip addresses are equal.
#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 | ) |
Check inf an ip address is a loopback address.
#define ip_addr_ismulticast | ( | ipaddr | ) |
#define ip_addr_net_eq | ( | addr1, | |
addr2, | |||
mask | |||
) |
Check if two ip addresses are share the same network, for a specific netmask.
#define ip_addr_netcmp | ( | addr1, | |
addr2, | |||
mask | |||
) | ip_addr_net_eq((addr1), (addr2), (mask)) |
#define ip_addr_zoneless_eq | ( | addr1, | |
addr2 | |||
) |
Check if two ip addresses are equal, ignoring the zone.
#define IP_ANY_TYPE (&ip_addr_any_type) |
Macro representing the 'any' address.
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 |