19 #define foreach_ipsec_policy_action \ 20 _(0, BYPASS, "bypass") \ 21 _(1, DISCARD, "discard") \ 22 _(2, RESOLVE, "resolve") \ 23 _(3, PROTECT, "protect") 26 #define _(v,f,s) IPSEC_POLICY_ACTION_##f = v, 32 #define foreach_ipsec_crypto_alg \ 34 _(1, AES_CBC_128, "aes-cbc-128") \ 35 _(2, AES_CBC_192, "aes-cbc-192") \ 36 _(3, AES_CBC_256, "aes-cbc-256") 39 #define _(v,f,s) IPSEC_CRYPTO_ALG_##f = v, 45 #define foreach_ipsec_integ_alg \ 47 _(1, MD5_96, "md5-96") \ 48 _(2, SHA1_96, "sha1-96") \ 49 _(3, SHA_256_96, "sha-256-96") \ 50 _(4, SHA_256_128, "sha-256-128") \ 51 _(5, SHA_384_192, "sha-384-192") \ 52 _(6, SHA_512_256, "sha-512-256") 55 #define _(v,f,s) IPSEC_INTEG_ALG_##f = v, 96 ip46_address_t start,
stop;
187 u32 feature_next_node_index[32];
273 u8 * node_names[] = {
274 #define _(sym, str) (u8 *) str, 279 count_trailing_zeros(next_feature,
vnet_buffer(b)->output_features.bitmap);
289 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
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define foreach_ipsec_crypto_alg
int ipsec_add_del_sa(vlib_main_t *vm, ipsec_sa_t *new_sa, int is_add)
ipsec_integ_alg_t integ_alg
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)
uword * ipsec_if_pool_index_by_key
#define vec_alloc(V, N)
Allocate space for N more elements (no header, unspecified alignment)
always_inline vlib_main_t * vlib_get_main(void)
uword * spd_index_by_sw_if_index
vlib_node_registration_t ipsec_if_input_node
u32 ipsec_add_del_tunnel_if(vnet_main_t *vnm, ipsec_add_del_tunnel_args_t *args)
always_inline void ipsec_alloc_empty_buffers(vlib_main_t *vm, ipsec_main_t *im)
#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)
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.
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)
u32 esp_encrypt_node_index
always_inline vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_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_protocol_t protocol
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
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)
vlib_node_registration_t esp_decrypt_node
(constructor) VLIB_REGISTER_NODE (esp_decrypt_node)