RTRlib
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ipv6.h
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_IPV6_H
11 #define LRTR_IPV6_H
12 
13 #include "rtrlib/lib/convert_byte_order.h"
14 
15 #include <sys/types.h>
16 #include <stdbool.h>
17 #include <stdint.h>
18 
23  uint32_t addr[4];
24 };
25 
35 bool lrtr_ipv6_addr_equal(const struct lrtr_ipv6_addr *a,
36  const struct lrtr_ipv6_addr *b);
37 
50 struct lrtr_ipv6_addr lrtr_ipv6_get_bits(const struct lrtr_ipv6_addr *val,
51  const uint8_t first_bit,
52  const uint8_t quantity);
53 
64 int lrtr_ipv6_addr_to_str(const struct lrtr_ipv6_addr *ip,
65  char *str, const unsigned int len);
66 
76 int lrtr_ipv6_str_to_addr(const char *str, struct lrtr_ipv6_addr *ip);
77 
87 void lrtr_ipv6_addr_convert_byte_order(const uint32_t *src, uint32_t *dest,
88  const enum target_byte_order tbo);
90 #endif /* LRTR_IPV6_H */
Struct holding an IPv6 address in host byte order.
Definition: ipv6.h:22
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.
Definition: ipv6.c:200
uint32_t addr[4]
Definition: ipv6.h:23