16 #ifndef __FIB_ENTRY_SRC_H__ 17 #define __FIB_ENTRY_SRC_H__ 27 #define FIB_ENTRY_DBG(_e, _fmt, _args...) \ 30 __tmp = format(__tmp, "e:[%d:%U", \ 31 fib_entry_get_index(_e), \ 32 format_ip46_address, \ 33 &_e->fe_prefix.fp_addr, \ 35 __tmp = format(__tmp, "/%d]:", \ 36 _e->fe_prefix.fp_len); \ 37 __tmp = format(__tmp, _fmt, ##_args); \ 38 clib_warning("%s", __tmp); \ 42 #define FIB_ENTRY_DBG(_e, _fmt, _args...) 190 #define FOR_EACH_SRC_ADDED(_entry, _src, _source, action) \ 192 vec_foreach(_src, _entry->fe_srcs) \ 194 if (_src->fes_flags & FIB_ENTRY_SRC_FLAG_ADDED) { \ 195 _source = _src->fes_src; \ int(* fib_entry_src_activate_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Source activation.
void(* fib_entry_src_path_add_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_path_list_flags_t pl_flags, const fib_route_path_t *path)
Source path add the source is adding a new path.
void fib_entry_src_action_install(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_src_init_t fesv_init
void(* fib_entry_src_deinit_t)(fib_entry_src_t *src)
Source deinitialisation Function.
void(* fib_entry_src_path_remove_t)(fib_entry_src_t *src, fib_path_list_flags_t pl_flags, const fib_route_path_t *path)
Source path remove the source is remoinvg a path.
fib_entry_src_set_data_t fesv_set_data
fib_node_bw_reason_flag_t bw_reason
A representation of a path as described by a route producer.
Virtual function table each FIB entry source will register.
Information related to the source of a FIB entry.
fib_entry_src_cover_res_t fib_entry_src_action_cover_change(fib_entry_t *entry, fib_source_t source)
fib_entry_src_cover_res_t(* fib_entry_src_cover_update_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Cover updated.
void fib_entry_src_action_installed(const fib_entry_t *fib_entry, fib_source_t source)
void fib_entry_src_action_init(fib_entry_t *entry, fib_source_t source)
Result from a cover update/change.
void fib_entry_src_action_deactivate(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_t * fib_entry_src_action_add(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
void fib_entry_src_mpls_register(void)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void fib_entry_src_adj_register(void)
void fib_entry_src_mk_lb(fib_entry_t *fib_entry, const fib_entry_src_t *esrc, fib_forward_chain_type_t fct, dpo_id_t *dpo_lb)
void fib_entry_src_lisp_register(void)
fib_entry_flag_t fib_entry_get_flags_i(const fib_entry_t *fib_entry)
fib_entry_src_cover_update_t fesv_cover_update
void(* fib_entry_src_init_t)(fib_entry_src_t *src)
Source initialisation Function.
fib_entry_src_cover_change_t fesv_cover_change
void(* fib_entry_src_remove_t)(fib_entry_src_t *src)
Source Remove.
u8 *(* fib_entry_src_format_t)(fib_entry_src_t *src, u8 *s)
format.
fib_entry_src_path_add_t fesv_path_add
const void *(* fib_entry_src_get_data_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Get source specific opaque data.
void(* fib_entry_src_installed_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Installed.
fib_entry_src_get_data_t fesv_get_data
void fib_entry_src_api_register(void)
fib_entry_t * fib_entry_src_action_path_add(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *path)
void fib_entry_src_action_uninstall(fib_entry_t *fib_entry)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
void(* fib_entry_src_deactivate_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Source Deactivate.
void fib_entry_src_default_route_register(void)
fib_entry_src_flag_t fib_entry_src_action_remove(fib_entry_t *fib_entry, fib_source_t source)
enum fib_source_t_ fib_source_t
The different sources that can create a route.
fib_entry_src_fwd_update_t fesv_fwd_update
fib_entry_src_deinit_t fesv_deinit
fib_entry_src_format_t fesv_format
fib_entry_src_cover_res_t(* fib_entry_src_cover_change_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry)
Cover changed.
void fib_entry_src_default_register(void)
enum fib_node_bw_reason_flag_t_ fib_node_bw_reason_flag_t
Flags enum constructed from the reaons.
void fib_entry_src_register(fib_source_t source, const fib_entry_src_vft_t *vft)
fib_entry_t * fib_entry_src_action_update(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
void fib_entry_src_rr_register(void)
fib_entry_src_remove_t fesv_remove
fib_entry_src_deactivate_t fesv_deactivate
void(* fib_entry_src_add_t)(fib_entry_src_t *src, const fib_entry_t *entry, fib_entry_flag_t flags, fib_protocol_t proto, const dpo_id_t *dpo)
Source Add.
void fib_entry_src_action_activate(fib_entry_t *fib_entry, fib_source_t source)
struct fib_entry_src_vft_t_ fib_entry_src_vft_t
Virtual function table each FIB entry source will register.
void fib_entry_src_interface_register(void)
enum fib_entry_flag_t_ fib_entry_flag_t
void fib_entry_src_module_init(void)
void fib_entry_src_special_register(void)
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
void(* fib_entry_src_set_data_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, const void *data)
Set source specific opaque data.
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
fib_entry_src_path_remove_t fesv_path_remove
fib_entry_src_path_swap_t fesv_path_swap
u8 * fib_entry_src_format(fib_entry_t *entry, fib_source_t source, u8 *s)
fib_entry_src_flag_t fib_entry_src_action_path_remove(fib_entry_t *fib_entry, fib_source_t source, const fib_route_path_t *path)
fib_entry_src_cover_res_t fib_entry_src_action_cover_update(fib_entry_t *fib_entry, fib_source_t source)
void fib_entry_src_action_deinit(fib_entry_t *fib_entry, fib_source_t source)
fib_forward_chain_type_t fib_entry_chain_type_fixup(const fib_entry_t *entry, fib_forward_chain_type_t fct)
Turn the chain type requested by the client into the one they really wanted.
fib_path_list_flags_t fib_entry_src_flags_2_path_list_flags(fib_entry_flag_t eflags)
fib_entry_src_activate_t fesv_activate
fib_entry_t * fib_entry_src_action_path_swap(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *path)
struct fib_entry_src_cover_res_t_ fib_entry_src_cover_res_t
Result from a cover update/change.
fib_entry_src_add_t fesv_add
void(* fib_entry_src_fwd_update_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_source_t best_source)
Forwarding updated.
enum fib_path_list_flags_t_ fib_path_list_flags_t
void fib_entry_src_action_reactivate(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_src_installed_t fesv_installed
void(* fib_entry_src_path_swap_t)(fib_entry_src_t *src, const fib_entry_t *fib_entry, fib_path_list_flags_t pl_flags, const fib_route_path_t *path)
Source path replace/swap the source is providing a new set of paths.
fib_forward_chain_type_t fib_entry_get_default_chain_type(const fib_entry_t *fib_entry)