|
Contiki-NG
|
A library with various IP address manipulation functions. More...
Files | |
| file | uiplib.c |
| Implementation of the IP address manipulation library. | |
| file | uiplib.h |
| Header file for the IP address manipulation library. | |
Macros | |
| #define | uiplib_ipaddrconv uiplib_ip6addrconv |
| Convert a textual representation of an IP address to a numerical representation. More... | |
Functions | |
| void | uiplib_ipaddr_print (const uip_ipaddr_t *addr) |
| Print an IP address using printf(). More... | |
| int | uiplib_ipaddr_snprint (char *buf, size_t size, const uip_ipaddr_t *addr) |
| Write at most size - 1 characters of the IP address to the output string. More... | |
A library with various IP address manipulation functions.
| #define uiplib_ipaddrconv uiplib_ip6addrconv |
Convert a textual representation of an IP address to a numerical representation.
This function takes a textual representation of an IP address in the form a.b.c.d for IPv4 or a:b:c:d:e:f:g:h for IPv6 and converts it into a numeric IP address representation that can be used by other uIP functions.
| addrstr | A pointer to a string containing the IP address in textual form. |
| addr | A pointer to a uip_ip4addr_t that will be filled in with the numerical representation of the address. |
| 0 | If the IP address could not be parsed. |
| Non-zero | If the IP address was parsed. |
Definition at line 72 of file uiplib.h.
Referenced by coap_endpoint_parse().
| void uiplib_ipaddr_print | ( | const uip_ipaddr_t * | addr | ) |
Print an IP address using printf().
| addr | A pointer to a uip_ipaddr_t that will be printed with printf(). |
Definition at line 160 of file uiplib.c.
References uiplib_ipaddr_snprint().
Referenced by coap_endpoint_print().
| int uiplib_ipaddr_snprint | ( | char * | buffer, |
| size_t | size, | ||
| const uip_ipaddr_t * | addr | ||
| ) |
Write at most size - 1 characters of the IP address to the output string.
The output is always null-terminated, unless size is 0.
| buffer | A pointer to an output string with at least size bytes. |
| size | The max number of characters to write to the output string. |
| addr | A pointer to a uip_ipaddr_t that will be printed with printf(). |
Definition at line 168 of file uiplib.c.
Referenced by coap_endpoint_snprint(), log_6addr(), rpl_neighbor_snprint(), shell_output_6addr(), uip_sr_link_snprint(), and uiplib_ipaddr_print().
1.8.11