FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
gbp_api.c File Reference
+ Include dependency graph for gbp_api.c:

Go to the source code of this file.

Data Structures

struct  gbp_walk_ctx_t_
 

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define vl_api_version(n, v)   static u32 api_version=(v);
 
#define foreach_gbp_api_msg
 
#define GBP_MSG_BASE   msg_id_base
 
#define vl_msg_name_crc_list
 

Typedefs

typedef struct gbp_walk_ctx_t_ gbp_walk_ctx_t
 

Functions

static gbp_endpoint_flags_t gbp_endpoint_flags_decode (vl_api_gbp_endpoint_flags_t v)
 
static vl_api_gbp_endpoint_flags_t gbp_endpoint_flags_encode (gbp_endpoint_flags_t f)
 
static void vl_api_gbp_endpoint_add_t_handler (vl_api_gbp_endpoint_add_t *mp)
 
static void vl_api_gbp_endpoint_del_t_handler (vl_api_gbp_endpoint_del_t *mp)
 
static walk_rc_t gbp_endpoint_send_details (index_t gei, void *args)
 
static void vl_api_gbp_endpoint_dump_t_handler (vl_api_gbp_endpoint_dump_t *mp)
 
static void gbp_retention_decode (const vl_api_gbp_endpoint_retention_t *in, gbp_endpoint_retention_t *out)
 
static void vl_api_gbp_endpoint_group_add_t_handler (vl_api_gbp_endpoint_group_add_t *mp)
 
static void vl_api_gbp_endpoint_group_del_t_handler (vl_api_gbp_endpoint_group_del_t *mp)
 
static gbp_bridge_domain_flags_t gbp_bridge_domain_flags_from_api (vl_api_gbp_bridge_domain_flags_t a)
 
static void vl_api_gbp_bridge_domain_add_t_handler (vl_api_gbp_bridge_domain_add_t *mp)
 
static void vl_api_gbp_bridge_domain_del_t_handler (vl_api_gbp_bridge_domain_del_t *mp)
 
static void vl_api_gbp_route_domain_add_t_handler (vl_api_gbp_route_domain_add_t *mp)
 
static void vl_api_gbp_route_domain_del_t_handler (vl_api_gbp_route_domain_del_t *mp)
 
static int gub_subnet_type_from_api (vl_api_gbp_subnet_type_t a, gbp_subnet_type_t *t)
 
static void vl_api_gbp_subnet_add_del_t_handler (vl_api_gbp_subnet_add_del_t *mp)
 
static vl_api_gbp_subnet_type_t gub_subnet_type_to_api (gbp_subnet_type_t t)
 
static walk_rc_t gbp_subnet_send_details (u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, sclass_t sclass, void *args)
 
static void vl_api_gbp_subnet_dump_t_handler (vl_api_gbp_subnet_dump_t *mp)
 
static int gbp_endpoint_group_send_details (gbp_endpoint_group_t *gg, void *args)
 
static void vl_api_gbp_endpoint_group_dump_t_handler (vl_api_gbp_endpoint_group_dump_t *mp)
 
static int gbp_bridge_domain_send_details (gbp_bridge_domain_t *gb, void *args)
 
static void vl_api_gbp_bridge_domain_dump_t_handler (vl_api_gbp_bridge_domain_dump_t *mp)
 
static int gbp_route_domain_send_details (gbp_route_domain_t *grd, void *args)
 
static void vl_api_gbp_route_domain_dump_t_handler (vl_api_gbp_route_domain_dump_t *mp)
 
static void vl_api_gbp_recirc_add_del_t_handler (vl_api_gbp_recirc_add_del_t *mp)
 
static walk_rc_t gbp_recirc_send_details (gbp_recirc_t *gr, void *args)
 
static void vl_api_gbp_recirc_dump_t_handler (vl_api_gbp_recirc_dump_t *mp)
 
static void vl_api_gbp_ext_itf_add_del_t_handler (vl_api_gbp_ext_itf_add_del_t *mp)
 
static walk_rc_t gbp_ext_itf_send_details (gbp_ext_itf_t *gx, void *args)
 
static void vl_api_gbp_ext_itf_dump_t_handler (vl_api_gbp_ext_itf_dump_t *mp)
 
static int gbp_contract_rule_action_deocde (vl_api_gbp_rule_action_t in, gbp_rule_action_t *out)
 
static int gbp_hash_mode_decode (vl_api_gbp_hash_mode_t in, gbp_hash_mode_t *out)
 
static int gbp_next_hop_decode (const vl_api_gbp_next_hop_t *in, index_t *gnhi)
 
static int gbp_next_hop_set_decode (const vl_api_gbp_next_hop_set_t *in, gbp_hash_mode_t *hash_mode, index_t **out)
 
static int gbp_contract_rule_decode (const vl_api_gbp_rule_t *in, index_t *gui)
 
static int gbp_contract_rules_decode (u8 n_rules, const vl_api_gbp_rule_t *rules, index_t **out)
 
static void vl_api_gbp_contract_add_del_t_handler (vl_api_gbp_contract_add_del_t *mp)
 
static int gbp_contract_send_details (gbp_contract_t *gbpc, void *args)
 
static void vl_api_gbp_contract_dump_t_handler (vl_api_gbp_contract_dump_t *mp)
 
static int gbp_vxlan_tunnel_mode_2_layer (vl_api_gbp_vxlan_tunnel_mode_t mode, gbp_vxlan_tunnel_layer_t *l)
 
static void vl_api_gbp_vxlan_tunnel_add_t_handler (vl_api_gbp_vxlan_tunnel_add_t *mp)
 
static void vl_api_gbp_vxlan_tunnel_del_t_handler (vl_api_gbp_vxlan_tunnel_add_t *mp)
 
static vl_api_gbp_vxlan_tunnel_mode_t gbp_vxlan_tunnel_layer_2_mode (gbp_vxlan_tunnel_layer_t layer)
 
static walk_rc_t gbp_vxlan_tunnel_send_details (gbp_vxlan_tunnel_t *gt, void *args)
 
static void vl_api_gbp_vxlan_tunnel_dump_t_handler (vl_api_gbp_vxlan_tunnel_dump_t *mp)
 
static void setup_message_id_table (api_main_t *am)
 
static void gbp_api_hookup (vlib_main_t *vm)
 
static clib_error_tgbp_init (vlib_main_t *vm)
 
 VLIB_API_INIT_FUNCTION (gbp_init)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

gbp_main_t gbp_main
 
static u16 msg_id_base
 

Macro Definition Documentation

◆ foreach_gbp_api_msg

#define foreach_gbp_api_msg
Value:
_(GBP_ENDPOINT_ADD, gbp_endpoint_add) \
_(GBP_ENDPOINT_DEL, gbp_endpoint_del) \
_(GBP_ENDPOINT_DUMP, gbp_endpoint_dump) \
_(GBP_SUBNET_ADD_DEL, gbp_subnet_add_del) \
_(GBP_SUBNET_DUMP, gbp_subnet_dump) \
_(GBP_ENDPOINT_GROUP_ADD, gbp_endpoint_group_add) \
_(GBP_ENDPOINT_GROUP_DEL, gbp_endpoint_group_del) \
_(GBP_ENDPOINT_GROUP_DUMP, gbp_endpoint_group_dump) \
_(GBP_BRIDGE_DOMAIN_ADD, gbp_bridge_domain_add) \
_(GBP_BRIDGE_DOMAIN_DEL, gbp_bridge_domain_del) \
_(GBP_BRIDGE_DOMAIN_DUMP, gbp_bridge_domain_dump) \
_(GBP_ROUTE_DOMAIN_ADD, gbp_route_domain_add) \
_(GBP_ROUTE_DOMAIN_DEL, gbp_route_domain_del) \
_(GBP_ROUTE_DOMAIN_DUMP, gbp_route_domain_dump) \
_(GBP_RECIRC_ADD_DEL, gbp_recirc_add_del) \
_(GBP_RECIRC_DUMP, gbp_recirc_dump) \
_(GBP_EXT_ITF_ADD_DEL, gbp_ext_itf_add_del) \
_(GBP_EXT_ITF_DUMP, gbp_ext_itf_dump) \
_(GBP_CONTRACT_ADD_DEL, gbp_contract_add_del) \
_(GBP_CONTRACT_DUMP, gbp_contract_dump) \
_(GBP_VXLAN_TUNNEL_ADD, gbp_vxlan_tunnel_add) \
_(GBP_VXLAN_TUNNEL_DEL, gbp_vxlan_tunnel_del) \
_(GBP_VXLAN_TUNNEL_DUMP, gbp_vxlan_tunnel_dump)
int gbp_vxlan_tunnel_add(u32 vni, gbp_vxlan_tunnel_layer_t layer, u32 bd_rd_id, const ip4_address_t *src, u32 *sw_if_indexp)
Definition: gbp_vxlan.c:439
static vlib_cli_command_t gbp_subnet_add_del
(constructor) VLIB_CLI_COMMAND (gbp_subnet_add_del)
Definition: gbp_subnet.c:404
int gbp_vxlan_tunnel_del(u32 vni)
Definition: gbp_vxlan.c:550

Definition at line 63 of file gbp_api.c.

◆ GBP_MSG_BASE

#define GBP_MSG_BASE   msg_id_base

Definition at line 92 of file gbp_api.c.

◆ vl_api_version

#define vl_api_version (   n,
 
)    static u32 api_version=(v);

Definition at line 57 of file gbp_api.c.

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 46 of file gbp_api.c.

◆ vl_msg_name_crc_list

#define vl_msg_name_crc_list

Definition at line 1173 of file gbp_api.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 51 of file gbp_api.c.

◆ vl_printfun

#define vl_printfun

Definition at line 52 of file gbp_api.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 42 of file gbp_api.c.

Typedef Documentation

◆ gbp_walk_ctx_t

Function Documentation

◆ gbp_api_hookup()

static void gbp_api_hookup ( vlib_main_t vm)
static

Definition at line 1187 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_bridge_domain_flags_from_api()

static gbp_bridge_domain_flags_t gbp_bridge_domain_flags_from_api ( vl_api_gbp_bridge_domain_flags_t  a)
static

Definition at line 325 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_bridge_domain_send_details()

static int gbp_bridge_domain_send_details ( gbp_bridge_domain_t gb,
void *  args 
)
static

Definition at line 573 of file gbp_api.c.

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

◆ gbp_contract_rule_action_deocde()

static int gbp_contract_rule_action_deocde ( vl_api_gbp_rule_action_t  in,
gbp_rule_action_t out 
)
static

Definition at line 795 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_contract_rule_decode()

static int gbp_contract_rule_decode ( const vl_api_gbp_rule_t *  in,
index_t gui 
)
static

Definition at line 894 of file gbp_api.c.

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

◆ gbp_contract_rules_decode()

static int gbp_contract_rules_decode ( u8  n_rules,
const vl_api_gbp_rule_t *  rules,
index_t **  out 
)
static

Definition at line 924 of file gbp_api.c.

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

◆ gbp_contract_send_details()

static int gbp_contract_send_details ( gbp_contract_t gbpc,
void *  args 
)
static

Definition at line 1008 of file gbp_api.c.

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

◆ gbp_endpoint_flags_decode()

static gbp_endpoint_flags_t gbp_endpoint_flags_decode ( vl_api_gbp_endpoint_flags_t  v)
static

Definition at line 95 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_endpoint_flags_encode()

static vl_api_gbp_endpoint_flags_t gbp_endpoint_flags_encode ( gbp_endpoint_flags_t  f)
static

Definition at line 114 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_endpoint_group_send_details()

static int gbp_endpoint_group_send_details ( gbp_endpoint_group_t gg,
void *  args 
)
static

Definition at line 529 of file gbp_api.c.

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

◆ gbp_endpoint_send_details()

static walk_rc_t gbp_endpoint_send_details ( index_t  gei,
void *  args 
)
static

Definition at line 211 of file gbp_api.c.

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

◆ gbp_ext_itf_send_details()

static walk_rc_t gbp_ext_itf_send_details ( gbp_ext_itf_t gx,
void *  args 
)
static

Definition at line 753 of file gbp_api.c.

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

◆ gbp_hash_mode_decode()

static int gbp_hash_mode_decode ( vl_api_gbp_hash_mode_t  in,
gbp_hash_mode_t out 
)
static

Definition at line 817 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_init()

static clib_error_t* gbp_init ( vlib_main_t vm)
static

Definition at line 1202 of file gbp_api.c.

+ Here is the call graph for this function:

◆ gbp_next_hop_decode()

static int gbp_next_hop_decode ( const vl_api_gbp_next_hop_t *  in,
index_t gnhi 
)
static

Definition at line 838 of file gbp_api.c.

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

◆ gbp_next_hop_set_decode()

static int gbp_next_hop_set_decode ( const vl_api_gbp_next_hop_set_t *  in,
gbp_hash_mode_t hash_mode,
index_t **  out 
)
static

Definition at line 863 of file gbp_api.c.

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

◆ gbp_recirc_send_details()

static walk_rc_t gbp_recirc_send_details ( gbp_recirc_t gr,
void *  args 
)
static

Definition at line 685 of file gbp_api.c.

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

◆ gbp_retention_decode()

static void gbp_retention_decode ( const vl_api_gbp_endpoint_retention_t *  in,
gbp_endpoint_retention_t out 
)
static

Definition at line 286 of file gbp_api.c.

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

◆ gbp_route_domain_send_details()

static int gbp_route_domain_send_details ( gbp_route_domain_t grd,
void *  args 
)
static

Definition at line 620 of file gbp_api.c.

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

◆ gbp_subnet_send_details()

static walk_rc_t gbp_subnet_send_details ( u32  rd_id,
const fib_prefix_t pfx,
gbp_subnet_type_t  type,
u32  sw_if_index,
sclass_t  sclass,
void *  args 
)
static

Definition at line 483 of file gbp_api.c.

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

◆ gbp_vxlan_tunnel_layer_2_mode()

static vl_api_gbp_vxlan_tunnel_mode_t gbp_vxlan_tunnel_layer_2_mode ( gbp_vxlan_tunnel_layer_t  layer)
static

Definition at line 1107 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_vxlan_tunnel_mode_2_layer()

static int gbp_vxlan_tunnel_mode_2_layer ( vl_api_gbp_vxlan_tunnel_mode_t  mode,
gbp_vxlan_tunnel_layer_t l 
)
static

Definition at line 1050 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gbp_vxlan_tunnel_send_details()

static walk_rc_t gbp_vxlan_tunnel_send_details ( gbp_vxlan_tunnel_t gt,
void *  args 
)
static

Definition at line 1126 of file gbp_api.c.

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

◆ gub_subnet_type_from_api()

static int gub_subnet_type_from_api ( vl_api_gbp_subnet_type_t  a,
gbp_subnet_type_t t 
)
static

Definition at line 400 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ gub_subnet_type_to_api()

static vl_api_gbp_subnet_type_t gub_subnet_type_to_api ( gbp_subnet_type_t  t)
static

Definition at line 454 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ setup_message_id_table()

static void setup_message_id_table ( api_main_t am)
static

Definition at line 1178 of file gbp_api.c.

+ Here is the caller graph for this function:

◆ vl_api_gbp_bridge_domain_add_t_handler()

static void vl_api_gbp_bridge_domain_add_t_handler ( vl_api_gbp_bridge_domain_add_t mp)
static

Definition at line 345 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_bridge_domain_del_t_handler()

static void vl_api_gbp_bridge_domain_del_t_handler ( vl_api_gbp_bridge_domain_del_t mp)
static

Definition at line 362 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_bridge_domain_dump_t_handler()

static void vl_api_gbp_bridge_domain_dump_t_handler ( vl_api_gbp_bridge_domain_dump_t mp)
static

Definition at line 603 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_contract_add_del_t_handler()

static void vl_api_gbp_contract_add_del_t_handler ( vl_api_gbp_contract_add_del_t mp)
static

Definition at line 957 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_contract_dump_t_handler()

static void vl_api_gbp_contract_dump_t_handler ( vl_api_gbp_contract_dump_t mp)
static

Definition at line 1033 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_endpoint_add_t_handler()

static void vl_api_gbp_endpoint_add_t_handler ( vl_api_gbp_endpoint_add_t mp)
static

Definition at line 134 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_endpoint_del_t_handler()

static void vl_api_gbp_endpoint_del_t_handler ( vl_api_gbp_endpoint_del_t mp)
static

Definition at line 194 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_endpoint_dump_t_handler()

static void vl_api_gbp_endpoint_dump_t_handler ( vl_api_gbp_endpoint_dump_t mp)
static

Definition at line 269 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_endpoint_group_add_t_handler()

static void vl_api_gbp_endpoint_group_add_t_handler ( vl_api_gbp_endpoint_group_add_t mp)
static

Definition at line 294 of file gbp_api.c.

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

◆ vl_api_gbp_endpoint_group_del_t_handler()

static void vl_api_gbp_endpoint_group_del_t_handler ( vl_api_gbp_endpoint_group_del_t mp)
static

Definition at line 314 of file gbp_api.c.

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

◆ vl_api_gbp_endpoint_group_dump_t_handler()

static void vl_api_gbp_endpoint_group_dump_t_handler ( vl_api_gbp_endpoint_group_dump_t mp)
static

Definition at line 555 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_ext_itf_add_del_t_handler()

static void vl_api_gbp_ext_itf_add_del_t_handler ( vl_api_gbp_ext_itf_add_del_t mp)
static

Definition at line 726 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_ext_itf_dump_t_handler()

static void vl_api_gbp_ext_itf_dump_t_handler ( vl_api_gbp_ext_itf_dump_t mp)
static

Definition at line 778 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_recirc_add_del_t_handler()

static void vl_api_gbp_recirc_add_del_t_handler ( vl_api_gbp_recirc_add_del_t mp)
static

Definition at line 663 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_recirc_dump_t_handler()

static void vl_api_gbp_recirc_dump_t_handler ( vl_api_gbp_recirc_dump_t mp)
static

Definition at line 709 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_route_domain_add_t_handler()

static void vl_api_gbp_route_domain_add_t_handler ( vl_api_gbp_route_domain_add_t mp)
static

Definition at line 373 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_route_domain_del_t_handler()

static void vl_api_gbp_route_domain_del_t_handler ( vl_api_gbp_route_domain_del_t mp)
static

Definition at line 389 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_route_domain_dump_t_handler()

static void vl_api_gbp_route_domain_dump_t_handler ( vl_api_gbp_route_domain_dump_t mp)
static

Definition at line 646 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_subnet_add_del_t_handler()

static void vl_api_gbp_subnet_add_del_t_handler ( vl_api_gbp_subnet_add_del_t mp)
static

Definition at line 427 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_subnet_dump_t_handler()

static void vl_api_gbp_subnet_dump_t_handler ( vl_api_gbp_subnet_dump_t mp)
static

Definition at line 512 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_vxlan_tunnel_add_t_handler()

static void vl_api_gbp_vxlan_tunnel_add_t_handler ( vl_api_gbp_vxlan_tunnel_add_t mp)
static

Definition at line 1068 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_vxlan_tunnel_del_t_handler()

static void vl_api_gbp_vxlan_tunnel_del_t_handler ( vl_api_gbp_vxlan_tunnel_add_t mp)
static

Definition at line 1096 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_vxlan_tunnel_dump_t_handler()

static void vl_api_gbp_vxlan_tunnel_dump_t_handler ( vl_api_gbp_vxlan_tunnel_dump_t mp)
static

Definition at line 1150 of file gbp_api.c.

+ Here is the call graph for this function:

◆ VLIB_API_INIT_FUNCTION()

VLIB_API_INIT_FUNCTION ( gbp_init  )
+ Here is the caller graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )
+ Here is the caller graph for this function:

Variable Documentation

◆ gbp_main

gbp_main_t gbp_main

Definition at line 88 of file gbp_api.c.

◆ msg_id_base

u16 msg_id_base
static

Definition at line 90 of file gbp_api.c.