39 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 46 #define foreach_vpe_api_msg \ 47 _(IPSEC_GRE_TUNNEL_ADD_DEL, ipsec_gre_tunnel_add_del) \ 48 _(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) 67 rv = VNET_API_ERROR_SAME_SRC_DST;
93 rmp->_vl_msg_id = ntohs (VL_API_IPSEC_GRE_TUNNEL_DETAILS);
119 if (~0 == sw_if_index)
124 send_ipsec_gre_tunnel_details(t, reg, 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);
ip4_address_t tunnel_dst
tunnel IPv4 dst address
vl_api_ipsec_gre_tunnel_t tunnel
L2-GRE over IPSec packet processing.
#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)
VLIB_API_INIT_FUNCTION(ipsec_gre_api_hookup)
void * vl_msg_api_alloc(int nbytes)
int vnet_ipsec_gre_tunnel_add_del(const ipsec_gre_tunnel_add_del_args_t *a, u32 *sw_if_indexp)
Add or delete ipsec-gre tunnel interface.
Dump ipsec gre tunnel table.
ipsec_gre_tunnel_t * tunnels
pool of tunnel instances
static void vl_api_ipsec_gre_tunnel_add_del_t_handler(vl_api_ipsec_gre_tunnel_add_del_t *mp)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
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
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)
Reply for add / del ipsec gre tunnel request.
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.
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)
vl_api_ipsec_gre_tunnel_t tunnel
#define foreach_vpe_api_msg
IPSec-GRE tunnel parameters.
u32 local_sa_id
local IPSec SA id
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
void ip4_address_encode(const ip4_address_t *in, vl_api_ip4_address_t out)
ip4_address_t tunnel_src
tunnel IPv4 src address