FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
fib_source.c File Reference
+ Include dependency graph for fib_source.c:

Go to the source code of this file.

Data Structures

struct  fib_source_prio_t_
 
struct  fib_source_reg_t_
 

Typedefs

typedef struct fib_source_prio_t_ fib_source_prio_t
 
typedef struct fib_source_reg_t_ fib_source_reg_t
 

Functions

 STATIC_ASSERT_SIZEOF (fib_source_priority_t, 1)
 for each client requested priority count the number pf uses of that prio so we can asign is usage a slot number, and therefore each request will have a unique value. More...
 
u16 fib_source_get_prio (fib_source_t src)
 
fib_source_behaviour_t fib_source_get_behaviour (fib_source_t src)
 
u8format_fib_source (u8 *s, va_list *a)
 
fib_source_priority_cmp_t fib_source_cmp (fib_source_t s1, fib_source_t s2)
 
static void fib_source_reg_init (fib_source_t src, const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
 
fib_source_t fib_source_allocate (const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
 
void fib_source_register (fib_source_t src, fib_source_priority_t prio, fib_source_behaviour_t bh)
 
static u8format_fib_source_reg (u8 *s, va_list *a)
 
static int fib_source_reg_cmp_for_sort (void *v1, void *v2)
 
void fib_source_walk (fib_source_walk_t fn, void *ctx)
 
static clib_error_tfib_source_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void fib_source_module_init (void)
 

Variables

static const char * fib_source_names [] = FIB_SOURCES
 
static const char * fib_source_behaviour_names [] = FIB_SOURCE_BEHAVIOURS
 
static fib_source_t fib_source_id = FIB_SOURCE_LAST+1
 
static fib_source_priority_t fib_source_prio_by_class [0x100]
 
static fib_source_reg_tfib_source_regs
 
static vlib_cli_command_t show_fib_sources
 (constructor) VLIB_CLI_COMMAND (show_fib_sources) More...
 

Typedef Documentation

◆ fib_source_prio_t

◆ fib_source_reg_t

Function Documentation

◆ fib_source_allocate()

fib_source_t fib_source_allocate ( const char *  name,
fib_source_priority_t  prio,
fib_source_behaviour_t  bh 
)

Definition at line 118 of file fib_source.c.

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

◆ fib_source_cmp()

fib_source_priority_cmp_t fib_source_cmp ( fib_source_t  s1,
fib_source_t  s2 
)

Definition at line 76 of file fib_source.c.

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

◆ fib_source_get_behaviour()

fib_source_behaviour_t fib_source_get_behaviour ( fib_source_t  src)

Definition at line 58 of file fib_source.c.

+ Here is the caller graph for this function:

◆ fib_source_get_prio()

u16 fib_source_get_prio ( fib_source_t  src)

Definition at line 49 of file fib_source.c.

+ Here is the caller graph for this function:

◆ fib_source_module_init()

void fib_source_module_init ( void  )

Definition at line 217 of file fib_source.c.

+ Here is the caller graph for this function:

◆ fib_source_reg_cmp_for_sort()

static int fib_source_reg_cmp_for_sort ( void *  v1,
void *  v2 
)
static

Definition at line 159 of file fib_source.c.

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

◆ fib_source_reg_init()

static void fib_source_reg_init ( fib_source_t  src,
const char *  name,
fib_source_priority_t  prio,
fib_source_behaviour_t  bh 
)
static

Definition at line 93 of file fib_source.c.

+ Here is the caller graph for this function:

◆ fib_source_register()

void fib_source_register ( fib_source_t  src,
fib_source_priority_t  prio,
fib_source_behaviour_t  bh 
)

Definition at line 137 of file fib_source.c.

+ Here is the call graph for this function:

◆ fib_source_show()

static clib_error_t* fib_source_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 186 of file fib_source.c.

+ Here is the call graph for this function:

◆ fib_source_walk()

void fib_source_walk ( fib_source_walk_t  fn,
void *  ctx 
)

Definition at line 169 of file fib_source.c.

◆ format_fib_source()

u8* format_fib_source ( u8 s,
va_list *  a 
)

Definition at line 66 of file fib_source.c.

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

◆ format_fib_source_reg()

static u8* format_fib_source_reg ( u8 s,
va_list *  a 
)
static

Definition at line 145 of file fib_source.c.

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

◆ STATIC_ASSERT_SIZEOF()

STATIC_ASSERT_SIZEOF ( fib_source_priority_t  ,
 
)

for each client requested priority count the number pf uses of that prio so we can asign is usage a slot number, and therefore each request will have a unique value.

Variable Documentation

◆ fib_source_behaviour_names

const char* fib_source_behaviour_names[] = FIB_SOURCE_BEHAVIOURS
static

Definition at line 19 of file fib_source.c.

◆ fib_source_id

fib_source_t fib_source_id = FIB_SOURCE_LAST+1
static

Definition at line 21 of file fib_source.c.

◆ fib_source_names

const char* fib_source_names[] = FIB_SOURCES
static

Definition at line 18 of file fib_source.c.

◆ fib_source_prio_by_class

fib_source_priority_t fib_source_prio_by_class[0x100]
static

Definition at line 35 of file fib_source.c.

◆ fib_source_regs

fib_source_reg_t* fib_source_regs
static

Definition at line 45 of file fib_source.c.

◆ show_fib_sources

vlib_cli_command_t show_fib_sources
static
Initial value:
= {
.path = "show fib source",
.function = fib_source_show,
.short_help = "show fib source [prio]",
}
static clib_error_t * fib_source_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: fib_source.c:186

(constructor) VLIB_CLI_COMMAND (show_fib_sources)

Definition at line 209 of file fib_source.c.