31 return (fed - fib_entry_delegate_pool);
84 pool_put(fib_entry_delegate_pool, fed);
92 index_t *fedi1 = v1, *fedi2 = v2;
125 if (NULL == delegate)
200 s =
format(s,
"%U-chain\n %U",
215 s =
format(s,
"covered:[");
301 fedi = va_arg (*args,
index_t);
348 .path =
"show fib entry-delegate",
350 .short_help =
"show fib entry delegate",
Contribute an object that is to be used to forward BIER packets.
Contribute an object that is to be used to forward IP6 packets.
Contribute an object that is to be used to forward IP6 packets.
#define pool_foreach_index(i, v)
static u8 * fib_entry_delegate_fmt_bfd(const fib_entry_delegate_t *fed, u8 *s)
Print a delegate that represents BFD tracking.
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
fib_node_index_t fd_index
Valid for the attached import cases.
enum fib_entry_delegate_type_t_ fib_entry_delegate_type_t
Delegate types.
static u8 * fib_entry_delegate_fmt_import(const fib_entry_delegate_t *fed, u8 *s)
Print a delegate that represents attached-import tracking.
fib_bfd_state_t fd_bfd_state
BFD state.
fib_entry_delegate_t * fib_entry_delegate_find(const fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Contribute an object that is to be used to forward IP4 packets.
static void fib_entry_delegate_init(fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
dpo_id_t fd_dpo
Valid for the forwarding chain delegates.
fib_node_index_t fd_entry_index
The FIB entry object to which the delagate is attached.
fib_entry_delegate_t * fib_entry_delegate_get(index_t fedi)
void fib_entry_delegate_remove(fib_entry_t *fib_entry, fib_entry_delegate_type_t type)
u8 * fib_ae_export_format(fib_node_index_t expi, u8 *s)
description fragment has unexpected format
static int fib_entry_delegate_cmp_for_sort(void *v1, void *v2)
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
static fib_entry_delegate_t * fib_entry_delegate_pool
static u8 * fib_entry_delegate_fmt_covered(const fib_entry_delegate_t *fed, u8 *s)
Print a delegate that represents cover tracking.
Contribute an object that is to be used to forward Ethernet packets.
fib_node_list_t fd_list
For the cover tracking.
static u8 * fib_entry_delegate_fmt_fwd_chain(const fib_entry_delegate_t *fed, u8 *s)
Print a delegate that represents a forwarding chain.
fib_entry_delegate_track_t fd_track
tracker state
fib_entry_delegate_type_t fd_type
The delagate type.
Attached import/export functionality.
vl_api_fib_path_type_t type
Contribute an object that is to be used to forward end-of-stack MPLS packets.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static u8 * fib_entry_delegate_fmt_track(const fib_entry_delegate_t *fed, u8 *s)
Print a delegate that represents tracking.
index_t * fe_delegates
A vector of delegate indices.
#define pool_put(P, E)
Free an object E in pool P.
#define vec_del1(v, i)
Delete the element at index I.
fib_node_list_t fn_children
Vector of nodes that depend upon/use/share this node.
fib_entry_delegate_type_t fib_entry_chain_type_to_delegate_type(fib_forward_chain_type_t fct)
u8 * fib_ae_import_format(fib_node_index_t impi, u8 *s)
Contribute an object that is to be used to forward NSH packets.
u32 fib_node_index_t
A typedef of a node index.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
fib_forward_chain_type_t fib_entry_delegate_type_to_chain_type(fib_entry_delegate_type_t fdt)
#define VLIB_CLI_COMMAND(x,...)
Forwarding chain types: for the vast majority of FIB entries only one chain is required - the one tha...
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
u8 * format_fib_forw_chain_type(u8 *s, va_list *args)
static clib_error_t * show_fib_entry_delegate_command(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
fib_node_index_t fib_entry_delegate_get_index(const fib_entry_delegate_t *fed)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
#define vec_foreach(var, vec)
Vector iterator.
static fib_entry_delegate_t * fib_entry_delegate_find_i(const fib_entry_t *fib_entry, fib_entry_delegate_type_t type, u32 *index)
Contribute an object that is to be used to forward non-end-of-stack MPLS packets. ...
Dependency list of covered entries.
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
static fib_entry_delegate_format_t fed_formatters[]
A delegate type to formatter map.
u8 * fib_node_children_format(fib_node_list_t list, u8 *s)
u8 * format_fib_entry_delegate(u8 *s, va_list *args)
Contribute an object that is to be used to forward IP4 packets.
fib_entry_delegate_t * fib_entry_delegate_find_or_add(fib_entry_t *fib_entry, fib_entry_delegate_type_t fdt)
u8 *(* fib_entry_delegate_format_t)(const fib_entry_delegate_t *fed, u8 *s)
typedef for printing a delegate
static u8 * fib_entry_delegate_fmt_export(const fib_entry_delegate_t *fed, u8 *s)
Print a delegate that represents attached-export tracking.