FD.io VPP  v19.04.2-12-g66b1689
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

#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:468
int gbp_vxlan_tunnel_del(u32 vni)
Definition: gbp_vxlan.c:596

Definition at line 62 of file gbp_api.c.

#define GBP_MSG_BASE   msg_id_base

Definition at line 91 of file gbp_api.c.

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

Definition at line 56 of file gbp_api.c.

#define vl_endianfun   /* define message structures */

Definition at line 45 of file gbp_api.c.

#define vl_msg_name_crc_list

Definition at line 1147 of file gbp_api.c.

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

Definition at line 50 of file gbp_api.c.

#define vl_printfun

Definition at line 51 of file gbp_api.c.

#define vl_typedefs   /* define message structures */

Definition at line 41 of file gbp_api.c.

Typedef Documentation

Function Documentation

static void gbp_api_hookup ( vlib_main_t vm)
static

Definition at line 1161 of file gbp_api.c.

+ Here is the caller graph for this function:

static gbp_bridge_domain_flags_t gbp_bridge_domain_flags_from_api ( vl_api_gbp_bridge_domain_flags_t  a)
static

Definition at line 319 of file gbp_api.c.

+ Here is the caller graph for this function:

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

Definition at line 559 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int gbp_contract_rule_action_deocde ( vl_api_gbp_rule_action_t  in,
gbp_rule_action_t out 
)
static

Definition at line 774 of file gbp_api.c.

+ Here is the caller graph for this function:

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

Definition at line 873 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 903 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 983 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_endpoint_flags_t gbp_endpoint_flags_decode ( vl_api_gbp_endpoint_flags_t  v)
static

Definition at line 94 of file gbp_api.c.

+ Here is the caller graph for this function:

static vl_api_gbp_endpoint_flags_t gbp_endpoint_flags_encode ( gbp_endpoint_flags_t  f)
static

Definition at line 113 of file gbp_api.c.

+ Here is the caller graph for this function:

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

Definition at line 515 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 208 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 733 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int gbp_hash_mode_decode ( vl_api_gbp_hash_mode_t  in,
gbp_hash_mode_t out 
)
static

Definition at line 796 of file gbp_api.c.

+ Here is the caller graph for this function:

static clib_error_t* gbp_init ( vlib_main_t vm)
static

Definition at line 1176 of file gbp_api.c.

+ Here is the call graph for this function:

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

Definition at line 817 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 842 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 666 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 280 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 601 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 469 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vl_api_gbp_vxlan_tunnel_mode_t gbp_vxlan_tunnel_layer_2_mode ( gbp_vxlan_tunnel_layer_t  layer)
static

Definition at line 1081 of file gbp_api.c.

+ Here is the caller graph for this function:

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 1024 of file gbp_api.c.

+ Here is the caller graph for this function:

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

Definition at line 1100 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int gub_subnet_type_from_api ( vl_api_gbp_subnet_type_t  a,
gbp_subnet_type_t t 
)
static

Definition at line 392 of file gbp_api.c.

+ Here is the caller graph for this function:

static vl_api_gbp_subnet_type_t gub_subnet_type_to_api ( gbp_subnet_type_t  t)
static

Definition at line 443 of file gbp_api.c.

+ Here is the caller graph for this function:

static void setup_message_id_table ( api_main_t am)
static

Definition at line 1152 of file gbp_api.c.

+ Here is the caller graph for this function:

static void vl_api_gbp_bridge_domain_add_t_handler ( vl_api_gbp_bridge_domain_add_t mp)
static

Definition at line 339 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_bridge_domain_del_t_handler ( vl_api_gbp_bridge_domain_del_t mp)
static

Definition at line 355 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_bridge_domain_dump_t_handler ( vl_api_gbp_bridge_domain_dump_t mp)
static

Definition at line 584 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_contract_add_del_t_handler ( vl_api_gbp_contract_add_del_t mp)
static

Definition at line 934 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_contract_dump_t_handler ( vl_api_gbp_contract_dump_t mp)
static

Definition at line 1007 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_endpoint_add_t_handler ( vl_api_gbp_endpoint_add_t mp)
static

Definition at line 133 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_endpoint_del_t_handler ( vl_api_gbp_endpoint_del_t mp)
static

Definition at line 191 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_endpoint_dump_t_handler ( vl_api_gbp_endpoint_dump_t mp)
static

Definition at line 263 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_endpoint_group_add_t_handler ( vl_api_gbp_endpoint_group_add_t mp)
static

Definition at line 288 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_gbp_endpoint_group_del_t_handler ( vl_api_gbp_endpoint_group_del_t mp)
static

Definition at line 308 of file gbp_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_gbp_endpoint_group_dump_t_handler ( vl_api_gbp_endpoint_group_dump_t mp)
static

Definition at line 541 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_ext_itf_add_del_t_handler ( vl_api_gbp_ext_itf_add_del_t mp)
static

Definition at line 707 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_ext_itf_dump_t_handler ( vl_api_gbp_ext_itf_dump_t mp)
static

Definition at line 757 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_recirc_add_del_t_handler ( vl_api_gbp_recirc_add_del_t mp)
static

Definition at line 644 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_recirc_dump_t_handler ( vl_api_gbp_recirc_dump_t mp)
static

Definition at line 690 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_route_domain_add_t_handler ( vl_api_gbp_route_domain_add_t mp)
static

Definition at line 366 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_route_domain_del_t_handler ( vl_api_gbp_route_domain_del_t mp)
static

Definition at line 381 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_route_domain_dump_t_handler ( vl_api_gbp_route_domain_dump_t mp)
static

Definition at line 627 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_subnet_add_del_t_handler ( vl_api_gbp_subnet_add_del_t mp)
static

Definition at line 416 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_subnet_dump_t_handler ( vl_api_gbp_subnet_dump_t mp)
static

Definition at line 498 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_vxlan_tunnel_add_t_handler ( vl_api_gbp_vxlan_tunnel_add_t mp)
static

Definition at line 1042 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_vxlan_tunnel_del_t_handler ( vl_api_gbp_vxlan_tunnel_add_t mp)
static

Definition at line 1070 of file gbp_api.c.

+ Here is the call graph for this function:

static void vl_api_gbp_vxlan_tunnel_dump_t_handler ( vl_api_gbp_vxlan_tunnel_dump_t mp)
static

Definition at line 1124 of file gbp_api.c.

+ Here is the call graph for this function:

VLIB_API_INIT_FUNCTION ( gbp_init  )

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

Variable Documentation

gbp_main_t gbp_main

Definition at line 87 of file gbp_api.c.

u16 msg_id_base
static

Definition at line 89 of file gbp_api.c.