FD.io VPP  v19.08-23-g4b943d6
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 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

a key for the DB

typedef struct gbp_subnet_t_ gbp_subnet_t

Subnet.

Enumeration Type Documentation

Enumerator
GBP_SUBNET_SHOW_BRIEF 
GBP_SUBNET_SHOW_DETAILS 

Definition at line 452 of file gbp_subnet.c.

Function Documentation

u8* format_gbp_subnet ( u8 s,
va_list *  args 
)

Definition at line 481 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 459 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 253 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 322 of file gbp_subnet.c.

+ Here is the call graph for this function:

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

Definition at line 86 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_subnet_db_del ( gbp_subnet_t gs)
static

Definition at line 101 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 69 of file gbp_subnet.c.

+ Here is the caller graph for this function:

int gbp_subnet_del ( u32  rd_id,
const fib_prefix_t pfx 
)

Definition at line 228 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_subnet_del_i ( index_t  gsi)
static

Definition at line 209 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 158 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* gbp_subnet_init ( vlib_main_t vm)
static

Definition at line 577 of file gbp_subnet.c.

static int gbp_subnet_internal_add ( gbp_subnet_t gs)
static

Definition at line 139 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 183 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 527 of file gbp_subnet.c.

+ Here is the call graph for this function:

static int gbp_subnet_transport_add ( gbp_subnet_t gs)
static

Definition at line 111 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_subnet_walk ( gbp_subnet_cb_t  cb,
void *  ctx 
)

Definition at line 414 of file gbp_subnet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

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:322

(constructor) VLIB_CLI_COMMAND (gbp_subnet_add_del)

Definition at line 404 of file gbp_subnet.c.

uword* gbp_subnet_db

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

Definition at line 61 of file gbp_subnet.c.

gbp_subnet_t* gbp_subnet_pool

pool of subnets

Definition at line 66 of file gbp_subnet.c.

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:527

(constructor) VLIB_CLI_COMMAND (gbp_subnet_show_node)

Definition at line 569 of file gbp_subnet.c.