RTRlib
Loading...
Searching...
No Matches
ip_private.h
Go to the documentation of this file.
1/*
2 * This file is part of RTRlib.
3 *
4 * This file is subject to the terms and conditions of the MIT license.
5 * See the file LICENSE in the top level directory for more details.
6 *
7 * Website: http://rtrlib.realmv6.org/
8 */
9
10#ifndef LRTR_IP_PRIVATE_H
11#define LRTR_IP_PRIVATE_H
12
13#include "ip.h"
14
17
25
34struct lrtr_ip_addr lrtr_ip_addr_get_bits(const struct lrtr_ip_addr *val, const uint8_t from, const uint8_t number);
35
46bool lrtr_ip_addr_equal(const struct lrtr_ip_addr a, const struct lrtr_ip_addr b);
47
55bool lrtr_ip_str_cmp(const struct lrtr_ip_addr *addr1, const char *addr2);
56
57#endif
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.
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.
The lrtr_ip_addr struct stores a IPv4 or IPv6 address in host byte order.
Definition ip.h:38