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;
92 rmp->_vl_msg_id = ntohs (VL_API_IPSEC_GRE_TUNNEL_DETAILS);
117 if (~0 == sw_if_index)
122 send_ipsec_gre_tunnel_details(t, reg, mp->context);
145 #define vl_msg_name_crc_list 147 #undef vl_msg_name_crc_list 152 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 153 foreach_vl_msg_name_crc_ipsec_gre;
163 vl_msg_api_set_handlers(VL_API_##N, #n, \ 164 vl_api_##n##_t_handler, \ 166 vl_api_##n##_t_endian, \ 167 vl_api_##n##_t_print, \ 168 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)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
VLIB_API_INIT_FUNCTION(ipsec_gre_api_hookup)
void * vl_msg_api_alloc(int nbytes)
static void vl_api_ipsec_gre_add_del_tunnel_t_handler(vl_api_ipsec_gre_add_del_tunnel_t *mp)
#define clib_memcpy(d, s, n)
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)
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.
An API client registration, only in vpp/vlib.
u8 is_add
1 - add, 0 - delete
u32 * tunnel_index_by_sw_if_index
mapping from sw_if_index to tunnel index
static void send_ipsec_gre_tunnel_details(ipsec_gre_tunnel_t *t, vl_api_registration_t *reg, u32 context)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
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
#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