RTRlib
Loading...
Searching...
No Matches
ipv6_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_IPV6_PRIVATE_H
11#define LRTR_IPV6_PRIVATE_H
12
13#include "ipv6.h"
14
16
17#include <stdbool.h>
18#include <stdint.h>
19#include <sys/types.h>
20
30bool lrtr_ipv6_addr_equal(const struct lrtr_ipv6_addr *a, const struct lrtr_ipv6_addr *b);
31
44struct lrtr_ipv6_addr lrtr_ipv6_get_bits(const struct lrtr_ipv6_addr *val, const uint8_t first_bit,
45 const uint8_t quantity);
46
57int lrtr_ipv6_addr_to_str(const struct lrtr_ipv6_addr *ip, char *str, const unsigned int len);
58
68int lrtr_ipv6_str_to_addr(const char *str, struct lrtr_ipv6_addr *ip);
69
79void lrtr_ipv6_addr_convert_byte_order(const uint32_t *src, uint32_t *dest, const enum target_byte_order tbo);
81#endif /* LRTR_IPV6_H */
target_byte_order
Target byte order for conversion.
Definition convert_byte_order_private.h:18
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.
int lrtr_ipv6_addr_to_str(const struct lrtr_ipv6_addr *ip, char *str, const unsigned int len)
Converts the passed ipv6_addr to string representation.
bool lrtr_ipv6_addr_equal(const struct lrtr_ipv6_addr *a, const struct lrtr_ipv6_addr *b)
Compares two lrtr_ipv6_addr structs.
int lrtr_ipv6_str_to_addr(const char *str, struct lrtr_ipv6_addr *ip)
Converts the passed IPv6 address string in to lrtr_ipv6_addr struct.
struct lrtr_ipv6_addr lrtr_ipv6_get_bits(const struct lrtr_ipv6_addr *val, const uint8_t first_bit, const uint8_t quantity)
Extracts quantity bits from an IPv6 address.
uint32_t len
Definition rtr_pdus.h:4
Struct holding an IPv6 address in host byte order.
Definition ipv6.h:18