|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
31 #include <gtpu/gtpu.api_enum.h>
32 #include <gtpu/gtpu.api_types.h>
34 #define REPLY_MSG_ID_BASE gtm->msg_id_base
40 vl_api_gtpu_offload_rx_reply_t *rmp;
42 vl_api_interface_index_t hw_if_index = ntohl (mp->
hw_if_index);
47 rv = VNET_API_ERROR_NO_SUCH_ENTRY;
55 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX_2;
63 rv = VNET_API_ERROR_INVALID_ADDRESS_FAMILY;
70 rv = VNET_API_ERROR_INVALID_ADDRESS_FAMILY;
82 rv = VNET_API_ERROR_NO_SUCH_FIB;
88 rv = VNET_API_ERROR_UNSPECIFIED;
101 vl_api_sw_interface_set_gtpu_bypass_reply_t *rmp;
111 REPLY_MACRO (VL_API_SW_INTERFACE_SET_GTPU_BYPASS_REPLY);
125 .teid = ntohl (mp->
teid),
126 .tteid = ntohl (mp->
tteid),
134 if (
a.encap_fib_index == ~0)
136 rv = VNET_API_ERROR_NO_SUCH_FIB;
143 rv = VNET_API_ERROR_SAME_SRC_DST;
149 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
168 vl_api_gtpu_tunnel_update_tteid_reply_t *rmp;
174 .teid = ntohl (mp->
teid),
175 .tteid = ntohl (mp->
tteid),
182 if (
a.encap_fib_index == ~0)
184 rv = VNET_API_ERROR_NO_SUCH_FIB;
191 REPLY_MACRO (VL_API_GTPU_TUNNEL_UPDATE_TTEID_REPLY);
260 #include <gtpu/gtpu.api.c>
static void send_gtpu_tunnel_details(gtpu_tunnel_t *t, vl_api_registration_t *reg, u32 context)
vnet_interface_main_t * im
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static fib_protocol_t fib_ip_proto(bool is_ip6)
Convert from boolean is_ip6 to FIB protocol.
int vnet_gtpu_add_mod_del_tunnel(vnet_gtpu_add_mod_del_tunnel_args_t *a, u32 *sw_if_indexp)
#define REPLY_MACRO2(t, body)
vl_api_interface_index_t sw_if_index
ip4_main_t ip4_main
Global ip4 main structure.
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void vl_api_gtpu_tunnel_update_tteid_t_handler(vl_api_gtpu_tunnel_update_tteid_t *mp)
static uword ip46_address_is_multicast(const ip46_address_t *a)
vl_api_interface_index_t sw_if_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u32 vnet_gtpu_get_tunnel_index(u32 sw_if_index)
reply for set or delete an GTPU tunnel
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)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void vl_api_gtpu_add_del_tunnel_t_handler(vl_api_gtpu_add_del_tunnel_t *mp)
Interface set gtpu-bypass request.
static void vl_api_sw_interface_set_gtpu_bypass_t_handler(vl_api_sw_interface_set_gtpu_bypass_t *mp)
static void vl_api_gtpu_tunnel_dump_t_handler(vl_api_gtpu_tunnel_dump_t *mp)
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
#define vec_elt(v, i)
Get vector value at index i.
static void setup_message_id_table(api_main_t *am)
#define pool_foreach(VAR, POOL)
Iterate through pool.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vl_api_interface_index_t mcast_sw_if_index
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
vnet_main_t * vnet_get_main(void)
u32 ft_table_id
Table ID (hash key) for this FIB.
An API client registration, only in vpp/vlib.
vl_api_interface_index_t sw_if_index
static uword vnet_hw_interface_is_valid(vnet_main_t *vnm, u32 hw_if_index)
vl_api_address_t dst_address
struct fib_table_t_ * fibs
VLIB_API_INIT_FUNCTION(gtpu_api_hookup)
void vnet_int_gtpu_bypass_mode(u32 sw_if_index, u8 is_ip6, u8 is_enable)
#define BAD_SW_IF_INDEX_LABEL
static void vl_api_gtpu_offload_rx_t_handler(vl_api_gtpu_offload_rx_t *mp)
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
struct fib_table_t_ * fibs
Vector of FIBs.
vl_api_address_t dst_address
static clib_error_t * gtpu_api_hookup(vlib_main_t *vm)
vl_api_interface_index_t sw_if_index
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
dump details of an GTPU tunnel
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
Update GTPU tunnel TX TEID.
u32 * tunnel_index_by_sw_if_index
int vnet_gtpu_add_del_rx_flow(u32 hw_if_index, u32 t_index, int is_add)
Create or delete a GTPU tunnel.
vl_api_address_t src_address
vl_api_address_t src_address
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 mcast_sw_if_index
vl_api_interface_index_t sw_if_index
vl_api_address_t dst_address
void * vl_msg_api_alloc(int nbytes)