20 #define foreach_ipsec_protect_flags \ 22 _(ENCAPED, 2, "encapped") \ 28 #define _(a,b,c) IPSEC_PROTECT_##a = b, 73 (*ip).as_u32 = k->
key >> 32;
104 #define ITP_MAX_N_SA_IN 4 129 #define FOR_EACH_IPSEC_PROTECT_INPUT_SAI(_itp, _sai, body) \ 132 for (__ii = 0; __ii < _itp->itp_n_sa_in; __ii++) { \ 133 _sai = itp->itp_in_sas[__ii]; \ 137 #define FOR_EACH_IPSEC_PROTECT_INPUT_SA(_itp, _sa, body) \ 140 for (__ii = 0; __ii < _itp->itp_n_sa_in; __ii++) { \ 141 _sa = ipsec_sa_get(itp->itp_in_sas[__ii]); \ 197 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
result of a lookup in the protection bihash
#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...
STATIC_ASSERT_SIZEOF(ipsec4_tunnel_kv_t, sizeof(clib_bihash_kv_8_16_t))
#define STRUCT_OFFSET_OF(t, f)
enum walk_rc_t_ walk_rc_t
Walk return code.
#define foreach_ipsec_protect_flags
u8 * format_ipsec_tun_protect_index(u8 *s, va_list *args)
static void ipsec4_tunnel_mk_key(ipsec4_tunnel_kv_t *k, const ip4_address_t *ip, u32 spi)
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)
struct ipsec6_tunnel_kv_t_ ipsec6_tunnel_kv_t
ipsec_tun_lkup_result_t value
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)
void ipsec_tun_table_init(ip_address_family_t af, uword table_size, u32 n_buckets)
u8 * format_ipsec_tun_protect(u8 *s, va_list *args)
ipsec_tun_lkup_result_t value
ipsec_protect_flags_t flags
8 octet key, 8 octet key value pair
u32 adj_index_t
An index for adjacencies.
ipsec_tun_protect_t * ipsec_tun_protect_pool
Pool of tunnel protection objects.
STATIC_ASSERT_OFFSET_OF(ipsec4_tunnel_kv_t, value, STRUCT_OFFSET_OF(clib_bihash_kv_8_16_t, value))
static ipsec_tun_protect_t * ipsec_tun_protect_get(u32 index)
result of a lookup in the protection bihash
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)
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...
u8 * format_ipsec4_tunnel_kv(u8 *s, va_list *args)
ipsec_protect_flags_t itp_flags
u8 * format_ipsec_tun_protect_flags(u8 *s, va_list *args)
u8 * format_ipsec6_tunnel_kv(u8 *s, va_list *args)
index_t * ipsec_tun_protect_sa_by_adj_index
Adj index to TX SA mapping.
static void ipsec4_tunnel_extract_key(const ipsec4_tunnel_kv_t *k, ip4_address_t *ip, u32 *spi)
enum ipsec_protect_flags_t_ ipsec_protect_flags_t
struct ipsec4_tunnel_kv_t ipsec4_tunnel_kv_t
int ipsec_tun_protect_update(u32 sw_if_index, const ip_address_t *nh, u32 sa_out, u32 *sa_ins)