RTRlib
|
Go to the source code of this file.
Functions | |
bool | lrtr_ip_addr_is_zero (const struct lrtr_ip_addr) |
Detects if the lrtr_ip_addr only contains 0 bits. | |
struct lrtr_ip_addr | lrtr_ip_addr_get_bits (const struct lrtr_ip_addr *val, const uint8_t from, const uint8_t number) |
Extracts number bits from the passed lrtr_ip_addr, starting at bit number from. | |
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. | |
struct lrtr_ip_addr lrtr_ip_addr_get_bits | ( | const struct lrtr_ip_addr * | val, |
const uint8_t | from, | ||
const uint8_t | number | ||
) |
Extracts number bits from the passed lrtr_ip_addr, starting at bit number from.
The bit with the highest significance is bit 0. All bits that aren't in the specified range will be 0.
[in] | val | lrtr_ip_addr |
[in] | from | Position of the first bit that is extracted. |
[in] | number | How many bits will be extracted. |
bool lrtr_ip_addr_is_zero | ( | const struct lrtr_ip_addr | ) |
Detects if the lrtr_ip_addr only contains 0 bits.
[in] | lrtr_ip_addr |