16 #ifndef __MFIB_TABLE_H__ 17 #define __MFIB_TABLE_H__ 28 #define MFIB_TABLE_N_LOCKS (MFIB_N_SOURCES+1) 29 #define MFIB_TABLE_TOTAL_LOCKS MFIB_N_SOURCES void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
u32 mfib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
u32 mfib_table_get_num_entries(u32 fib_index, fib_protocol_t proto)
Return the number of entries in the FIB added by a given source.
enum mfib_entry_flags_t_ mfib_entry_flags_t
A representation of a path as described by a route producer.
void mfib_table_entry_path_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *paths)
Remove n paths to an entry (aka route) in the FIB.
void mfib_table_flush(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Flush all entries from a table for the source.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u16 mft_locks[MFIB_TABLE_N_LOCKS]
number of locks on the table
u32 mft_total_route_counts
Total route counters.
u32 mfib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, mfib_source_t source)
Get the index of the FIB for a Table-ID.
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
struct mfib_table_t_ mfib_table_t
A protocol Independent IP multicast FIB table.
fib_node_index_t mfib_table_lookup_exact_match(u32 fib_index, const mfib_prefix_t *prefix)
Perfom an exact match in the non-forwarding table.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
fib_node_index_t mfib_table_entry_path_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath, mfib_itf_flags_t flags)
Add n paths to an entry (aka route) in the FIB.
fib_node_index_t mfib_table_lookup(u32 fib_index, const mfib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
enum mfib_source_t_ mfib_source_t
Possible [control plane] sources of MFIB entries.
fib_node_index_t mft_index
Index into FIB vector.
void mfib_table_entry_delete(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source)
Delete a FIB entry.
u8 * mft_desc
Table description.
fib_node_index_t mfib_table_entry_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, fib_rpf_id_t rpf_id, mfib_entry_flags_t flags)
Add a new (with no replication) or lock an existing entry.
#define MFIB_TABLE_N_LOCKS
Keep a lock per-source and a total.
u32 fib_node_index_t
A typedef of a node index.
Aggregrate type for a prefix.
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
u32 mfib_table_get_index_for_sw_if_index(fib_protocol_t proto, u32 sw_if_index)
Get the index of the FIB bound to the interface.
fib_protocol_t mft_proto
Which protocol this table serves.
u32 mft_table_id
Table ID (hash key) for this FIB.
u8 * format_mfib_table_name(u8 *s, va_list ap)
Format the description/name of the table.
void mfib_table_walk(u32 fib_index, fib_protocol_t proto, mfib_table_walk_fn_t fn, void *ctx)
Walk all entries in a FIB table N.B: This is NOT safe to deletes.
enum mfib_itf_flags_t_ mfib_itf_flags_t
fib_node_index_t mfib_table_entry_special_add(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, mfib_entry_flags_t flags, index_t rep_dpo)
Add a 'special' entry to the mFIB that links to the DPO passed A special entry is an entry that the F...
int(* mfib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
A protocol Independent IP multicast FIB table.
void mfib_table_entry_delete_index(fib_node_index_t entry_index, mfib_source_t source)
Delete a FIB entry.
u32 mfib_table_find_or_create_and_lock_w_name(fib_protocol_t proto, u32 table_id, mfib_source_t source, const u8 *name)
Get the index of the FIB for a Table-ID.