FD.io VPP  v21.01.1
Vector Packet Processing
gbp_subnet.c File Reference
+ Include dependency graph for gbp_subnet.c:

Go to the source code of this file.

Data Structures

struct  gbp_subnet_key_t_
 a key for the DB More...
 
struct  gbp_subnet_t_
 Subnet. More...
 

Typedefs

typedef struct gbp_subnet_key_t_ gbp_subnet_key_t
 a key for the DB More...
 
typedef struct gbp_subnet_t_ gbp_subnet_t
 Subnet. More...
 
typedef enum gsb_subnet_show_flags_t_ gsb_subnet_show_flags_t
 

Enumerations

enum  gsb_subnet_show_flags_t_ { GBP_SUBNET_SHOW_BRIEF, GBP_SUBNET_SHOW_DETAILS }
 

Functions

static index_t gbp_subnet_db_find (u32 fib_index, const fib_prefix_t *pfx)
 
static void gbp_subnet_db_add (u32 fib_index, const fib_prefix_t *pfx, gbp_subnet_t *gs)
 
static void gbp_subnet_db_del (gbp_subnet_t *gs)
 
static int gbp_subnet_transport_add (gbp_subnet_t *gs)
 
static int gbp_subnet_internal_add (gbp_subnet_t *gs)
 
static int gbp_subnet_external_add (gbp_subnet_t *gs, u32 sw_if_index, sclass_t sclass)
 
static int gbp_subnet_l3_out_add (gbp_subnet_t *gs, sclass_t sclass, int is_anon)
 
static void gbp_subnet_del_i (index_t gsi)
 
int gbp_subnet_del (u32 rd_id, const fib_prefix_t *pfx)
 
int gbp_subnet_add (u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, sclass_t sclass)
 
static clib_error_tgbp_subnet_add_del_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void gbp_subnet_walk (gbp_subnet_cb_t cb, void *ctx)
 
static u8format_gbp_subnet_type (u8 *s, va_list *args)
 
u8format_gbp_subnet (u8 *s, va_list *args)
 
static clib_error_tgbp_subnet_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tgbp_subnet_init (vlib_main_t *vm)
 

Variables

uwordgbp_subnet_db
 A DB of the subnets; key={pfx,fib-index}. More...
 
gbp_subnet_tgbp_subnet_pool
 pool of subnets More...
 
static fib_source_t gbp_fib_source
 
static vlib_cli_command_t gbp_subnet_add_del
 (constructor) VLIB_CLI_COMMAND (gbp_subnet_add_del) More...
 
static vlib_cli_command_t gbp_subnet_show_node
 (constructor) VLIB_CLI_COMMAND (gbp_subnet_show_node) More...
 

Typedef Documentation

◆ gbp_subnet_key_t

a key for the DB

◆ gbp_subnet_t

typedef struct gbp_subnet_t_ gbp_subnet_t

Subnet.

◆ gsb_subnet_show_flags_t

Enumeration Type Documentation

◆ gsb_subnet_show_flags_t_

Enumerator
GBP_SUBNET_SHOW_BRIEF 
GBP_SUBNET_SHOW_DETAILS 

Definition at line 454 of file gbp_subnet.c.

Function Documentation

◆ format_gbp_subnet()

u8* format_gbp_subnet ( u8 s,
va_list *  args 
)

Definition at line 483 of file gbp_subnet.c.

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

◆ format_gbp_subnet_type()

static u8* format_gbp_subnet_type ( u8 s,
va_list *  args 
)
static

Definition at line 461 of file gbp_subnet.c.

+ Here is the caller graph for this function:

◆ gbp_subnet_add()

int gbp_subnet_add ( u32  rd_id,
const fib_prefix_t pfx,
gbp_subnet_type_t  type,
u32  sw_if_index,
sclass_t  sclass 
)

Definition at line 255 of file gbp_subnet.c.

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

◆ gbp_subnet_add_del_cli()

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

Definition at line 324 of file gbp_subnet.c.

+ Here is the call graph for this function:

◆ gbp_subnet_db_add()

static void gbp_subnet_db_add ( u32  fib_index,
const fib_prefix_t pfx,
gbp_subnet_t gs 
)
static

Definition at line 88 of file gbp_subnet.c.

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

◆ gbp_subnet_db_del()

static void gbp_subnet_db_del ( gbp_subnet_t gs)
static

Definition at line 103 of file gbp_subnet.c.

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

◆ gbp_subnet_db_find()

static index_t gbp_subnet_db_find ( u32  fib_index,
const fib_prefix_t pfx 
)
static

Definition at line 71 of file gbp_subnet.c.

+ Here is the caller graph for this function:

◆ gbp_subnet_del()

int gbp_subnet_del ( u32  rd_id,
const fib_prefix_t pfx 
)

Definition at line 230 of file gbp_subnet.c.

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

◆ gbp_subnet_del_i()

static void gbp_subnet_del_i ( index_t  gsi)
static

Definition at line 211 of file gbp_subnet.c.

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

◆ gbp_subnet_external_add()

static int gbp_subnet_external_add ( gbp_subnet_t gs,
u32  sw_if_index,
sclass_t  sclass 
)
static

Definition at line 160 of file gbp_subnet.c.

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

◆ gbp_subnet_init()

static clib_error_t* gbp_subnet_init ( vlib_main_t vm)
static

Definition at line 579 of file gbp_subnet.c.

+ Here is the call graph for this function:

◆ gbp_subnet_internal_add()

static int gbp_subnet_internal_add ( gbp_subnet_t gs)
static

Definition at line 141 of file gbp_subnet.c.

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

◆ gbp_subnet_l3_out_add()

static int gbp_subnet_l3_out_add ( gbp_subnet_t gs,
sclass_t  sclass,
int  is_anon 
)
static

Definition at line 185 of file gbp_subnet.c.

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

◆ gbp_subnet_show()

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

Definition at line 529 of file gbp_subnet.c.

+ Here is the call graph for this function:

◆ gbp_subnet_transport_add()

static int gbp_subnet_transport_add ( gbp_subnet_t gs)
static

Definition at line 113 of file gbp_subnet.c.

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

◆ gbp_subnet_walk()

void gbp_subnet_walk ( gbp_subnet_cb_t  cb,
void *  ctx 
)

Definition at line 416 of file gbp_subnet.c.

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

Variable Documentation

◆ gbp_fib_source

fib_source_t gbp_fib_source
static

Definition at line 68 of file gbp_subnet.c.

◆ gbp_subnet_add_del

vlib_cli_command_t gbp_subnet_add_del
static
Initial value:
= {
.path = "gbp subnet",
.short_help = "gbp subnet [del] rd <ID> prefix <prefix> type <type> [<interface>] [sclass <sclass>]\n",
}
static clib_error_t * gbp_subnet_add_del_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_subnet.c:324

(constructor) VLIB_CLI_COMMAND (gbp_subnet_add_del)

Definition at line 406 of file gbp_subnet.c.

◆ gbp_subnet_db

uword* gbp_subnet_db

A DB of the subnets; key={pfx,fib-index}.

Definition at line 61 of file gbp_subnet.c.

◆ gbp_subnet_pool

gbp_subnet_t* gbp_subnet_pool

pool of subnets

Definition at line 66 of file gbp_subnet.c.

◆ gbp_subnet_show_node

vlib_cli_command_t gbp_subnet_show_node
static
Initial value:
= {
.path = "show gbp subnet",
.short_help = "show gbp subnet\n",
.function = gbp_subnet_show,
}
static clib_error_t * gbp_subnet_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_subnet.c:529

(constructor) VLIB_CLI_COMMAND (gbp_subnet_show_node)

Definition at line 571 of file gbp_subnet.c.