FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
fib_entry_src.h File Reference
+ Include dependency graph for fib_entry_src.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fib_entry_src_cover_res_t_
 Result from a cover update/change. More...
 
struct  fib_entry_src_vft_t_
 Virtual function table each FIB entry source will register. More...
 

Macros

#define FIB_ENTRY_DBG(_e, _fmt, _args...)
 Debug macro. More...
 
#define FOR_EACH_SRC_ADDED(_entry, _src, _source, action)
 

Typedefs

typedef void(* fib_entry_src_init_t) (fib_entry_src_t *src)
 Source initialisation Function. More...
 
typedef void(* fib_entry_src_deinit_t) (fib_entry_src_t *src)
 Source deinitialisation Function. More...
 
typedef int(* fib_entry_src_activate_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)
 Source activation. More...
 
typedef void(* fib_entry_src_deactivate_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)
 Source Deactivate. More...
 
typedef void(* fib_entry_src_add_t) (fib_entry_src_t *src, const fib_entry_t *entry, fib_entry_flag_t flags, dpo_proto_t proto, const dpo_id_t *dpo)
 Source Add. More...
 
typedef void(* fib_entry_src_remove_t) (fib_entry_src_t *src)
 Source Remove. More...
 
typedef struct fib_entry_src_cover_res_t_ fib_entry_src_cover_res_t
 Result from a cover update/change. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef void(* fib_entry_src_installed_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)
 Installed. More...
 
typedef u8 *(* fib_entry_src_format_t) (fib_entry_src_t *src, u8 *s)
 format. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef 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. More...
 
typedef const void *(* fib_entry_src_get_data_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)
 Get source specific opaque data. More...
 
typedef struct fib_entry_src_vft_t_ fib_entry_src_vft_t
 Virtual function table each FIB entry source will register. More...
 

Functions

u8fib_entry_src_format (fib_entry_t *entry, fib_source_t source, u8 *s)
 
void fib_entry_src_register (fib_source_t source, const fib_entry_src_vft_t *vft)
 
void fib_entry_src_action_init (fib_entry_t *entry, fib_source_t source)
 
void fib_entry_src_action_deinit (fib_entry_t *fib_entry, fib_source_t source)
 
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_action_cover_update (fib_entry_t *fib_entry, fib_source_t source)
 
void fib_entry_src_action_activate (fib_entry_t *fib_entry, fib_source_t source)
 
void fib_entry_src_action_deactivate (fib_entry_t *fib_entry, fib_source_t source)
 
void fib_entry_src_action_reactivate (fib_entry_t *fib_entry, fib_source_t source)
 
fib_entry_tfib_entry_src_action_add (fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
fib_entry_tfib_entry_src_action_update (fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
 
fib_entry_src_flag_t fib_entry_src_action_remove (fib_entry_t *fib_entry, fib_source_t source)
 
void fib_entry_src_action_install (fib_entry_t *fib_entry, fib_source_t source)
 
void fib_entry_src_action_uninstall (fib_entry_t *fib_entry)
 
fib_entry_tfib_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)
 
fib_entry_tfib_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)
 
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)
 
void fib_entry_src_action_installed (const fib_entry_t *fib_entry, fib_source_t source)
 
fib_forward_chain_type_t fib_entry_get_default_chain_type (const fib_entry_t *fib_entry)
 
fib_entry_flag_t fib_entry_get_flags_i (const fib_entry_t *fib_entry)
 
fib_path_list_flags_t fib_entry_src_flags_2_path_list_flags (fib_entry_flag_t eflags)
 
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. More...
 
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)
 
fib_protocol_t fib_entry_get_proto (const fib_entry_t *fib_entry)
 
dpo_proto_t fib_entry_get_dpo_proto (const fib_entry_t *fib_entry)
 
void fib_entry_src_default_register (void)
 
void fib_entry_src_rr_register (void)
 
void fib_entry_src_interface_register (void)
 
void fib_entry_src_default_route_register (void)
 
void fib_entry_src_special_register (void)
 
void fib_entry_src_api_register (void)
 
void fib_entry_src_adj_register (void)
 
void fib_entry_src_mpls_register (void)
 
void fib_entry_src_lisp_register (void)
 
void fib_entry_src_module_init (void)
 

Macro Definition Documentation

#define FIB_ENTRY_DBG (   _e,
  _fmt,
  _args... 
)

Debug macro.

Definition at line 42 of file fib_entry_src.h.

#define FOR_EACH_SRC_ADDED (   _entry,
  _src,
  _source,
  action 
)
Value:
{ \
vec_foreach(_src, _entry->fe_srcs) \
{ \
if (_src->fes_flags & FIB_ENTRY_SRC_FLAG_ADDED) { \
_source = _src->fes_src; \
do { \
action; \
} while(0); \
} \
} \
}
Definition: fib_entry.h:270
#define vec_foreach(var, vec)
Vector iterator.

Definition at line 190 of file fib_entry_src.h.

Typedef Documentation

typedef int(* fib_entry_src_activate_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)

Source activation.

Called when the source is the new best source on the entry. Return non-zero if the entry can now install, 0 otherwise

Definition at line 59 of file fib_entry_src.h.

typedef void(* fib_entry_src_add_t) (fib_entry_src_t *src, const fib_entry_t *entry, fib_entry_flag_t flags, dpo_proto_t proto, const dpo_id_t *dpo)

Source Add.

Called when the source is added to the entry

Definition at line 73 of file fib_entry_src.h.

typedef 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.

the source should re-evaluate its cover.

Definition at line 95 of file fib_entry_src.h.

Result from a cover update/change.

typedef 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.

The cover the source has, has updated (i.e. its forwarding) the source may need to re-evaluate.

Definition at line 103 of file fib_entry_src.h.

typedef void(* fib_entry_src_deactivate_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)

Source Deactivate.

Called when the source is no longer best source on the entry

Definition at line 66 of file fib_entry_src.h.

typedef void(* fib_entry_src_deinit_t) (fib_entry_src_t *src)

Source deinitialisation Function.

Definition at line 53 of file fib_entry_src.h.

typedef u8*(* fib_entry_src_format_t) (fib_entry_src_t *src, u8 *s)

format.

Definition at line 126 of file fib_entry_src.h.

typedef 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.

Notification that the forwarding information for the entry has been updated. This notification is sent to all sources, not just the active best.

Definition at line 112 of file fib_entry_src.h.

typedef const void*(* fib_entry_src_get_data_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)

Get source specific opaque data.

Definition at line 165 of file fib_entry_src.h.

typedef void(* fib_entry_src_init_t) (fib_entry_src_t *src)

Source initialisation Function.

Definition at line 48 of file fib_entry_src.h.

typedef void(* fib_entry_src_installed_t) (fib_entry_src_t *src, const fib_entry_t *fib_entry)

Installed.

Notification that the source is now installed as the entry's forwarding source.

Definition at line 120 of file fib_entry_src.h.

typedef 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.

Definition at line 133 of file fib_entry_src.h.

typedef 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.

Definition at line 142 of file fib_entry_src.h.

typedef 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.

Definition at line 150 of file fib_entry_src.h.

typedef void(* fib_entry_src_remove_t) (fib_entry_src_t *src)

Source Remove.

Definition at line 82 of file fib_entry_src.h.

typedef 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.

Definition at line 158 of file fib_entry_src.h.

Virtual function table each FIB entry source will register.

Function Documentation

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.

Definition at line 226 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_forward_chain_type_t fib_entry_get_default_chain_type ( const fib_entry_t fib_entry)

Definition at line 74 of file fib_entry.c.

dpo_proto_t fib_entry_get_dpo_proto ( const fib_entry_t fib_entry)

Definition at line 68 of file fib_entry.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_flag_t fib_entry_get_flags_i ( const fib_entry_t fib_entry)

Definition at line 1354 of file fib_entry_src.c.

+ Here is the caller graph for this function:

fib_protocol_t fib_entry_get_proto ( const fib_entry_t fib_entry)

Definition at line 62 of file fib_entry.c.

+ Here is the caller graph for this function:

void fib_entry_src_action_activate ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 639 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 826 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_cover_res_t fib_entry_src_action_cover_change ( fib_entry_t entry,
fib_source_t  source 
)

Definition at line 148 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_cover_res_t fib_entry_src_action_cover_update ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 166 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_deactivate ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 693 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_deinit ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 127 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_init ( fib_entry_t entry,
fib_source_t  source 
)

Definition at line 49 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_install ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 556 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_installed ( const fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 801 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 1081 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 1196 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 1139 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_reactivate ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 746 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_entry_src_flag_t fib_entry_src_action_remove ( fib_entry_t fib_entry,
fib_source_t  source 
)

Definition at line 927 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_action_uninstall ( fib_entry_t fib_entry)

Definition at line 609 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 885 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_adj_register ( void  )

Definition at line 378 of file fib_entry_src_adj.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_api_register ( void  )

Definition at line 163 of file fib_entry_src_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_default_register ( void  )

Definition at line 114 of file fib_entry_src_default.c.

+ Here is the call graph for this function:

void fib_entry_src_default_route_register ( void  )

Definition at line 53 of file fib_entry_src_default_route.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fib_path_list_flags_t fib_entry_src_flags_2_path_list_flags ( fib_entry_flag_t  eflags)

Definition at line 1024 of file fib_entry_src.c.

+ Here is the caller graph for this function:

u8* fib_entry_src_format ( fib_entry_t entry,
fib_source_t  source,
u8 s 
)

Definition at line 1244 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_interface_register ( void  )

Definition at line 213 of file fib_entry_src_interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_lisp_register ( void  )

Definition at line 130 of file fib_entry_src_lisp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 418 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_module_init ( void  )

Definition at line 1413 of file fib_entry_src.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_mpls_register ( void  )

Definition at line 194 of file fib_entry_src_mpls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_register ( fib_source_t  source,
const fib_entry_src_vft_t vft 
)

Definition at line 33 of file fib_entry_src.c.

+ Here is the caller graph for this function:

void fib_entry_src_rr_register ( void  )

Definition at line 296 of file fib_entry_src_rr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fib_entry_src_special_register ( void  )

Definition at line 63 of file fib_entry_src_special.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: