aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/crypto/engine.h')
-rw-r--r--src/vnet/crypto/engine.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/vnet/crypto/engine.h b/src/vnet/crypto/engine.h
new file mode 100644
index 00000000000..993befb393a
--- /dev/null
+++ b/src/vnet/crypto/engine.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: Apache-2.0
+ * Copyright (c) 2024 Cisco Systems, Inc.
+ */
+
+#ifndef included_vnet_crypto_engine_h
+#define included_vnet_crypto_engine_h
+
+#ifndef included_clib_types_h
+typedef unsigned int u32;
+#endif
+
+typedef struct
+{
+ vnet_crypto_op_id_t opt;
+ vnet_crypto_ops_handler_t *fn;
+ vnet_crypto_chained_ops_handler_t *cfn;
+} vnet_crypto_engine_op_handlers_t;
+
+struct vnet_crypto_engine_registration;
+
+typedef char *(
+ vnet_crypto_engine_init_fn_t) (struct vnet_crypto_engine_registration *);
+
+typedef struct vnet_crypto_engine_registration
+{
+ char name[32]; /* backend name */
+ char desc[128]; /* backend name */
+ int prio;
+ u32 version;
+ u32 per_thread_data_sz;
+ u32 num_threads;
+ void *per_thread_data;
+ vnet_crypto_engine_init_fn_t *init_fn;
+ vnet_crypto_key_handler_t *key_handler;
+ vnet_crypto_engine_op_handlers_t *op_handlers;
+} vnet_crypto_engine_registration_t;
+
+#define VNET_CRYPTO_ENGINE_REGISTRATION() \
+ __clib_export vnet_crypto_engine_registration_t __vnet_crypto_engine
+
+#endif