38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_vpe_api_msg \ 46 _(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel) \ 47 _(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) 61 rv = VNET_API_ERROR_SAME_SRC_DST;
65 memset (a, 0,
sizeof (*a));
91 memset (rmp, 0,
sizeof (*rmp));
92 rmp->_vl_msg_id = ntohs (VL_API_IPSEC_GRE_TUNNEL_DETAILS);
119 if (~0 == sw_if_index)
124 send_ipsec_gre_tunnel_details(t, q, mp->context);
147 #define vl_msg_name_crc_list 149 #undef vl_msg_name_crc_list 154 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 155 foreach_vl_msg_name_crc_ipsec_gre;
165 vl_msg_api_set_handlers(VL_API_##N, #n, \ 166 vl_api_##n##_t_handler, \ 168 vl_api_##n##_t_endian, \ 169 vl_api_##n##_t_print, \ 170 sizeof(vl_api_##n##_t), 1);
Add / del ipsec gre tunnel request.
ip4_address_t tunnel_dst
tunnel IPv4 dst address
L2-GRE over IPSec packet processing.
#define REPLY_MACRO2(t, body)
VLIB_API_INIT_FUNCTION(ipsec_gre_api_hookup)
static void vl_api_ipsec_gre_add_del_tunnel_t_handler(vl_api_ipsec_gre_add_del_tunnel_t *mp)
Dump ipsec gre tunnel table.
ipsec_gre_tunnel_t * tunnels
pool of tunnel instances
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Reply for add / del ipsec gre tunnel request.
ipsec_gre_main_t ipsec_gre_main
static void setup_message_id_table(api_main_t *am)
void * vl_msg_api_alloc(int nbytes)
u32 sw_if_index
hardware interface index
u32 remote_sa_id
remote IPSec SA id
IPSec-GRE tunnel add/del arguments.
static void vl_api_ipsec_gre_tunnel_dump_t_handler(vl_api_ipsec_gre_tunnel_dump_t *mp)
static clib_error_t * ipsec_gre_api_hookup(vlib_main_t *vm)
ipsec gre tunnel operational state response
API main structure, used by both vpp and binary API clients.
u8 is_add
1 - add, 0 - delete
u32 * tunnel_index_by_sw_if_index
mapping from sw_if_index to tunnel index
#define clib_memcpy(a, b, c)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
static void send_ipsec_gre_tunnel_details(ipsec_gre_tunnel_t *t, unix_shared_memory_queue_t *q, u32 context)
u32 rsa
remote IPSec SA id
int vnet_ipsec_gre_add_del_tunnel(vnet_ipsec_gre_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
Add or delete ipsec-gre tunnel interface.
ip4_address_t src
tunnel IPv4 src address
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
#define foreach_vpe_api_msg
IPSec-GRE tunnel parameters.
u32 local_sa_id
local IPSec SA id
ip4_address_t dst
tunnel IPv4 dst address
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip4_address_t tunnel_src
tunnel IPv4 src address
struct _unix_shared_memory_queue unix_shared_memory_queue_t