43 u32 dev_instance = va_arg (*args,
u32);
44 return format (s,
"ipsec%d", dev_instance);
51 clib_warning (
"you shouldn't be here, leaking buffers...");
90 (
u8 *) args,
sizeof (*args));
101 u32 hw_if_index = ~0;
112 return VNET_API_ERROR_INVALID_VALUE;
115 memset (t, 0,
sizeof (*t));
118 memset (sa, 0,
sizeof (*sa));
144 memset (sa, 0,
sizeof (*sa));
185 ipsec_hw_class.index,
204 return VNET_API_ERROR_INVALID_VALUE;
215 return VNET_API_ERROR_SYSCALL_ERROR_1;
222 return VNET_API_ERROR_SYSCALL_ERROR_1;
245 return VNET_API_ERROR_INVALID_VALUE;
250 return VNET_API_ERROR_INVALID_VALUE;
265 return VNET_API_ERROR_INVALID_VALUE;
268 memset (t, 0,
sizeof (*t));
285 return VNET_API_ERROR_INVALID_VALUE;
314 return VNET_API_ERROR_SYSCALL_ERROR_1;
324 return VNET_API_ERROR_SYSCALL_ERROR_1;
334 return VNET_API_ERROR_SYSCALL_ERROR_1;
344 return VNET_API_ERROR_SYSCALL_ERROR_1;
347 return VNET_API_ERROR_INVALID_VALUE;
VNET_DEVICE_CLASS(ipsec_device_class, static)
#define hash_set(h, key, value)
ipsec_tunnel_if_t * tunnel_interfaces
ip46_address_t tunnel_src_addr
#define hash_unset(h, key)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
ipsec_integ_alg_t integ_alg
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
u8 * format_ipsec_if_output_trace(u8 *s, va_list *args)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
u8 remote_crypto_key[128]
int ipsec_add_del_tunnel_if(ipsec_add_del_tunnel_args_t *args)
static int ipsec_add_del_tunnel_if_internal(vnet_main_t *vnm, ipsec_add_del_tunnel_args_t *args)
static uword dummy_interface_tx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
void ip4_register_protocol(u32 protocol, u32 node_index)
vlib_node_registration_t ipsec_if_input_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_input_node)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
uword * ipsec_if_pool_index_by_key
clib_error_t * ipsec_tunnel_if_init(vlib_main_t *vm)
vnet_main_t * vnet_get_main(void)
#define VLIB_INIT_FUNCTION(x)
#define clib_warning(format, 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)
u32 vnet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
uword os_get_cpu_number(void)
#define pool_put(P, E)
Free an object E in pool P.
ip46_address_t tunnel_dst_addr
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
ipsec_crypto_alg_t crypto_alg
void vl_api_rpc_call_main_thread(void *fp, u8 *data, u32 data_length)
#define clib_memcpy(a, b, c)
uword * sa_index_by_sa_id
u8 * default_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
Return a complete, zero-length (aka dummy) rewrite.
int ipsec_add_del_ipsec_gre_tunnel(vnet_main_t *vnm, ipsec_add_del_ipsec_gre_tunnel_args_t *args)
#define hash_create(elts, value_bytes)
static int ipsec_add_del_tunnel_if_rpc_callback(ipsec_add_del_tunnel_args_t *a)
ipsec_integ_alg_t integ_alg
static int add_del_sa_sess(u32 sa_index, u8 is_add)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
VNET_HW_INTERFACE_CLASS(ipsec_hw_class)
u32 * free_tunnel_if_indices
ipsec_crypto_alg_t crypto_alg
static u8 * format_ipsec_name(u8 *s, va_list *args)
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
#define CLIB_CACHE_LINE_BYTES
vlib_node_registration_t ipsec_if_output_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_output_node)
static uword pool_elts(void *v)
Number of active elements in a pool.