FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
mfib_entry_src.h File Reference
+ Include dependency graph for mfib_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  mfib_path_ext_t_
 MFIB extensions to each path. More...
 
struct  mfib_entry_src_t_
 The source of an MFIB entry. More...
 
struct  mfib_entry_src_vft_t_
 Virtual function table provided by each_source. More...
 

Macros

#define MFIB_ENTRY_SRC_ATTRIBUTES
 
#define FOR_EACH_MFIB_SRC_ATTRIBUTE(_item)
 

Typedefs

typedef struct mfib_path_ext_t_ mfib_path_ext_t
 MFIB extensions to each path. More...
 
typedef enum mfib_entry_src_attribute_t_ mfib_entry_src_attribute_t
 Flags for the source data. More...
 
typedef enum mfib_entry_src_flag_t_ mfib_entry_src_flags_t
 
typedef struct mfib_entry_src_t_ mfib_entry_src_t
 The source of an MFIB entry. More...
 
typedef enum mfib_src_res_t_ mfib_src_res_t
 signals from the sources to the caller More...
 
typedef void(* mfib_entry_src_activiate_t) (mfib_entry_t *, mfib_entry_src_t *)
 A function provided by each source to be invoked when it is activated. More...
 
typedef void(* mfib_entry_src_deactiviate_t) (mfib_entry_t *, mfib_entry_src_t *)
 A function provided by each source to be invoked when it is deactivated. More...
 
typedef mfib_src_res_t(* mfib_entry_src_cover_change_t) (mfib_entry_t *, mfib_entry_src_t *)
 A function provided by each source to be invoked when the cover changes. More...
 
typedef mfib_src_res_t(* mfib_entry_src_cover_update_t) (mfib_entry_t *, mfib_entry_src_t *)
 A function provided by each source to be invoked when the cover is updated. More...
 
typedef struct mfib_entry_src_vft_t_ mfib_entry_src_vft
 Virtual function table provided by each_source. More...
 

Enumerations

enum  mfib_entry_src_attribute_t_ { MFIB_ENTRY_SRC_ATTRIBUTE_FIRST, MFIB_ENTRY_SRC_ATTRIBUTE_STALE = MFIB_ENTRY_SRC_ATTRIBUTE_FIRST, MFIB_ENTRY_SRC_ATTRIBUTE_LAST = MFIB_ENTRY_SRC_ATTRIBUTE_STALE }
 Flags for the source data. More...
 
enum  mfib_entry_src_flag_t_ { MFIB_ENTRY_SRC_FLAG_NONE = 0, MFIB_ENTRY_SRC_FLAG_STALE = (1 << MFIB_ENTRY_SRC_ATTRIBUTE_STALE) }
 
enum  mfib_src_res_t_ { MFIB_SRC_OK, MFIB_SRC_REEVALUATE }
 signals from the sources to the caller More...
 

Functions

u8format_mfib_entry_src_flags (u8 *s, va_list *args)
 
 STATIC_ASSERT (sizeof(mfib_entry_src_flags_t)<=2, "FIB entry flags field size too big")
 
void mfib_entry_src_register (mfib_source_t, const mfib_entry_src_vft *)
 
void mfib_entry_src_deactivate (mfib_entry_t *mfib_entry, mfib_entry_src_t *bsrc)
 
void mfib_entry_src_activate (mfib_entry_t *mfib_entry, mfib_entry_src_t *bsrc)
 
mfib_src_res_t mfib_entry_src_cover_change (mfib_entry_t *mfib_entry, mfib_entry_src_t *bsrc)
 
mfib_src_res_t mfib_entry_src_cover_update (mfib_entry_t *mfib_entry, mfib_entry_src_t *bsrc)
 
mfib_entry_src_tmfib_entry_get_best_src (const mfib_entry_t *mfib_entry)
 
void mfib_entry_src_module_init (void)
 
void mfib_entry_src_rr_module_init (void)
 

Macro Definition Documentation

◆ FOR_EACH_MFIB_SRC_ATTRIBUTE

#define FOR_EACH_MFIB_SRC_ATTRIBUTE (   _item)
Value:
_item++)

Definition at line 53 of file mfib_entry_src.h.

◆ MFIB_ENTRY_SRC_ATTRIBUTES

#define MFIB_ENTRY_SRC_ATTRIBUTES
Value:
{ \
}

Definition at line 49 of file mfib_entry_src.h.

Typedef Documentation

◆ mfib_entry_src_activiate_t

typedef void(* mfib_entry_src_activiate_t) (mfib_entry_t *, mfib_entry_src_t *)

A function provided by each source to be invoked when it is activated.

Definition at line 142 of file mfib_entry_src.h.

◆ mfib_entry_src_attribute_t

Flags for the source data.

◆ mfib_entry_src_cover_change_t

typedef mfib_src_res_t(* mfib_entry_src_cover_change_t) (mfib_entry_t *, mfib_entry_src_t *)

A function provided by each source to be invoked when the cover changes.

Definition at line 152 of file mfib_entry_src.h.

◆ mfib_entry_src_cover_update_t

typedef mfib_src_res_t(* mfib_entry_src_cover_update_t) (mfib_entry_t *, mfib_entry_src_t *)

A function provided by each source to be invoked when the cover is updated.

Definition at line 157 of file mfib_entry_src.h.

◆ mfib_entry_src_deactiviate_t

typedef void(* mfib_entry_src_deactiviate_t) (mfib_entry_t *, mfib_entry_src_t *)

A function provided by each source to be invoked when it is deactivated.

Definition at line 147 of file mfib_entry_src.h.

◆ mfib_entry_src_flags_t

◆ mfib_entry_src_t

The source of an MFIB entry.

◆ mfib_entry_src_vft

Virtual function table provided by each_source.

◆ mfib_path_ext_t

MFIB extensions to each path.

◆ mfib_src_res_t

signals from the sources to the caller

Enumeration Type Documentation

◆ mfib_entry_src_attribute_t_

Flags for the source data.

Enumerator
MFIB_ENTRY_SRC_ATTRIBUTE_FIRST 

Marker.

Add new values after this one.

MFIB_ENTRY_SRC_ATTRIBUTE_STALE 

the source has been added to the entry

MFIB_ENTRY_SRC_ATTRIBUTE_LAST 

Marker.

add new entries before this one.

Definition at line 33 of file mfib_entry_src.h.

◆ mfib_entry_src_flag_t_

Enumerator
MFIB_ENTRY_SRC_FLAG_NONE 
MFIB_ENTRY_SRC_FLAG_STALE 

Definition at line 58 of file mfib_entry_src.h.

◆ mfib_src_res_t_

signals from the sources to the caller

Enumerator
MFIB_SRC_OK 
MFIB_SRC_REEVALUATE 

Definition at line 133 of file mfib_entry_src.h.

Function Documentation

◆ format_mfib_entry_src_flags()

u8* format_mfib_entry_src_flags ( u8 s,
va_list *  args 
)

Definition at line 106 of file mfib_entry.c.

+ Here is the caller graph for this function:

◆ mfib_entry_get_best_src()

mfib_entry_src_t* mfib_entry_get_best_src ( const mfib_entry_t mfib_entry)

Definition at line 318 of file mfib_entry.c.

+ Here is the caller graph for this function:

◆ mfib_entry_src_activate()

void mfib_entry_src_activate ( mfib_entry_t mfib_entry,
mfib_entry_src_t bsrc 
)

Definition at line 63 of file mfib_entry_src.c.

+ Here is the caller graph for this function:

◆ mfib_entry_src_cover_change()

mfib_src_res_t mfib_entry_src_cover_change ( mfib_entry_t mfib_entry,
mfib_entry_src_t bsrc 
)

Definition at line 71 of file mfib_entry_src.c.

+ Here is the caller graph for this function:

◆ mfib_entry_src_cover_update()

mfib_src_res_t mfib_entry_src_cover_update ( mfib_entry_t mfib_entry,
mfib_entry_src_t bsrc 
)

Definition at line 78 of file mfib_entry_src.c.

+ Here is the caller graph for this function:

◆ mfib_entry_src_deactivate()

void mfib_entry_src_deactivate ( mfib_entry_t mfib_entry,
mfib_entry_src_t bsrc 
)

Definition at line 55 of file mfib_entry_src.c.

+ Here is the caller graph for this function:

◆ mfib_entry_src_module_init()

void mfib_entry_src_module_init ( void  )

Definition at line 85 of file mfib_entry_src.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mfib_entry_src_register()

void mfib_entry_src_register ( mfib_source_t  ,
const mfib_entry_src_vft  
)

Definition at line 48 of file mfib_entry_src.c.

+ Here is the caller graph for this function:

◆ mfib_entry_src_rr_module_init()

void mfib_entry_src_rr_module_init ( void  )

Definition at line 102 of file mfib_entry_src_rr.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( sizeof(mfib_entry_src_flags_t)<=  2,
"FIB entry flags field size too big"   
)
MFIB_ENTRY_SRC_ATTRIBUTE_FIRST
@ MFIB_ENTRY_SRC_ATTRIBUTE_FIRST
Marker.
Definition: mfib_entry_src.h:37
MFIB_ENTRY_SRC_ATTRIBUTE_STALE
@ MFIB_ENTRY_SRC_ATTRIBUTE_STALE
the source has been added to the entry
Definition: mfib_entry_src.h:41
MFIB_ENTRY_SRC_ATTRIBUTE_LAST
@ MFIB_ENTRY_SRC_ATTRIBUTE_LAST
Marker.
Definition: mfib_entry_src.h:45