lwIP
2.0.2
Lightweight IP stack
|
Functions | |
u8_t | ip4_addr_isbroadcast_u32 (u32_t addr, const struct netif *netif) |
u8_t | ip4_addr_netmask_valid (u32_t netmask) |
u32_t | ipaddr_addr (const char *cp) |
int | ip4addr_aton (const char *cp, ip4_addr_t *addr) |
char * | ip4addr_ntoa (const ip4_addr_t *addr) |
char * | ip4addr_ntoa_r (const ip4_addr_t *addr, char *buf, int buflen) |
This is the IPv4 address tools implementation.
u8_t ip4_addr_isbroadcast_u32 | ( | u32_t | addr, |
const struct netif * | netif | ||
) |
Determine if an address is a broadcast address on a network interface
addr | address to be checked |
netif | the network interface against which the address is checked |
u8_t ip4_addr_netmask_valid | ( | u32_t | netmask | ) |
Checks if a netmask is valid (starting with ones, then only zeros)
netmask | the IPv4 netmask to check (in network byte order!) |
int ip4addr_aton | ( | const char * | cp, |
ip4_addr_t * | addr | ||
) |
Check whether "cp" is a valid ascii representation of an Internet address and convert to a binary address. Returns 1 if the address is valid, 0 if not. This replaces inet_addr, the return value from which cannot distinguish between failure and a local broadcast address.
cp | IP address in ascii representation (e.g. "127.0.0.1") |
addr | pointer to which to save the ip address in network order |
char* ip4addr_ntoa | ( | const ip4_addr_t * | addr | ) |
Convert numeric IP address into decimal dotted ASCII representation. returns ptr to static buffer; not reentrant!
addr | ip address in network order to convert |
char* ip4addr_ntoa_r | ( | const ip4_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 |
u32_t ipaddr_addr | ( | const char * | cp | ) |
Ascii internet address interpretation routine. The value returned is in network order.
cp | IP address in ascii representation (e.g. "127.0.0.1") |