FD.io VPP  v19.04-6-g6f05f72
Vector Packet Processing
ip4_mfib.h File Reference
+ Include dependency graph for ip4_mfib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

fib_node_index_t ip4_mfib_table_lookup (const ip4_mfib_t *fib, const ip4_address_t *src, const ip4_address_t *grp, u32 len)
 The IPv4 Multicast-FIB. More...
 
fib_node_index_t ip4_mfib_table_lookup_exact_match (const ip4_mfib_t *fib, const ip4_address_t *grp, const ip4_address_t *src, u32 len)
 
fib_node_index_t ip4_mfib_table_get_less_specific (const ip4_mfib_t *mfib, const ip4_address_t *src, const ip4_address_t *grp, u32 len)
 
void ip4_mfib_table_entry_remove (ip4_mfib_t *fib, const ip4_address_t *grp, const ip4_address_t *src, u32 len)
 
void ip4_mfib_table_entry_insert (ip4_mfib_t *fib, const ip4_address_t *grp, const ip4_address_t *src, u32 len, fib_node_index_t fib_entry_index)
 
void ip4_mfib_table_destroy (ip4_mfib_t *fib)
 
static ip4_mfib_tip4_mfib_get (u32 index)
 Get the FIB at the given index. More...
 
u32 ip4_mfib_table_find_or_create_and_lock (u32 table_id, mfib_source_t src)
 Get or create an IPv4 fib. More...
 
u32 ip4_mfib_table_create_and_lock (mfib_source_t src)
 
static u32 ip4_mfib_index_from_table_id (u32 table_id)
 
u32 ip4_mfib_table_get_index_for_sw_if_index (u32 sw_if_index)
 
void ip4_mfib_table_walk (ip4_mfib_t *mfib, mfib_table_walk_fn_t fn, void *ctx)
 Walk the IP4 mfib table. More...
 
u8format_ip4_mfib_table_memory (u8 *s, va_list *args)
 format (display) the memory usage for IP4 mfibs More...
 

Function Documentation

u8* format_ip4_mfib_table_memory ( u8 s,
va_list *  args 
)

format (display) the memory usage for IP4 mfibs

Definition at line 341 of file ip4_mfib.c.

+ Here is the caller graph for this function:

static ip4_mfib_t* ip4_mfib_get ( u32  index)
inlinestatic

Get the FIB at the given index.

Definition at line 62 of file ip4_mfib.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 ip4_mfib_index_from_table_id ( u32  table_id)
inlinestatic

Definition at line 84 of file ip4_mfib.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 ip4_mfib_table_create_and_lock ( mfib_source_t  src)

+ Here is the caller graph for this function:

void ip4_mfib_table_destroy ( ip4_mfib_t fib)

Definition at line 84 of file ip4_mfib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_mfib_table_entry_insert ( ip4_mfib_t fib,
const ip4_address_t grp,
const ip4_address_t src,
u32  len,
fib_node_index_t  fib_entry_index 
)

Definition at line 260 of file ip4_mfib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ip4_mfib_table_entry_remove ( ip4_mfib_t fib,
const ip4_address_t grp,
const ip4_address_t src,
u32  len 
)

Definition at line 291 of file ip4_mfib.c.

+ Here is the caller graph for this function:

u32 ip4_mfib_table_find_or_create_and_lock ( u32  table_id,
mfib_source_t  src 
)

Get or create an IPv4 fib.

Get or create an IPv4 fib with the provided table ID.

Parameters
table_idWhen set to ~0, an arbitrary and unused fib ID is picked and can be retrieved with ret->table_id. Otherwise, the fib ID to be used to retrieve or create the desired fib.
Returns
A pointer to the retrieved or created fib.

Definition at line 117 of file ip4_mfib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 ip4_mfib_table_get_index_for_sw_if_index ( u32  sw_if_index)

Definition at line 131 of file ip4_mfib.c.

+ Here is the caller graph for this function:

fib_node_index_t ip4_mfib_table_get_less_specific ( const ip4_mfib_t mfib,
const ip4_address_t src,
const ip4_address_t grp,
u32  len 
)

Definition at line 228 of file ip4_mfib.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_node_index_t ip4_mfib_table_lookup ( const ip4_mfib_t fib,
const ip4_address_t src,
const ip4_address_t grp,
u32  len 
)

The IPv4 Multicast-FIB.

FIXME

This IPv4 FIB is used by the protocol independent FIB. So directly using this APIs in client code is not encouraged. However, this IPv4 FIB can be used if all the client wants is an IPv4 prefix data-base

Definition at line 190 of file ip4_mfib.c.

+ Here is the caller graph for this function:

fib_node_index_t ip4_mfib_table_lookup_exact_match ( const ip4_mfib_t fib,
const ip4_address_t grp,
const ip4_address_t src,
u32  len 
)

Definition at line 165 of file ip4_mfib.c.

+ Here is the caller graph for this function:

void ip4_mfib_table_walk ( ip4_mfib_t mfib,
mfib_table_walk_fn_t  fn,
void *  ctx 
)

Walk the IP4 mfib table.

Parameters
mfibthe table to walk
fnThe function to invoke on each entry visited
ctxA context passed in the visit function

Definition at line 318 of file ip4_mfib.c.

+ Here is the caller graph for this function: