21#ifndef UNIVERSAL_ADDRESS_H
22#define UNIVERSAL_ADDRESS_H
34#ifndef UNIVERSAL_ADDRESS_SIZE
35#define UNIVERSAL_ADDRESS_SIZE (0)
40#if defined(MODULE_IPV6_ADDR) && ((IPV6_ADDR_BIT_LEN >> 3) > UNIVERSAL_ADDRESS_SIZE)
41#undef UNIVERSAL_ADDRESS_SIZE
42#define UNIVERSAL_ADDRESS_SIZE (IPV6_ADDR_BIT_LEN >> 3)
46#define UNIVERSAL_ADDRESS_EQUAL (0)
49#define UNIVERSAL_ADDRESS_MATCHING_PREFIX (1)
54#define UNIVERSAL_ADDRESS_IS_ALL_ZERO_ADDRESS (2)
107 uint8_t *addr,
size_t *addr_size);
129 uint8_t *addr,
size_t *addr_size_in_bits);
150 uint8_t *prefix,
size_t prefix_size_in_bits);
void universal_address_print_entry(universal_address_container_t *entry)
Print the content of the given entry.
void universal_address_init(void)
Initialize the data structure for the entries.
void universal_address_reset(void)
Resets the universal_address_container_t::use_count for all entries.
int universal_address_get_num_used_entries(void)
Return the number of used entries.
uint8_t * universal_address_get_address(universal_address_container_t *entry, uint8_t *addr, size_t *addr_size)
Copy the address from the given container to the provided pointer.
universal_address_container_t * universal_address_add(uint8_t *addr, size_t addr_size)
Add a given address to the universal address entries.
#define UNIVERSAL_ADDRESS_SIZE
size of the used addresses in bytes
void universal_address_rem(universal_address_container_t *entry)
Add a given container from the universal address entries.
int universal_address_compare_prefix(universal_address_container_t *entry, uint8_t *prefix, size_t prefix_size_in_bits)
Determine if the entry equals the provided prefix This function requires to be provided with the full...
void universal_address_print_table(void)
Print the content of the generic address table up to the used element.
int universal_address_compare(universal_address_container_t *entry, uint8_t *addr, size_t *addr_size_in_bits)
Determine if the entry equals the provided address This function requires to be provided with the ful...
Definitions for IPv6 addresses.
The container descriptor used to identify a universal address entry.