|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
41 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
48 #define foreach_vpe_api_msg \
49 _(SW_INTERFACE_SET_VXLAN_GBP_BYPASS, sw_interface_set_vxlan_gbp_bypass) \
50 _(VXLAN_GBP_TUNNEL_ADD_DEL, vxlan_gbp_tunnel_add_del) \
51 _(VXLAN_GBP_TUNNEL_DUMP, vxlan_gbp_tunnel_dump)
57 vl_api_sw_interface_set_vxlan_gbp_bypass_reply_t *rmp;
66 REPLY_MACRO (VL_API_SW_INTERFACE_SET_VXLAN_GBP_BYPASS_REPLY);
73 in = clib_net_to_host_u32 (in);
84 return (VNET_API_ERROR_INVALID_VALUE);
102 ntohl (mp->
tunnel.encap_table_id));
105 rv = VNET_API_ERROR_NO_SUCH_FIB;
118 .mcast_sw_if_index = ntohl (mp->
tunnel.mcast_sw_if_index),
119 .encap_fib_index = fib_index,
120 .vni = ntohl (mp->
tunnel.vni),
129 rv = VNET_API_ERROR_SAME_SRC_DST;
135 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
159 rmp->_vl_msg_id =
ntohs (VL_API_VXLAN_GBP_TUNNEL_DETAILS);
163 rmp->
tunnel.encap_table_id =
217 #define vl_msg_name_crc_list
219 #undef vl_msg_name_crc_list
224 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
225 foreach_vl_msg_name_crc_vxlan_gbp;
235 vl_msg_api_set_handlers(VL_API_##N, #n, \
236 vl_api_##n##_t_handler, \
238 vl_api_##n##_t_endian, \
239 vl_api_##n##_t_print, \
240 sizeof(vl_api_##n##_t), 1);
void vnet_int_vxlan_gbp_bypass_mode(u32 sw_if_index, u8 is_ip6, u8 is_enable)
fib_protocol_t fib_proto_from_ip46(ip46_type_t iproto)
Convert from ip46_type to fib_protocol.
#define foreach_vpe_api_msg
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
vl_api_vxlan_gbp_tunnel_t tunnel
#define REPLY_MACRO2(t, body)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static uword ip46_address_is_multicast(const ip46_address_t *a)
vxlan_gbp_tunnel_t * tunnels
@ VXLAN_GBP_TUNNEL_MODE_L2
@ VXLAN_GBP_API_TUNNEL_MODE_L3
static int ip46_address_cmp(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
static void vl_api_vxlan_gbp_tunnel_dump_t_handler(vl_api_vxlan_gbp_tunnel_dump_t *mp)
Create or delete a VXLAN-GBP tunnel.
static void setup_message_id_table(api_main_t *am)
vl_api_tunnel_mode_t mode
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
bool is_add[default=true]
enum vxlan_gbp_tunnel_mode_t_ vxlan_gbp_tunnel_mode_t
@ VXLAN_GBP_TUNNEL_MODE_L3
bool enable[default=true]
static int vxlan_gbp_tunnel_mode_decode(vl_api_vxlan_gbp_api_tunnel_mode_t in, vxlan_gbp_tunnel_mode_t *out)
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
#define pool_foreach(VAR, POOL)
Iterate through pool.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static clib_error_t * vxlan_gbp_api_hookup(vlib_main_t *vm)
An API client registration, only in vpp/vlib.
static void vl_api_vxlan_gbp_tunnel_add_del_t_handler(vl_api_vxlan_gbp_tunnel_add_del_t *mp)
static void send_vxlan_gbp_tunnel_details(vxlan_gbp_tunnel_t *t, vl_api_registration_t *reg, u32 context)
static api_main_t * vlibapi_get_main(void)
vl_api_interface_index_t sw_if_index[default=0xffffffff]
VLIB_API_INIT_FUNCTION(vxlan_gbp_api_hookup)
#define BAD_SW_IF_INDEX_LABEL
API main structure, used by both vpp and binary API clients.
Interface set vxlan-bypass request.
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
u32 * tunnel_index_by_sw_if_index
vl_api_vxlan_gbp_tunnel_t tunnel
int vnet_vxlan_gbp_tunnel_add_del(vnet_vxlan_gbp_tunnel_add_del_args_t *a, u32 *sw_if_indexp)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
vl_api_interface_index_t sw_if_index
@ VXLAN_GBP_API_TUNNEL_MODE_L2
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t sw_if_index
vxlan_gbp_main_t vxlan_gbp_main
static void vl_api_sw_interface_set_vxlan_gbp_bypass_t_handler(vl_api_sw_interface_set_vxlan_gbp_bypass_t *mp)
void * vl_msg_api_alloc(int nbytes)