|
RTRlib
|
Checks if two lrtr_ip_addr structs are equal. More...
Data Structures | |
| struct | lrtr_ip_addr |
| The lrtr_ip_addr struct stores a IPv4 or IPv6 address in host byte order. More... | |
Enumerations | |
| enum | lrtr_ip_version { LRTR_IPV4 , LRTR_IPV6 } |
| Version of the IP protocol. More... | |
Functions | |
| int | lrtr_ip_addr_to_str (const struct lrtr_ip_addr *ip, char *str, const unsigned int len) |
| Converts the passed lrtr_ip_addr struct to string representation. | |
| int | lrtr_ip_str_to_addr (const char *str, struct lrtr_ip_addr *ip) |
| Converts the passed IP address in string representation to an lrtr_ip_addr. | |
| bool | lrtr_ip_addr_equal (const struct lrtr_ip_addr a, const struct lrtr_ip_addr b) |
| Checks if two lrtr_ip_addr structs are equal. | |
| bool | lrtr_ip_str_cmp (const struct lrtr_ip_addr *addr1, const char *addr2) |
| Compares addr1 in the lrtr_ip_addr struct with addr2 in string representation. | |
| void | lrtr_ipv4_addr_convert_byte_order (const uint32_t src, uint32_t *dest, const enum target_byte_order tbo) |
| [{ | |
| void | lrtr_ipv6_addr_convert_byte_order (const uint32_t *src, uint32_t *dest, const enum target_byte_order tbo) |
| Converts the passed IPv6 address to given byte order. | |
Checks if two lrtr_ip_addr structs are equal.
| [in] | a | lrtr_ip_addr |
| [in] | b | lrtr_ip_addr |
| enum lrtr_ip_version |
#include <rtrlib/lib/ip.h>
Version of the IP protocol.
| Enumerator | |
|---|---|
| LRTR_IPV4 | IPV4. |
| LRTR_IPV6 | LRTR_IPV6. |
| bool lrtr_ip_addr_equal | ( | const struct lrtr_ip_addr | a, |
| const struct lrtr_ip_addr | b | ||
| ) |
#include <rtrlib/lib/ip.h>
Checks if two lrtr_ip_addr structs are equal.
| [in] | a | lrtr_ip_addr |
| [in] | b | lrtr_ip_addr |
| int lrtr_ip_addr_to_str | ( | const struct lrtr_ip_addr * | ip, |
| char * | str, | ||
| const unsigned int | len | ||
| ) |
#include <rtrlib/lib/ip.h>
Converts the passed lrtr_ip_addr struct to string representation.
| [in] | ip | lrtr_ip_addr |
| [out] | str | Pointer to a char array. The array must be at least INET_ADDRSTRLEN bytes long if the passed lrtr_ip_addr stores an IPv4 address. If lrtr_ip_addr stores an IPv6 address, str must be at least INET6_ADDRSTRLEN bytes long. |
| [in] | len | Length of the str array. |
| bool lrtr_ip_str_cmp | ( | const struct lrtr_ip_addr * | addr1, |
| const char * | addr2 | ||
| ) |
#include <rtrlib/lib/ip.h>
Compares addr1 in the lrtr_ip_addr struct with addr2 in string representation.
| [in] | addr1 | lrtr_ip_addr |
| [in] | addr2 | IP-address as string |
| int lrtr_ip_str_to_addr | ( | const char * | str, |
| struct lrtr_ip_addr * | ip | ||
| ) |
#include <rtrlib/lib/ip.h>
Converts the passed IP address in string representation to an lrtr_ip_addr.
| [in] | str | Pointer to a Null terminated char array. |
| [out] | ip | Pointer to a lrtr_ip_addr struct. |
| void lrtr_ipv4_addr_convert_byte_order | ( | const uint32_t | src, |
| uint32_t * | dest, | ||
| const enum target_byte_order | tbo | ||
| ) |
#include <rtrlib/lib/ipv4_private.h>
[{
Converts the passed IPv4 address to given byte order.
| [in] | src | IPv4 address in source byte order. |
| [out] | dest | IPv4 address in target byte order. |
| [in] | tbo | Target byte order for address conversion. } |
| void lrtr_ipv6_addr_convert_byte_order | ( | const uint32_t * | src, |
| uint32_t * | dest, | ||
| const enum target_byte_order | tbo | ||
| ) |
#include <rtrlib/lib/ipv6_private.h>
Converts the passed IPv6 address to given byte order.
| [in] | src | IPv6 address (uint32_t array) in source byte order. |
| [out] | dest | IPv6 address (uint32_t array) in target byte order. |
| [in] | tbo | Target byte order for address conversion. |