RTRlib
Loading...
Searching...
No Matches
ipv4_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_IPV4_PRIVATE_H
11#define LRTR_IPV4_PRIVATE_H
12
13#include "ipv4.h"
14
16
17#include <inttypes.h>
18#include <stdbool.h>
19
32struct lrtr_ipv4_addr lrtr_ipv4_get_bits(const struct lrtr_ipv4_addr *val, const uint8_t from, const uint8_t number);
33
43int lrtr_ipv4_str_to_addr(const char *str, struct lrtr_ipv4_addr *ip);
44
55int lrtr_ipv4_addr_to_str(const struct lrtr_ipv4_addr *ip, char *str, const unsigned int len);
56
66bool lrtr_ipv4_addr_equal(const struct lrtr_ipv4_addr *a, const struct lrtr_ipv4_addr *b);
67
77void lrtr_ipv4_addr_convert_byte_order(const uint32_t src, uint32_t *dest, const enum target_byte_order tbo);
78
79#endif
target_byte_order
Target byte order for conversion.
Definition convert_byte_order_private.h:18
void lrtr_ipv4_addr_convert_byte_order(const uint32_t src, uint32_t *dest, const enum target_byte_order tbo)
[{
int lrtr_ipv4_addr_to_str(const struct lrtr_ipv4_addr *ip, char *str, const unsigned int len)
Converts an ipv4_addr struct to its string representation.
int lrtr_ipv4_str_to_addr(const char *str, struct lrtr_ipv4_addr *ip)
Converts ab IPv4 address from string to ipv4_addr struct.
struct lrtr_ipv4_addr lrtr_ipv4_get_bits(const struct lrtr_ipv4_addr *val, const uint8_t from, const uint8_t number)
Extracts number bits from the passed ipv4_addr,.
bool lrtr_ipv4_addr_equal(const struct lrtr_ipv4_addr *a, const struct lrtr_ipv4_addr *b)
Compares two ipv4_addr structs.
uint32_t len
Definition rtr_pdus.h:4
Struct storing an IPv4 address in host byte order.
Definition ipv4.h:19