30 u32 dev_instance = va_arg (*args,
u32);
31 return format (s,
"ipsec%d", dev_instance);
38 clib_warning (
"you shouldn't be here, leaking buffers...");
111 (
u8 *) args,
sizeof (*args));
122 u32 hw_if_index = ~0;
133 return VNET_API_ERROR_INVALID_VALUE;
136 memset (t, 0,
sizeof (*t));
139 memset (sa, 0,
sizeof (*sa));
164 return VNET_API_ERROR_SYSCALL_ERROR_1;
167 memset (sa, 0,
sizeof (*sa));
193 return VNET_API_ERROR_SYSCALL_ERROR_1;
210 ipsec_hw_class.index,
229 return VNET_API_ERROR_INVALID_VALUE;
241 return VNET_API_ERROR_SYSCALL_ERROR_1;
249 return VNET_API_ERROR_SYSCALL_ERROR_1;
272 return VNET_API_ERROR_INVALID_VALUE;
277 return VNET_API_ERROR_INVALID_VALUE;
292 return VNET_API_ERROR_INVALID_VALUE;
295 memset (t, 0,
sizeof (*t));
312 return VNET_API_ERROR_INVALID_VALUE;
342 return VNET_API_ERROR_SYSCALL_ERROR_1;
353 return VNET_API_ERROR_SYSCALL_ERROR_1;
364 return VNET_API_ERROR_SYSCALL_ERROR_1;
375 return VNET_API_ERROR_SYSCALL_ERROR_1;
378 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
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
#define hash_unset(h, key)
i32(* add_del_sa_sess_cb)(u32 sa_index, u8 is_add)
vnet_main_t * vnet_get_main(void)
vlib_node_registration_t ipsec_if_output_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_output_node)
ipsec_integ_alg_t integ_alg
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
#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)
#define VNET_HW_INTERFACE_FLAG_LINK_UP
void ip4_register_protocol(u32 protocol, u32 node_index)
#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)
#define VLIB_INIT_FUNCTION(x)
ipsec_main_callbacks_t cb
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)
static clib_error_t * ipsec_admin_up_down_function(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
clib_error_t *(* check_support_cb)(ipsec_sa_t *sa)
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)
vlib_node_registration_t ipsec_if_input_node
(constructor) VLIB_REGISTER_NODE (ipsec_if_input_node)
#define clib_warning(format, args...)
#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)
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
static int ipsec_add_del_tunnel_if_rpc_callback(ipsec_add_del_tunnel_args_t *a)
ipsec_integ_alg_t integ_alg
#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
u8 * format_ipsec_if_output_trace(u8 *s, va_list *args)
static uword pool_elts(void *v)
Number of active elements in a pool.