Loading...
Searching...
No Matches
table.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Martin Landsmann <Martin.Landsmann@HAW-Hamburg.de>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include <stdint.h>
19
20#include "sched.h"
21#include "universal_address.h"
22#include "mutex.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#define FIB_MAX_REGISTERED_RP (5)
33
51
61
77
90
94#define FIB_TABLE_TYPE_SH (1)
95
99#define FIB_TABLE_TYPE_SR (FIB_TABLE_TYPE_SH + 1)
100
133
134#ifdef __cplusplus
135}
136#endif
137
int16_t kernel_pid_t
Unique process identifier.
Definition sched.h:134
Mutex for thread synchronization.
Container descriptor for a FIB entry.
Definition table.h:37
kernel_pid_t iface_id
interface ID
Definition table.h:39
universal_address_container_t * next_hop
Pointer to the shared generic address.
Definition table.h:49
universal_address_container_t * global
Pointer to the shared generic address.
Definition table.h:45
uint32_t next_hop_flags
Unique identifier for the type of the next hop address.
Definition table.h:47
uint32_t global_flags
Unique identifier for the type of the global address.
Definition table.h:43
uint64_t lifetime
Lifetime of this entry (an absolute time-point is stored by the FIB)
Definition table.h:41
Container descriptor for a FIB source route entry.
Definition table.h:55
universal_address_container_t * address
Pointer to the shared generic address.
Definition table.h:57
struct fib_sr_entry * next
Pointer to the next shared generic address on the source route.
Definition table.h:59
Container for one FIB source route table, combining source routes and an entry pool.
Definition table.h:82
fib_sr_t * headers
pointer to source route header array
Definition table.h:84
fib_sr_entry_t * entry_pool
pointer to entry pool array holding all hop entries for this table
Definition table.h:86
size_t entry_pool_size
the maximum number of elements in the entry pool
Definition table.h:88
Container descriptor for a FIB source route.
Definition table.h:65
fib_sr_entry_t * sr_dest
Pointer to the destination of the source route.
Definition table.h:75
kernel_pid_t sr_iface_id
interface ID
Definition table.h:67
uint64_t sr_lifetime
Lifetime of this entry (an absolute time-point is stored by the FIB)
Definition table.h:69
uint32_t sr_flags
Flags for this source route.
Definition table.h:71
fib_sr_entry_t * sr_path
Pointer to the first hop on the source route.
Definition table.h:73
Meta information of a FIB table.
Definition table.h:104
mutex_t mtx_access
table access mutex to grant exclusive operations on calls
Definition table.h:119
size_t size
the maximum number of entries in this FIB table
Definition table.h:117
size_t notify_rp_pos
current number of registered RPs.
Definition table.h:121
uint8_t table_type
the kind of this FIB table, single hop or source route.
Definition table.h:115
universal_address_container_t * prefix_rp[FIB_MAX_REGISTERED_RP]
the prefix handled by each registered RP.
Definition table.h:131
fib_sr_meta_t * source_routes
array holding the FIB entries for source routes
Definition table.h:110
fib_entry_t * entries
array holding the FIB entries for single hops
Definition table.h:108
kernel_pid_t notify_rp[FIB_MAX_REGISTERED_RP]
the kernel_pid_t of the registered RPs.
Definition table.h:126
Mutex structure.
Definition mutex.h:36
The container descriptor used to identify a universal address entry.
struct fib_sr_entry fib_sr_entry_t
Container descriptor for a FIB source route entry.
#define FIB_MAX_REGISTERED_RP
maximum number of handled routing protocols (RP) used to notify the saved kernel_pid_t on unreachable...
Definition table.h:32
Types and functions for operating universal addresses.