Go to the source code of this file.
|
static u32 | ip4_create_mfib_with_table_id (u32 table_id, mfib_source_t src) |
|
void | ip4_mfib_table_destroy (ip4_mfib_t *mfib) |
|
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_get_index_for_sw_if_index (u32 sw_if_index) |
|
fib_node_index_t | ip4_mfib_table_lookup_exact_match (const ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len) |
|
fib_node_index_t | ip4_mfib_table_lookup (const ip4_mfib_t *mfib, const ip4_address_t *src, const ip4_address_t *grp, u32 len) |
| The IPv4 Multicast-FIB. More...
|
|
void | ip4_mfib_table_entry_insert (ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len, fib_node_index_t fib_entry_index) |
|
void | ip4_mfib_table_entry_remove (ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len) |
|
void | ip4_mfib_table_walk (ip4_mfib_t *mfib, mfib_table_walk_fn_t fn, void *ctx) |
| Walk the IP4 mfib table. More...
|
|
u8 * | format_ip4_mfib_table_memory (u8 *s, va_list *args) |
| format (display) the memory usage for IP4 mfibs More...
|
|
static void | ip4_mfib_table_show_all (ip4_mfib_t *mfib, vlib_main_t *vm) |
|
static void | ip4_mfib_table_show_one (ip4_mfib_t *mfib, vlib_main_t *vm, ip4_address_t *src, ip4_address_t *grp, u32 mask_len) |
|
static clib_error_t * | ip4_show_mfib (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
#define IP4_MFIB_MK_GRP_KEY |
( |
|
_grp, |
|
|
|
_len, |
|
|
|
_key |
|
) |
| |
Value:{ \
_key = ((
u64)(_grp->data_u32 & \
}
#define IPV4_MFIB_GRP_LEN(_len)
ip4_main_t ip4_main
Global ip4 main structure.
Definition at line 153 of file ip4_mfib.c.
#define IP4_MFIB_MK_KEY |
( |
|
_grp, |
|
|
|
_src, |
|
|
|
_len, |
|
|
|
_key |
|
) |
| |
Value:{ \
_key = ((
u64)(_grp->data_u32 & \
_key |= _src->data_u32; \
}
#define IPV4_MFIB_GRP_LEN(_len)
ip4_main_t ip4_main
Global ip4 main structure.
Definition at line 147 of file ip4_mfib.c.
#define IPV4_MFIB_GRP_LEN |
( |
|
_len | ) |
(_len > 32 ? 32 : _len) |
u8* format_ip4_mfib_table_memory |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
format (display) the memory usage for IP4 mfibs
Definition at line 309 of file ip4_mfib.c.
Get or create an IPv4 fib.
Get or create an IPv4 fib with the provided table ID.
- Parameters
-
table_id | When 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.
u32 ip4_mfib_table_get_index_for_sw_if_index |
( |
u32 |
sw_if_index | ) |
|
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.
Walk the IP4 mfib table.
- Parameters
-
mfib | the table to walk |
fn | The function to invoke on each entry visited |
ctx | A context passed in the visit function |
Definition at line 286 of file ip4_mfib.c.
Initial value:= {
.path = "show ip mfib",
.short_help = "show ip mfib [summary] [table <table-id>] [index <fib-id>] [<grp-addr>[/<mask>]] [<grp-addr>] [<src-addr> <grp-addr>]",
}
static clib_error_t * ip4_show_mfib(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (ip4_show_mfib_command)
Definition at line 553 of file ip4_mfib.c.
Initial value:= {
{
.fp_src_addr = {
.ip4.data_u32 = 0,
},
.fp_grp_addr = {
.ip4.data_u32 = 0,
},
.fp_len = 0,
},
}
Definition at line 21 of file ip4_mfib.c.