31 #include <gtpu/gtpu.api_enum.h> 32 #include <gtpu/gtpu.api_types.h> 34 #define REPLY_MSG_ID_BASE gtm->msg_id_base 41 vl_api_sw_interface_set_gtpu_bypass_reply_t *rmp;
51 REPLY_MACRO (VL_API_SW_INTERFACE_SET_GTPU_BYPASS_REPLY);
65 rv = VNET_API_ERROR_NO_SUCH_FIB;
72 .encap_fib_index = p[0],
74 .teid = ntohl (mp->
teid),
82 rv = VNET_API_ERROR_SAME_SRC_DST;
88 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
115 rmp->_vl_msg_id = ntohs (VL_API_GTPU_TUNNEL_DETAILS + gtm->
msg_id_base);
148 if (~0 == sw_if_index)
153 send_gtpu_tunnel_details(t, reg, mp->context);
169 #include <gtpu/gtpu.api.c> vl_api_interface_index_t sw_if_index
vl_api_address_t src_address
vl_api_address_t src_address
static uword ip46_address_is_multicast(const ip46_address_t *a)
static void send_gtpu_tunnel_details(gtpu_tunnel_t *t, vl_api_registration_t *reg, u32 context)
u32 * tunnel_index_by_sw_if_index
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
void * vl_msg_api_alloc(int nbytes)
static void vl_api_sw_interface_set_gtpu_bypass_t_handler(vl_api_sw_interface_set_gtpu_bypass_t *mp)
static clib_error_t * gtpu_api_hookup(vlib_main_t *vm)
static void vl_api_gtpu_add_del_tunnel_t_handler(vl_api_gtpu_add_del_tunnel_t *mp)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
vl_api_interface_index_t sw_if_index
int vnet_gtpu_add_del_tunnel(vnet_gtpu_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
static int ip46_address_cmp(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
reply for set or delete an GTPU tunnel
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
vl_api_interface_index_t sw_if_index
uword * fib_index_by_table_id
Hash table mapping table id to fib index.
vl_api_interface_index_t mcast_sw_if_index
Interface set gtpu-bypass request.
An API client registration, only in vpp/vlib.
#define BAD_SW_IF_INDEX_LABEL
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
vl_api_address_t dst_address
u32 ft_table_id
Table ID (hash key) for this FIB.
vl_api_interface_index_t sw_if_index
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static void vl_api_gtpu_tunnel_dump_t_handler(vl_api_gtpu_tunnel_dump_t *mp)
VLIB_API_INIT_FUNCTION(gtpu_api_hookup)
vl_api_interface_index_t sw_if_index
void vnet_int_gtpu_bypass_mode(u32 sw_if_index, u8 is_ip6, u8 is_enable)
dump details of an GTPU tunnel
vl_api_interface_index_t mcast_sw_if_index
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
ip4_main_t ip4_main
Global ip4 main structure.
struct fib_table_t_ * fibs
Vector of FIBs.
vl_api_address_t dst_address
static void setup_message_id_table(snat_main_t *sm, api_main_t *am)
Set or delete an GTPU tunnel.
struct fib_table_t_ * fibs
#define VALIDATE_SW_IF_INDEX(mp)