27 const ip6_address_t *
addr,
30 const ip6_address_t *
addr,
34 const ip6_address_t *
addr,
38 const ip6_address_t *
addr,
44 const ip6_address_t *
addr,
49 const ip6_address_t *
addr,
55 const ip6_address_t *
dst);
68 const ip6_address_t *
dst)
79 kv.
key[0] = dst->as_u64[0];
80 kv.
key[1] = dst->as_u64[1];
81 fib = ((
u64)((fib_index))<<32);
83 for (i = 0; i <
len; i++)
88 ASSERT(dst_address_length >= 0 && dst_address_length <= 128);
90 kv.
key[0] &= mask->as_u64[0];
91 kv.
key[1] &= mask->as_u64[1];
92 kv.
key[2] = fib | dst_address_length;
94 rv = clib_bihash_search_inline_2_24_8(&table->
ip6_hash, &kv, &value);
enum fib_source_t_ fib_source_t
The different sources that can create a route.
static u32 ip6_fib_table_fwding_lookup(u32 fib_index, const ip6_address_t *dst)
vl_api_wireguard_peer_flags_t flags
static ip6_fib_t * ip6_fib_get(fib_node_index_t index)
int dpo_is_adj(const dpo_id_t *dpo)
Return TRUE is the DPO is any type of adjacency.
u32 ip6_fib_table_find_or_create_and_lock(u32 table_id, fib_source_t src)
Get or create an IPv6 fib.
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
enum fib_table_flags_t_ fib_table_flags_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u32 ip6_fib_table_fwding_lookup_with_if_index(ip6_main_t *im, u32 sw_if_index, const ip6_address_t *dst)
void ip6_fib_table_fwding_dpo_update(u32 fib_index, const ip6_address_t *addr, u32 len, const dpo_id_t *dpo)
u8 * prefix_lengths_in_search_order
clib_bihash_24_8_t ip6_hash
void ip6_fib_table_sub_tree_walk(u32 fib_index, const fib_prefix_t *root, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a sub-tree of the FIB table N.B: This is NOT safe to deletes. ...
Aggregate type for a prefix.
static u32 ip6_src_lookup_for_packet(ip6_main_t *im, vlib_buffer_t *b, ip6_header_t *i)
return the DPO that the LB stacks on.
A representation of a single IP6 table.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
void ip6_fib_table_entry_insert(u32 fib_index, const ip6_address_t *addr, u32 len, fib_node_index_t fib_entry_index)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
fib_node_index_t ip6_fib_table_lookup_exact_match(u32 fib_index, const ip6_address_t *addr, u32 len)
void ip6_fib_table_destroy(u32 fib_index)
static const dpo_id_t * load_balance_get_bucket_i(const load_balance_t *lb, u32 bucket)
static u32 ip6_fib_index_from_table_id(u32 table_id)
uword * fib_index_by_table_id
u32 ip6_fib_table_create_and_lock(fib_source_t src, fib_table_flags_t flags, u8 *desc)
ip6_address_t fib_masks[129]
sll srl srl sll sra u16x4 i
This table stores the routes that are used to forward traffic.
u32 fib_node_index_t
A typedef of a node index.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
fib_table_walk_rc_t(* fib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
void ip6_fib_table_walk(u32 fib_index, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a FIB table N.B: This is NOT safe to deletes.
void ip6_fib_table_entry_remove(u32 fib_index, const ip6_address_t *addr, u32 len)
static load_balance_t * load_balance_get(index_t lbi)
ip6_fib_table_instance_t ip6_table[IP6_FIB_NUM_TABLES]
The two FIB tables; fwding and non-fwding.
u32 ip6_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
index_t dpoi_index
the index of objects of that type
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
VLIB buffer representation.
fib_node_index_t ip6_fib_table_lookup(u32 fib_index, const ip6_address_t *addr, u32 len)
void ip6_fib_table_fwding_dpo_remove(u32 fib_index, const ip6_address_t *addr, u32 len, const dpo_id_t *dpo)
u8 * format_ip6_fib_table_memory(u8 *s, va_list *args)
struct fib_table_t_ * fibs
vl_api_interface_index_t sw_if_index