|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
31 #include <vxlan-gbp/vxlan_gbp.api_enum.h>
32 #include <vxlan-gbp/vxlan_gbp.api_types.h>
34 #define REPLY_MSG_ID_BASE msg_id_base
43 vl_api_sw_interface_set_vxlan_gbp_bypass_reply_t *rmp;
52 REPLY_MACRO (VL_API_SW_INTERFACE_SET_VXLAN_GBP_BYPASS_REPLY);
59 in = clib_net_to_host_u32 (in);
70 return (VNET_API_ERROR_INVALID_VALUE);
88 ntohl (mp->
tunnel.encap_table_id));
91 rv = VNET_API_ERROR_NO_SUCH_FIB;
104 .mcast_sw_if_index = ntohl (mp->
tunnel.mcast_sw_if_index),
105 .encap_fib_index = fib_index,
106 .vni = ntohl (mp->
tunnel.vni),
115 rv = VNET_API_ERROR_SAME_SRC_DST;
121 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
150 rmp->
tunnel.encap_table_id =
197 #include <vxlan-gbp/vxlan_gbp.api.c>
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 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.
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 setup_message_id_table(api_main_t *am)
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)
vl_api_interface_index_t sw_if_index[default=0xffffffff]
VLIB_API_INIT_FUNCTION(vxlan_gbp_api_hookup)
#define BAD_SW_IF_INDEX_LABEL
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
#define REPLY_MSG_ID_BASE
@ 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)