18 #define IPSEC_FLAG_IPSEC_GRE_TUNNEL (1 << 0) 20 #define foreach_ipsec_policy_action \ 21 _(0, BYPASS, "bypass") \ 22 _(1, DISCARD, "discard") \ 23 _(2, RESOLVE, "resolve") \ 24 _(3, PROTECT, "protect") 28 #define _(v,f,s) IPSEC_POLICY_ACTION_##f = v, 35 #define foreach_ipsec_crypto_alg \ 37 _(1, AES_CBC_128, "aes-cbc-128") \ 38 _(2, AES_CBC_192, "aes-cbc-192") \ 39 _(3, AES_CBC_256, "aes-cbc-256") \ 40 _(4, AES_GCM_128, "aes-gcm-128") 42 #define foreach_ipsec_crypto_alg \ 44 _(1, AES_CBC_128, "aes-cbc-128") \ 45 _(2, AES_CBC_192, "aes-cbc-192") \ 46 _(3, AES_CBC_256, "aes-cbc-256") 51 #define _(v,f,s) IPSEC_CRYPTO_ALG_##f = v, 58 #define foreach_ipsec_integ_alg \ 60 _(1, MD5_96, "md5-96") \ 61 _(2, SHA1_96, "sha1-96") \ 62 _(3, SHA_256_96, "sha-256-96") \ 63 _(4, SHA_256_128, "sha-256-128") \ 64 _(5, SHA_384_192, "sha-384-192") \ 65 _(6, SHA_512_256, "sha-512-256") \ 66 _(7, AES_GCM_128, "aes-gcm-128") 68 #define foreach_ipsec_integ_alg \ 70 _(1, MD5_96, "md5-96") \ 71 _(2, SHA1_96, "sha1-96") \ 72 _(3, SHA_256_96, "sha-256-96") \ 73 _(4, SHA_256_128, "sha-256-128") \ 74 _(5, SHA_384_192, "sha-384-192") \ 75 _(6, SHA_512_256, "sha-512-256") 80 #define _(v,f,s) IPSEC_INTEG_ALG_##f = v, 144 u8 local_crypto_key[128];
146 u8 remote_crypto_key[128];
149 u8 local_integ_key[128];
151 u8 remote_integ_key[128];
245 u32 feature_next_node_index[32];
u32 * ipv6_inbound_protect_policy_indices
u32 * ipv4_inbound_protect_policy_indices
ipsec_tunnel_if_t * tunnel_interfaces
ip46_address_t tunnel_src_addr
uword * tunnel_index_by_key
static vlib_main_t * vlib_get_main(void)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
int ipsec_add_del_policy(vlib_main_t *vm, ipsec_policy_t *policy, int is_add)
u32 ipsec_get_sa_index_by_sa_id(u32 sa_id)
ipsec_integ_alg_t integ_alg
u8 * format_ipsec_if_output_trace(u8 *s, va_list *args)
Combined counter to hold both packets and byte differences.
struct _vlib_node_registration vlib_node_registration_t
u32 * ipv4_outbound_policies
vlib_node_registration_t ipsec_if_input_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_input_node)
uword unformat_ipsec_integ_alg(unformat_input_t *input, va_list *args)
uword * ipsec_if_pool_index_by_key
int ipsec_add_del_ipsec_gre_tunnel(vnet_main_t *vnm, ipsec_add_del_ipsec_gre_tunnel_args_t *args)
#define vec_alloc(V, N)
Allocate space for N more elements (no header, unspecified alignment)
uword unformat_ipsec_crypto_alg(unformat_input_t *input, va_list *args)
static void ipsec_alloc_empty_buffers(vlib_main_t *vm, ipsec_main_t *im)
uword * spd_index_by_sw_if_index
#define static_always_inline
int ipsec_set_interface_key(vnet_main_t *vnm, u32 hw_if_index, ipsec_if_set_key_type_t type, u8 alg, u8 *key)
#define foreach_ipsec_policy_action
ipsec_policy_t * policies
u32 ip4_lookup_node_index
u8 * format_ipsec_replay_window(u8 *s, va_list *args)
u32 error_drop_node_index
static_always_inline u32 get_next_output_feature_node_index(vlib_buffer_t *b, vlib_node_runtime_t *nr)
uword os_get_cpu_number(void)
ip46_address_range_t laddr
static_always_inline void vnet_feature_next(u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
uword * spd_index_by_spd_id
ip46_address_t tunnel_dst_addr
ipsec_crypto_alg_t crypto_alg
int ipsec_add_del_sa(vlib_main_t *vm, ipsec_sa_t *new_sa, int is_add)
u32 esp_encrypt_node_index
vlib_node_registration_t esp_encrypt_node
(constructor) VLIB_REGISTER_NODE (esp_encrypt_node)
int ipsec_add_del_spd(vlib_main_t *vm, u32 spd_id, int is_add)
int ipsec_set_sa_key(vlib_main_t *vm, ipsec_sa_t *sa_update)
uword * sa_index_by_sa_id
vlib_node_registration_t esp_decrypt_node
(constructor) VLIB_REGISTER_NODE (esp_decrypt_node)
ip46_address_range_t raddr
u8 * format_ipsec_crypto_alg(u8 *s, va_list *args)
ipsec_integ_alg_t integ_alg
#define foreach_ipsec_crypto_alg
u8 * format_ipsec_policy_action(u8 *s, va_list *args)
ipsec_protocol_t protocol
u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
u8 * format_ipsec_integ_alg(u8 *s, va_list *args)
#define foreach_ipsec_integ_alg
u32 * ipv4_inbound_policy_discard_and_bypass_indices
int ipsec_add_del_tunnel_if(ipsec_add_del_tunnel_args_t *args)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u32 * free_tunnel_if_indices
u32 * ipv6_inbound_policy_discard_and_bypass_indices
u32 * ipv6_outbound_policies
ipsec_crypto_alg_t crypto_alg
int ipsec_set_interface_spd(vlib_main_t *vm, u32 sw_if_index, u32 spd_id, int is_add)
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
uword unformat_ipsec_policy_action(unformat_input_t *input, va_list *args)
vlib_node_registration_t ipsec_if_output_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_output_node)