19 #define IPSEC_FLAG_IPSEC_GRE_TUNNEL (1 << 0) 21 #define foreach_ipsec_policy_action \ 22 _(0, BYPASS, "bypass") \ 23 _(1, DISCARD, "discard") \ 24 _(2, RESOLVE, "resolve") \ 25 _(3, PROTECT, "protect") 29 #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") 43 #define _(v,f,s) IPSEC_CRYPTO_ALG_##f = v, 49 #define foreach_ipsec_integ_alg \ 51 _(1, MD5_96, "md5-96") \ 52 _(2, SHA1_96, "sha1-96") \ 53 _(3, SHA_256_96, "sha-256-96") \ 54 _(4, SHA_256_128, "sha-256-128") \ 55 _(5, SHA_384_192, "sha-384-192") \ 56 _(6, SHA_512_256, "sha-512-256") 60 #define _(v,f,s) IPSEC_INTEG_ALG_##f = v, 122 u8 local_crypto_key[128];
124 u8 remote_crypto_key[128];
127 u8 local_integ_key[128];
129 u8 remote_integ_key[128];
223 u32 feature_next_node_index[32];
319 #define _(sym, str) (u8 *) str, 324 count_trailing_zeros (next_feature,
335 vnet_buffer (b)->output_features.bitmap &= ~(1 << next_feature);
u32 * ipv6_inbound_protect_policy_indices
u8 * format_ipsec_replay_window(u8 *s, va_list *args)
#define foreach_ipsec_integ_alg
u32 * ipv4_inbound_protect_policy_indices
ipsec_tunnel_if_t * tunnel_interfaces
ip46_address_t tunnel_src_addr
uword * tunnel_index_by_key
#define INTF_OUTPUT_FEAT_DONE
static vlib_main_t * vlib_get_main(void)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define foreach_ipsec_crypto_alg
u32 vlib_buffer_alloc_from_free_list(vlib_main_t *vm, u32 *buffers, u32 n_buffers, u32 free_list_index)
Allocate buffers from specific freelist into supplied array.
int ipsec_add_del_sa(vlib_main_t *vm, ipsec_sa_t *new_sa, int is_add)
ipsec_integ_alg_t integ_alg
u32 ipsec_get_sa_index_by_sa_id(u32 sa_id)
Combined counter to hold both packets and byte differences.
struct _vlib_node_registration vlib_node_registration_t
uword unformat_ipsec_integ_alg(unformat_input_t *input, va_list *args)
u32 * ipv4_outbound_policies
int ipsec_set_interface_spd(vlib_main_t *vm, u32 sw_if_index, u32 spd_id, int is_add)
static void ipsec_alloc_empty_buffers(vlib_main_t *vm, ipsec_main_t *im)
uword * ipsec_if_pool_index_by_key
#define vec_alloc(V, N)
Allocate space for N more elements (no header, unspecified alignment)
uword * spd_index_by_sw_if_index
vlib_node_registration_t ipsec_if_input_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_input_node)
#define static_always_inline
u8 * format_ipsec_integ_alg(u8 *s, va_list *args)
ipsec_policy_t * policies
int ipsec_add_del_policy(vlib_main_t *vm, ipsec_policy_t *policy, int is_add)
u32 ip4_lookup_node_index
static_always_inline u32 get_next_output_feature_node_index(vnet_main_t *vnm, vlib_buffer_t *b)
u32 error_drop_node_index
vlib_node_registration_t esp_encrypt_node
(constructor) VLIB_REGISTER_NODE (esp_encrypt_node)
uword unformat_ipsec_policy_action(unformat_input_t *input, va_list *args)
uword os_get_cpu_number(void)
int ipsec_set_sa_key(vlib_main_t *vm, ipsec_sa_t *sa_update)
ip46_address_range_t laddr
u8 * format_ipsec_if_output_trace(u8 *s, va_list *args)
uword * spd_index_by_spd_id
ip46_address_t tunnel_dst_addr
vlib_node_registration_t ipsec_if_output_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_output_node)
ipsec_crypto_alg_t crypto_alg
u32 esp_encrypt_node_index
uword * sa_index_by_sa_id
int ipsec_add_del_spd(vlib_main_t *vm, u32 spd_id, int is_add)
ip46_address_range_t raddr
#define VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX
#define foreach_ipsec_policy_action
ipsec_integ_alg_t integ_alg
ipsec_protocol_t protocol
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
int ipsec_add_del_ipsec_gre_tunnel(vnet_main_t *vnm, ipsec_add_del_ipsec_gre_tunnel_args_t *args)
u32 * ipv4_inbound_policy_discard_and_bypass_indices
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u8 * format_ipsec_policy_action(u8 *s, va_list *args)
u32 * free_tunnel_if_indices
u32 * ipv6_inbound_policy_discard_and_bypass_indices
u32 * ipv6_outbound_policies
#define foreach_intf_output_feat
ipsec_crypto_alg_t crypto_alg
u32 vlib_buffer_free_list_index
u8 * format_ipsec_crypto_alg(u8 *s, va_list *args)
uword unformat_ipsec_crypto_alg(unformat_input_t *input, va_list *args)
int ipsec_set_interface_key(vnet_main_t *vnm, u32 hw_if_index, ipsec_if_set_key_type_t type, u8 alg, u8 *key)
int ipsec_add_del_tunnel_if(ipsec_add_del_tunnel_args_t *args)
vlib_node_registration_t esp_decrypt_node
(constructor) VLIB_REGISTER_NODE (esp_decrypt_node)