|
RTRlib
|
Functions | |
| bool | ip_addr_equal (const struct ip_addr a, const struct ip_addr b) |
| int | ip_addr_to_str (const struct ip_addr *ip, char *str, const unsigned int len) |
| bool | ip_str_cmp (const struct ip_addr *addr1, const char *addr2) |
| int | ip_str_to_addr (const char *str, struct ip_addr *ip) |
| void | ipv6_addr_to_host_byte_order (const uint32_t *src, uint32_t *dest) |
| int ip_addr_to_str | ( | const struct ip_addr * | ip, |
| char * | str, | ||
| const unsigned int | len | ||
| ) |
Converts the passed ip_addr struct to string representation.
| [in] | ip | ip_addr |
| [out] | str | Pointer to a char array. The array must be at least INET_ADDRSTRLEN bytes long if the passed ip_addr stores an IPv4 address. If ip_addr stores an IPv6 address, str must be at least INET6_ADDRSTRLEN bytes long. |
| [in] | len | Length of the str array. |
| bool ip_str_cmp | ( | const struct ip_addr * | addr1, |
| const char * | addr2 | ||
| ) |
Compares addr1 in the ip_addr struct with addr2 in string representation.
| [in] | addr1 | ip_addr |
| [in] | addr2 | IP-address as string |
References ip_str_to_addr().
| int ip_str_to_addr | ( | const char * | str, |
| struct ip_addr * | ip | ||
| ) |
Converts the passed IP address in string representation to an ip_addr.
| [in] | str | Pointer to a Null terminated char array. |
| [out] | ip | Pointer to a ip_addr struct. |
Referenced by ip_str_cmp().
| void ipv6_addr_to_host_byte_order | ( | const uint32_t * | src, |
| uint32_t * | dest | ||
| ) |
[{ Converts the passed IPv6 address first_bit network byte order to host byte order.
| [in] | src | Pointer to a uint32_t array storing a ipv6 address in network byte order. |
| [out] | dest | Pointer a uint32_t array that will be used to store the ipv6 addr in host byte order. } |
1.8.6