40 #define TEIB_NOTIFY(_te, _fn) { \ 42 vec_foreach(_vft, teib_vfts) { \ 61 const ip46_address_t *
104 const ip46_address_t *
peer,
118 return (VNET_API_ERROR_NO_SUCH_FIB);
147 return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
169 return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
183 s =
format (s,
"[%d] ", tei);
188 s =
format (s,
" via [%d]:%U",
fib_protocol_t fp_proto
protocol type
int teib_entry_del(u32 sw_if_index, const ip46_address_t *peer)
teib_entry_t * teib_entry_get(index_t tei)
vnet_main_t * vnet_get_main(void)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
void teib_walk(teib_walk_cb_t fn, void *ctx)
void adj_midchain_delegate_stack(adj_index_t ai, u32 fib_index, const fib_prefix_t *pfx)
create/attach a midchain delegate and stack it on the prefix passed
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static clib_error_t * teib_init(vlib_main_t *vm)
#define hash_set_mem(h, key, value)
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
const ip46_address_t * teib_entry_get_peer(const teib_entry_t *te)
format_function_t format_vnet_sw_if_index_name
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void teib_walk_itf(u32 sw_if_index, teib_walk_cb_t fn, void *ctx)
u8 * format_teib_entry(u8 *s, va_list *args)
#define clib_memcpy(d, s, n)
u32 teib_entry_get_fib_index(const teib_entry_t *te)
#define VLIB_INIT_FUNCTION(x)
u8 * format_fib_prefix(u8 *s, va_list *args)
Aggregate type for a prefix.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
u16 fp_len
The mask length.
#define hash_create_mem(elts, key_bytes, value_bytes)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define hash_unset_mem(h, key)
static_always_inline void ip46_address_copy(ip46_address_t *dst, const ip46_address_t *src)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
u32 teib_entry_get_sw_if_index(const teib_entry_t *te)
accessors for the opaque struct
walk_rc_t(* teib_walk_cb_t)(index_t nei, void *ctx)
#define pool_put(P, E)
Free an object E in pool P.
format_function_t format_ip46_address
void teib_entry_adj_stack(const teib_entry_t *te, adj_index_t ai)
static teib_entry_t * teib_pool
u32 adj_index_t
An index for adjacencies.
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
static void clib_mem_free(void *p)
struct teib_key_t_ teib_key_t
static void * clib_mem_alloc(uword size)
#define TEIB_NOTIFY(_te, _fn)
teib_entry_t * teib_entry_find(u32 sw_if_index, const ip46_address_t *peer)
int teib_entry_add(u32 sw_if_index, const ip46_address_t *peer, u32 nh_table_id, const ip46_address_t *nh)
Create a new TEIB entry.
static teib_vft_t * teib_vfts
#define hash_get_mem(h, key)
#define pool_foreach_index(i, v, body)
Iterate pool by index.
void teib_register(const teib_vft_t *vft)
vl_api_interface_index_t sw_if_index
const fib_prefix_t * teib_entry_get_nh(const teib_entry_t *te)