33 }) ipsec4_tunnel_key_t;
42 ip6_address_t remote_ip;
44 }) ipsec6_tunnel_key_t;
50 #define foreach_ipsec_protect_flags \ 52 _(ENCAPED, 2, "encapped") \ 58 #define _(a,b,c) IPSEC_PROTECT_##a = b, 71 #define ITP_MAX_N_SA_IN 4 96 #define FOR_EACH_IPSEC_PROTECT_INPUT_SAI(_itp, _sai, body) \ 99 for (__ii = 0; __ii < _itp->itp_n_sa_in; __ii++) { \ 100 _sai = itp->itp_in_sas[__ii]; \ 104 #define FOR_EACH_IPSEC_PROTECT_INPUT_SA(_itp, _sa, body) \ 107 for (__ii = 0; __ii < _itp->itp_n_sa_in; __ii++) { \ 108 _sa = ipsec_sa_get(itp->itp_in_sas[__ii]); \ 174 return (ipsec_tun_protect_sa_by_adj_index[ai]);
walk_rc_t(* ipsec_tun_protect_walk_cb_t)(index_t itpi, void *arg)
struct ipsec_tun_lkup_result_t_ ipsec_tun_lkup_result_t
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
vlib_node_registration_t ipsec6_tun_input_node
(constructor) VLIB_REGISTER_NODE (ipsec6_tun_input_node)
int ipsec_tun_protect_del(u32 sw_if_index, const ip_address_t *nh)
struct ipsec_tun_protect_t_ ipsec_tun_protect_t
int ipsec_tun_protect_update_one(u32 sw_if_index, const ip_address_t *nh, u32 sa_out, u32 sa_in)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
enum walk_rc_t_ walk_rc_t
Walk return code.
typedef CLIB_PACKED(struct { union { struct { ip4_address_t remote_ip;u32 spi;};u64 as_u64;};}) ipsec4_tunnel_key_t
#define foreach_ipsec_protect_flags
u8 * format_ipsec_tun_protect_index(u8 *s, va_list *args)
int ipsec_tun_protect_update_out(u32 sw_if_index, const ip_address_t *nh, u32 sa_out)
vlib_node_registration_t ipsec4_tun_input_node
(constructor) VLIB_REGISTER_NODE (ipsec4_tun_input_node)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static index_t ipsec_tun_protect_get_sa_out(adj_index_t ai)
int ipsec_tun_protect_update_in(u32 sw_if_index, const ip_address_t *nh, u32 sa_in)
void ipsec_tun_unregister_nodes(ip_address_family_t af)
u8 * format_ipsec_tun_protect(u8 *s, va_list *args)
u8 * format_ipsec6_tunnel_key(u8 *s, va_list *args)
u32 adj_index_t
An index for adjacencies.
ipsec_tun_protect_t * ipsec_tun_protect_pool
Pool of tunnel protection objects.
static ipsec_tun_protect_t * ipsec_tun_protect_get(u32 index)
struct ipsec_ep_t_ ipsec_ep_t
void ipsec_tun_protect_walk(ipsec_tun_protect_walk_cb_t fn, void *cttx)
void ipsec_tun_register_nodes(ip_address_family_t af)
u8 * format_ipsec4_tunnel_key(u8 *s, va_list *args)
enum ip_address_family_t_ ip_address_family_t
struct _vlib_node_registration vlib_node_registration_t
void ipsec_tun_protect_walk_itf(u32 sw_if_index, ipsec_tun_protect_walk_cb_t fn, void *cttx)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
ipsec_protect_flags_t itp_flags
u8 * format_ipsec_tun_protect_flags(u8 *s, va_list *args)
index_t * ipsec_tun_protect_sa_by_adj_index
Adj index to TX SA mapping.
vl_api_interface_index_t sw_if_index
enum ipsec_protect_flags_t_ ipsec_protect_flags_t
int ipsec_tun_protect_update(u32 sw_if_index, const ip_address_t *nh, u32 sa_out, u32 *sa_ins)