FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ip4_fib.c File Reference
+ Include dependency graph for ip4_fib.c:

Go to the source code of this file.

Data Structures

struct  ip4_fib_table_special_prefix_t_
 
struct  ip4_fib_show_walk_ctx_t_
 Walk show context. More...
 

Typedefs

typedef struct ip4_fib_table_special_prefix_t_ ip4_fib_table_special_prefix_t
 
typedef struct ip4_fib_show_walk_ctx_t_ ip4_fib_show_walk_ctx_t
 Walk show context. More...
 

Functions

void ip4_fib_hash_load_specials (u32 fib_index)
 
void ip4_fib_hash_flush_specials (u32 fib_index)
 
static u32 ip4_create_fib_with_table_id (u32 table_id, fib_source_t src)
 
void ip4_fib_table_destroy (u32 fib_index)
 
u32 ip4_fib_table_find_or_create_and_lock (u32 table_id, fib_source_t src)
 Get or create an IPv4 fib. More...
 
u32 ip4_fib_table_create_and_lock (fib_source_t src)
 
u32 ip4_fib_table_get_index_for_sw_if_index (u32 sw_if_index)
 
static fib_table_walk_rc_t ip4_fib_show_walk_cb (fib_node_index_t fib_entry_index, void *arg)
 
static void ip4_fib_table_show_all (ip4_fib_t *fib, vlib_main_t *vm)
 
static void ip4_fib_table_show_one (ip4_fib_t *fib, vlib_main_t *vm, ip4_address_t *address, u32 mask_len, int detail)
 
u8format_ip4_fib_table_memory (u8 *s, va_list *args)
 
static clib_error_tip4_show_fib (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static const ip4_fib_table_special_prefix_t ip4_specials []
 
static vlib_cli_command_t ip4_show_fib_command
 (constructor) VLIB_CLI_COMMAND (ip4_show_fib_command) More...
 

Typedef Documentation

◆ ip4_fib_show_walk_ctx_t

Walk show context.

◆ ip4_fib_table_special_prefix_t

Function Documentation

◆ format_ip4_fib_table_memory()

u8* format_ip4_fib_table_memory ( u8 s,
va_list *  args 
)

Definition at line 322 of file ip4_fib.c.

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

◆ ip4_create_fib_with_table_id()

static u32 ip4_create_fib_with_table_id ( u32  table_id,
fib_source_t  src 
)
static

Definition at line 147 of file ip4_fib.c.

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

◆ ip4_fib_hash_flush_specials()

void ip4_fib_hash_flush_specials ( u32  fib_index)

Definition at line 125 of file ip4_fib.c.

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

◆ ip4_fib_hash_load_specials()

void ip4_fib_hash_load_specials ( u32  fib_index)

Definition at line 103 of file ip4_fib.c.

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

◆ ip4_fib_show_walk_cb()

static fib_table_walk_rc_t ip4_fib_show_walk_cb ( fib_node_index_t  fib_entry_index,
void *  arg 
)
static

Definition at line 272 of file ip4_fib.c.

+ Here is the caller graph for this function:

◆ ip4_fib_table_create_and_lock()

u32 ip4_fib_table_create_and_lock ( fib_source_t  src)

Definition at line 243 of file ip4_fib.c.

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

◆ ip4_fib_table_destroy()

void ip4_fib_table_destroy ( u32  fib_index)

Definition at line 189 of file ip4_fib.c.

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

◆ ip4_fib_table_find_or_create_and_lock()

u32 ip4_fib_table_find_or_create_and_lock ( u32  table_id,
fib_source_t  src 
)

Get or create an IPv4 fib.

Get or create an IPv4 fib with the provided table ID.

Parameters
table_idWhen set to ~0, an arbitrary and unused fib ID is picked and can be retrieved with ret->table_id. Otherwise, the fib ID to be used to retrieve or create the desired fib.
Returns
A pointer to the retrieved or created fib.

Definition at line 228 of file ip4_fib.c.

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

◆ ip4_fib_table_get_index_for_sw_if_index()

u32 ip4_fib_table_get_index_for_sw_if_index ( u32  sw_if_index)

Definition at line 249 of file ip4_fib.c.

◆ ip4_fib_table_show_all()

static void ip4_fib_table_show_all ( ip4_fib_t fib,
vlib_main_t vm 
)
static

Definition at line 283 of file ip4_fib.c.

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

◆ ip4_fib_table_show_one()

static void ip4_fib_table_show_one ( ip4_fib_t fib,
vlib_main_t vm,
ip4_address_t address,
u32  mask_len,
int  detail 
)
static

Definition at line 307 of file ip4_fib.c.

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

◆ ip4_show_fib()

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

Definition at line 331 of file ip4_fib.c.

+ Here is the call graph for this function:

Variable Documentation

◆ ip4_show_fib_command

vlib_cli_command_t ip4_show_fib_command
static
Initial value:
= {
.path = "show ip fib",
.short_help = "show ip fib [summary] [table <table-id>] [index <fib-id>] [<ip4-addr>[/<mask>]] [mtrie] [detail]",
.function = ip4_show_fib,
}

(constructor) VLIB_CLI_COMMAND (ip4_show_fib_command)

Definition at line 624 of file ip4_fib.c.

◆ ip4_specials

const ip4_fib_table_special_prefix_t ip4_specials[]
static

Definition at line 29 of file ip4_fib.c.

ip4_show_fib
static clib_error_t * ip4_show_fib(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_fib.c:331