static u32 ip4_fib_lookup(ip4_main_t *im, u32 sw_if_index, ip4_address_t *dst)
u32 ip4_fib_table_lookup_lb(ip4_fib_t *fib, const ip4_address_t *dst)
static ip4_fib_mtrie_leaf_t ip4_fib_mtrie_lookup_step(const ip4_fib_mtrie_t *m, ip4_fib_mtrie_leaf_t current_leaf, const ip4_address_t *dst_address, u32 dst_address_byte_index)
Lookup step.
void ip4_fib_table_destroy(u32 fib_index)
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
void ip4_fib_table_fwding_dpo_remove(ip4_fib_t *fib, const ip4_address_t *addr, u32 len, const dpo_id_t *dpo, fib_node_index_t cover_index)
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
void ip4_fib_table_sub_tree_walk(ip4_fib_t *fib, 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. ...
void ip4_fib_table_entry_insert(ip4_fib_t *fib, const ip4_address_t *addr, u32 len, fib_node_index_t fib_entry_index)
Aggregrate type for a prefix.
u32 ip4_fib_table_find_or_create_and_lock(u32 table_id, fib_source_t src)
Get or create an IPv4 fib.
static u32 ip4_fib_mtrie_leaf_get_adj_index(ip4_fib_mtrie_leaf_t n)
From the stored slot value extract the LB index value.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
uword * fib_index_by_table_id
Hash table mapping table id to fib index.
enum fib_source_t_ fib_source_t
The different sources that can create a route.
struct ip4_fib_t_ ip4_fib_t
The IPv4 FIB.
u32 ip4_fib_table_create_and_lock(fib_source_t src)
void ip4_fib_table_entry_remove(ip4_fib_t *fib, const ip4_address_t *addr, u32 len)
ip4_fib_mtrie_t mtrie
Mtrie for fast lookups.
void ip4_fib_table_fwding_dpo_update(ip4_fib_t *fib, const ip4_address_t *addr, u32 len, const dpo_id_t *dpo)
static ip4_fib_t * ip4_fib_get(u32 index)
Get the FIB at the given index.
u32 fib_node_index_t
A typedef of a node index.
static u32 ip4_fib_index_from_table_id(u32 table_id)
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.
fib_node_index_t ip4_fib_table_lookup(const ip4_fib_t *fib, const ip4_address_t *addr, u32 len)
static ip4_fib_mtrie_leaf_t ip4_fib_mtrie_lookup_step_one(const ip4_fib_mtrie_t *m, const ip4_address_t *dst_address)
Lookup step number 1.
void ip4_fib_table_walk(ip4_fib_t *fib, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a FIB table N.B: This is NOT safe to deletes.
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
#define vec_elt(v, i)
Get vector value at index i.
struct ip4_fib_t_ * v4_fibs
Vector of MTries.
u32 rev_classify_table_index
u32 fwd_classify_table_index
uword * fib_entry_by_dst_address[33]
ip4_main_t ip4_main
Global ip4 main structure.
fib_node_index_t ip4_fib_table_lookup_exact_match(const ip4_fib_t *fib, const ip4_address_t *addr, u32 len)
u8 * format_ip4_fib_table_memory(u8 *s, va_list *args)