|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
30 #include <l2tp/l2tp.api_enum.h>
31 #include <l2tp/l2tp.api_types.h>
37 #define REPLY_MSG_ID_BASE l2tp_base_msg_id
53 if_name =
format (if_name,
"%U",
107 ip46_address_t client, our;
111 rv = VNET_API_ERROR_UNIMPLEMENTED;
125 rv = VNET_API_ERROR_NO_SUCH_FIB;
128 encap_fib_index = p[0];
132 encap_fib_index = ~0;
160 vl_api_l2tpv3_set_tunnel_cookies_reply_t *rmp;
173 REPLY_MACRO (VL_API_L2TPV3_SET_TUNNEL_COOKIES_REPLY);
181 vl_api_l2tpv3_interface_enable_disable_reply_t *rmp;
190 REPLY_MACRO (VL_API_L2TPV3_INTERFACE_ENABLE_DISABLE_REPLY);
198 vl_api_l2tpv3_set_lookup_key_reply_t *rmp;
202 rv = VNET_API_ERROR_INVALID_VALUE;
219 #include <l2tp/l2tp.api.c>
235 #include <vpp/app/version.h>
239 .version = VPP_BUILD_VER,
240 .description =
"Layer 2 Tunneling Protocol v3 (L2TP)",
vnet_interface_main_t * im
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
vl_api_address_t client_address
#define REPLY_MACRO2(t, body)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static clib_error_t * l2tp_api_hookup(vlib_main_t *vm)
vl_api_address_t client_address
int create_l2tpv3_ipv6_tunnel(l2t_main_t *lm, ip6_address_t *client_address, ip6_address_t *our_address, u32 local_session_id, u32 remote_session_id, u64 local_cookie, u64 remote_cookie, int l2_sublayer_present, u32 encap_fib_index, u32 *sw_if_index)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void send_sw_if_l2tpv3_tunnel_details(vpe_api_main_t *am, vl_api_registration_t *reg, l2t_session_t *s, l2t_main_t *lm, u32 context)
string interface_name[64]
vl_api_address_t our_address
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
#define REPLY_MSG_ID_BASE
#define pool_foreach(VAR, POOL)
Iterate through pool.
vl_api_address_t our_address
@ L2T_LOOKUP_KEY_API_SESSION_ID
vnet_main_t * vnet_get_main(void)
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
ip6_to_l2_lookup_t lookup_type
static void vl_api_l2tpv3_set_tunnel_cookies_t_handler(vl_api_l2tpv3_set_tunnel_cookies_t *mp)
ip6_address_t client_address
vl_api_interface_index_t sw_if_index
static void vl_api_l2tpv3_set_lookup_key_t_handler(vl_api_l2tpv3_set_lookup_key_t *mp)
int l2tpv3_interface_enable_disable(vnet_main_t *vnm, u32 sw_if_index, int enable_disable)
vl_api_interface_index_t sw_if_index
l2tpv3 tunnel interface create request
#define BAD_SW_IF_INDEX_LABEL
static u32 l2tp_base_msg_id
Base message ID fot the plugin.
description fragment has unexpected format
static void vl_api_l2tpv3_create_tunnel_t_handler(vl_api_l2tpv3_create_tunnel_t *mp)
static vnet_sw_interface_t * vnet_get_hw_sw_interface(vnet_main_t *vnm, u32 hw_if_index)
VLIB_API_INIT_FUNCTION(l2tp_api_hookup)
static void vl_api_sw_if_l2tpv3_tunnel_dump_t_handler(vl_api_sw_if_l2tpv3_tunnel_dump_t *mp)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vl_api_interface_index_t sw_if_index
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
l2tpv3 tunnel interface create response
vl_api_interface_index_t sw_if_index
int l2tpv3_set_tunnel_cookies(l2t_main_t *lm, u32 sw_if_index, u64 new_local_cookie, u64 new_remote_cookie)
vl_api_interface_index_t sw_if_index
ip6_address_t our_address
format_function_t format_vnet_sw_interface_name
vpe_api_main_t vpe_api_main
void * vl_msg_api_alloc(int nbytes)
vl_api_l2t_lookup_key_t key
static void vl_api_l2tpv3_interface_enable_disable_t_handler(vl_api_l2tpv3_interface_enable_disable_t *mp)