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_lookup (const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp, u32 len) |
| The IPv4 Multicast-FIB. More...
|
|
fib_node_index_t | ip6_mfib_table_lookup2 (const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp) |
| Data-plane lookup function. More...
|
|
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) |
|
static int | 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_table_radix_walk (struct radix_node *rn, void *arg) |
|
void | ip6_mfib_table_walk (ip6_mfib_t *mfib, mfib_table_walk_fn_t fn, void *ctx) |
| 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) |
|
#define FOR_EACH_IP6_SPECIAL |
( |
|
_pfx, |
|
|
|
_body |
|
) |
| |
Value:{ \
_ii++) \
{ \
&(_pfx)->fp_grp_addr.ip6, 0); \
} \
else \
&(_pfx)->fp_grp_addr.ip6, \
_spec->ims_scope, \
_spec->ims_byte); \
} \
(_pfx)->fp_len = _spec->ims_len; \
do { _body; } while (0); \
} \
}
for(i=1;i<=collision_buckets;i++)
static const ip6_mfib_special_t ip6_mfib_specials[]
static void ip6_set_solicited_node_multicast_address(ip6_address_t *a, u32 id)
static void ip6_set_reserved_multicast_address(ip6_address_t *a, ip6_multicast_address_scope_t scope, u16 id)
Definition at line 126 of file ip6_mfib.c.
#define IP6_MFIB_KEY_LEN 33 |
The number of bytes in an address/ask key in the radix tree First byte is the length in bytes.
Definition at line 26 of file ip6_mfib.c.
#define IP6_MFIB_MK_KEY |
( |
|
_grp, |
|
|
|
_src, |
|
|
|
_key |
|
) |
| |
Value:{ \
(_key)->key[0] = 33; \
memcpy((_key)->key+1, _grp, 16); \
memcpy((_key)->key+17, _src, 16); \
}
Definition at line 328 of file ip6_mfib.c.
#define IP6_MFIB_MK_KEY_MASK |
( |
|
_grp, |
|
|
|
_src, |
|
|
|
_len, |
|
|
|
_key |
|
) |
| |
Value: \
(_key)->mask[0] = 33; \
if (_len <= 128) \
{ \
memset((_key)->mask+17, 0, 16); \
} \
else \
} \
}
#define IP6_MFIB_MK_KEY(_grp, _src, _key)
ip6_address_t fib_masks[129]
Definition at line 335 of file ip6_mfib.c.
An object that is inserted into the radix tree.
Since it's in the tree and has pointers, it cannot realloc and so cannot come from a vlib pool.
Enumerator |
---|
IP6_MFIB_SPECIAL_TYPE_NONE |
|
IP6_MFIB_SPECIAL_TYPE_SOLICITED |
|
Definition at line 61 of file ip6_mfib.c.
u8* format_ip6_mfib_table_memory |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
format (display) ipv6 MFIB mempry usage
Definition at line 476 of file ip6_mfib.c.
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 260 of file ip6_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 301 of file ip6_mfib.c.
u32 ip6_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 386 of file ip6_mfib.c.
Data-plane lookup function.
Definition at line 411 of file ip6_mfib.c.
static int ip6_mfib_table_radix_walk |
( |
struct radix_node * |
rn, |
|
|
void * |
arg |
|
) |
| |
|
static |
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 560 of file ip6_mfib.c.
Initial value:= {
.fp_src_addr = {
.ip6.as_u64 = {0, 0},
},
.fp_grp_addr = {
.ip6.as_u64 = {0, 0},
},
.fp_len = 0,
}
Definition at line 49 of file ip6_mfib.c.
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 87 of file ip6_mfib.c.
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 704 of file ip6_mfib.c.