FD.io VPP  v19.01.3-6-g70449b9b9
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, epg_id_t epg)
 
static int gbp_subnet_l3_out_add (gbp_subnet_t *gs, u32 sw_if_index, epg_id_t epg)
 
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, epg_id_t epg)
 
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_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 324 of file gbp_subnet.c.

Function Documentation

◆ format_gbp_subnet()

u8* format_gbp_subnet ( u8 s,
va_list *  args 
)

Definition at line 351 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 331 of file gbp_subnet.c.

+ Here is the call graph for this function:
+ 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,
epg_id_t  epg 
)

Definition at line 236 of file gbp_subnet.c.

+ Here is the call graph for this function:
+ Here is the caller 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 86 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 101 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 69 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 200 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,
epg_id_t  epg 
)
static

Definition at line 155 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 446 of file gbp_subnet.c.

◆ gbp_subnet_internal_add()

static int gbp_subnet_internal_add ( gbp_subnet_t gs)
static

Definition at line 136 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,
u32  sw_if_index,
epg_id_t  epg 
)
static

Definition at line 179 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 396 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 111 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 287 of file gbp_subnet.c.

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

Variable Documentation

◆ 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:396

(constructor) VLIB_CLI_COMMAND (gbp_subnet_show_node)

Definition at line 438 of file gbp_subnet.c.