Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
IP address handling
[Infrastructure]
Data Structures | |
struct | ip_addr |
A union struct for both IP version's addresses. More... | |
Modules | |
IPv4 only | |
IPv6 only | |
Typedefs | |
typedef struct ip_addr | ip_addr_t |
A union struct for both IP version's addresses. | |
Enumerations | |
enum | lwip_ip_addr_type { IPADDR_TYPE_V4 = 0U, IPADDR_TYPE_V6 = 6U, IPADDR_TYPE_ANY = 46U } |
IP address types for use in ip_addr_t.type member. More... | |
Functions | |
char * | ipaddr_ntoa (const ip_addr_t *addr) |
Convert numeric IP address (both versions) into ASCII representation. | |
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. | |
int | ipaddr_aton (const char *cp, ip_addr_t *addr) |
Convert IP address string (both versions) to numeric. |
Typedef Documentation
typedef ip6_addr_t ip_addr_t |
Enumeration Type Documentation
enum lwip_ip_addr_type |
IP address types for use in ip_addr_t.type member.
- See also:
- tcp_new_ip_type(), udp_new_ip_type(), raw_new_ip_type().
Function Documentation
int ipaddr_aton | ( | const char * | cp, |
ip_addr_t * | addr | ||
) |
char* ipaddr_ntoa | ( | const ip_addr_t * | addr ) |
Convert numeric IP address (both versions) into ASCII representation.
returns ptr to static buffer; not reentrant!
- Parameters:
-
addr ip address in network order to convert
- Returns:
- pointer to a global static (!) buffer that holds the ASCII representation of addr
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.
- Parameters:
-
addr ip address in network order to convert buf target buffer where the string is stored buflen length of buf
- Returns:
- either pointer to buf which now holds the ASCII representation of addr or NULL if buf was too small
Generated on Tue Jul 12 2022 13:55:22 by
