Go to the source code of this file.
|
static u32 | ip6_create_mfib_with_table_id (u32 table_id, mfib_source_t src) |
|
void | ip6_mfib_table_destroy (ip6_mfib_t *mfib) |
|
void | ip6_mfib_interface_enable_disable (u32 sw_if_index, int is_enable) |
| Add/remove the interface from the accepting list of the special MFIB entries. More...
|
|
u32 | ip6_mfib_table_find_or_create_and_lock (u32 table_id, mfib_source_t src) |
| Get or create an IPv4 fib. More...
|
|
u32 | ip6_mfib_table_get_index_for_sw_if_index (u32 sw_if_index) |
|
fib_node_index_t | ip6_mfib_table_lookup_exact_match (const ip6_mfib_t *mfib, const ip6_address_t *grp, const ip6_address_t *src, u32 len) |
|
fib_node_index_t | ip6_mfib_table_fwd_lookup (const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp) |
|
fib_node_index_t | ip6_mfib_table_get_less_specific (const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp, u32 len) |
|
fib_node_index_t | ip6_mfib_table_lookup (const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp, u32 len) |
| The IPv4 Multicast-FIB. More...
|
|
static void | compute_prefix_lengths_in_search_order (ip6_mfib_table_instance_t *table) |
|
void | ip6_mfib_table_entry_insert (ip6_mfib_t *mfib, const ip6_address_t *grp, const ip6_address_t *src, u32 len, fib_node_index_t mfib_entry_index) |
|
void | ip6_mfib_table_entry_remove (ip6_mfib_t *mfib, const ip6_address_t *grp, const ip6_address_t *src, u32 len) |
|
static clib_error_t * | ip6_mfib_module_init (vlib_main_t *vm) |
|
u8 * | format_ip6_mfib_table_memory (u8 *s, va_list *args) |
| format (display) ipv6 MFIB mempry usage More...
|
|
static void | ip6_mfib_table_show_one (ip6_mfib_t *mfib, vlib_main_t *vm, ip6_address_t *src, ip6_address_t *grp, u32 mask_len, u32 cover) |
|
static walk_rc_t | ip6_mfib_table_collect_entries (fib_node_index_t mfei, void *arg) |
|
static void | ip6_mfib_table_show_all (ip6_mfib_t *mfib, vlib_main_t *vm) |
|
static int | ip6_mfib_walk_cb (clib_bihash_kv_40_8_t *kvp, void *arg) |
|
void | ip6_mfib_table_walk (ip6_mfib_t *mfib, mfib_table_walk_fn_t fn, void *arg) |
| Walk the IP6 mfib table. More...
|
|
static clib_error_t * | ip6_show_mfib (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
◆ FOR_EACH_IP6_SPECIAL
#define FOR_EACH_IP6_SPECIAL |
( |
|
_pfx, |
|
|
|
_body |
|
) |
| |
Value:{ \
u8 _ii; \
for (_ii = 0; \
_ii++) \
{ \
{ \
ip6_set_solicited_node_multicast_address( \
&(_pfx)->fp_grp_addr.ip6, 0); \
} \
else \
{ \
ip6_set_reserved_multicast_address ( \
&(_pfx)->fp_grp_addr.ip6, \
_spec->ims_scope, \
_spec->ims_byte); \
} \
(_pfx)->fp_len = _spec->ims_len; \
do { _body; } while (0); \
} \
}
static const ip6_mfib_special_t ip6_mfib_specials[]
Definition at line 104 of file ip6_mfib.c.
◆ IP6_MFIB_MK_KEY
#define IP6_MFIB_MK_KEY |
( |
|
_mfib, |
|
|
|
_grp, |
|
|
|
_src, |
|
|
|
_len, |
|
|
|
_key |
|
) |
| |
Value:{ \
_key.key[0] = (_grp->as_u64[0] & \
_key.key[1] = (_grp->as_u64[1] & \
if (_len == 256) { \
_key.key[2] = _src->as_u64[0]; \
_key.key[3] = _src->as_u64[1]; \
} else { \
_key.key[2] = 0; \
_key.key[3] = 0; \
} \
_key.key[4] = _mfib->index; \
_key.key[4] = (_key.key[4] << 32) |
len; \
}
#define IPV6_MFIB_GRP_LEN(_len)
Definition at line 303 of file ip6_mfib.c.
◆ IPV6_MFIB_GRP_LEN
#define IPV6_MFIB_GRP_LEN |
( |
|
_len | ) |
(_len > 128 ? 128 : _len) |
◆ ip6_mfib_key_t
Key and mask for radix.
Definition at line 25 of file ip6_mfib.c.
◆ ip6_mfib_show_ctx_t
◆ ip6_mfib_special_t
◆ ip6_mfib_special_type_t
◆ ip6_mfib_walk_ctx_t
Context when walking the IPv6 table.
Since all VRFs are in the same hash table, we need to filter only those we need as we walk
◆ ip6_mfib_special_type_t_
Enumerator |
---|
IP6_MFIB_SPECIAL_TYPE_NONE | |
IP6_MFIB_SPECIAL_TYPE_SOLICITED | |
Definition at line 39 of file ip6_mfib.c.
◆ compute_prefix_lengths_in_search_order()
◆ format_ip6_mfib_table_memory()
u8* format_ip6_mfib_table_memory |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
format (display) ipv6 MFIB mempry usage
Definition at line 522 of file ip6_mfib.c.
◆ ip6_create_mfib_with_table_id()
◆ ip6_mfib_interface_enable_disable()
void ip6_mfib_interface_enable_disable |
( |
u32 |
sw_if_index, |
|
|
int |
is_enable |
|
) |
| |
Add/remove the interface from the accepting list of the special MFIB entries.
Definition at line 232 of file ip6_mfib.c.
◆ ip6_mfib_module_init()
◆ ip6_mfib_table_collect_entries()
◆ ip6_mfib_table_destroy()
◆ ip6_mfib_table_entry_insert()
◆ ip6_mfib_table_entry_remove()
◆ ip6_mfib_table_find_or_create_and_lock()
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 273 of file ip6_mfib.c.
◆ ip6_mfib_table_fwd_lookup()
◆ ip6_mfib_table_get_index_for_sw_if_index()
u32 ip6_mfib_table_get_index_for_sw_if_index |
( |
u32 |
sw_if_index | ) |
|
◆ ip6_mfib_table_get_less_specific()
◆ ip6_mfib_table_lookup()
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 415 of file ip6_mfib.c.
◆ ip6_mfib_table_lookup_exact_match()
◆ ip6_mfib_table_show_all()
◆ ip6_mfib_table_show_one()
◆ ip6_mfib_table_walk()
Walk the IP6 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 626 of file ip6_mfib.c.
◆ ip6_mfib_walk_cb()
◆ ip6_show_mfib()
◆ all_zeros
Initial value:= {
.fp_src_addr = {
.ip6.as_u64 = {0, 0},
},
.fp_grp_addr = {
.ip6.as_u64 = {0, 0},
},
.fp_len = 0,
}
Definition at line 27 of file ip6_mfib.c.
◆ ip6_mfib_specials
Initial value:=
{
{
.ims_len = 104,
},
{
.ims_scope = IP6_MULTICAST_SCOPE_link_local,
.ims_byte = IP6_MULTICAST_GROUP_ID_all_routers,
.ims_len = 128,
},
{
.ims_scope = IP6_MULTICAST_SCOPE_link_local,
.ims_byte = IP6_MULTICAST_GROUP_ID_all_hosts,
.ims_len = 128,
},
{
.ims_len = 128,
.ims_scope = IP6_MULTICAST_SCOPE_link_local,
.ims_byte = IP6_MULTICAST_GROUP_ID_mldv2_routers,
}
}
Definition at line 65 of file ip6_mfib.c.
◆ ip6_show_fib_command
Initial value:= {
.path = "show ip6 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 * ip6_show_mfib(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (ip6_show_fib_command)
Definition at line 775 of file ip6_mfib.c.