FD.io VPP  v19.01.3-6-g70449b9b9
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 void vl_api_gbp_endpoint_learn_set_inactive_threshold_t_handler (vl_api_gbp_endpoint_learn_set_inactive_threshold_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 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, epg_id_t epg, 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_ENDPOINT_LEARN_SET_INACTIVE_THRESHOLD, gbp_endpoint_learn_set_inactive_threshold) \
_(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, u32 *sw_if_indexp)
Definition: gbp_vxlan.c:640
int gbp_vxlan_tunnel_del(u32 vni)
Definition: gbp_vxlan.c:765

Definition at line 62 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 56 of file gbp_api.c.

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 45 of file gbp_api.c.

◆ vl_msg_name_crc_list

#define vl_msg_name_crc_list

Definition at line 1137 of file gbp_api.c.

◆ vl_print

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

Definition at line 50 of file gbp_api.c.

◆ vl_printfun

#define vl_printfun

Definition at line 51 of file gbp_api.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 41 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 1151 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 321 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 553 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 767 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 866 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 896 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 975 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 510 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 222 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 726 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 789 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 1166 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 810 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 835 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 659 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 594 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,
epg_id_t  epg,
void *  args 
)
static

Definition at line 464 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 1071 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 1016 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 1090 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 387 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 438 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 1142 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 335 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 350 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 577 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 927 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 999 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 192 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 277 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 295 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 310 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 535 of file gbp_api.c.

+ Here is the call graph for this function:

◆ vl_api_gbp_endpoint_learn_set_inactive_threshold_t_handler()

static void vl_api_gbp_endpoint_learn_set_inactive_threshold_t_handler ( vl_api_gbp_endpoint_learn_set_inactive_threshold_t mp)
static

Definition at line 204 of file gbp_api.c.

+ Here is the call graph for this function:
+ Here is the caller 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 700 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 750 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 637 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 683 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 361 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 376 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 620 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 411 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 493 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 1034 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 1060 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 1114 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.