summaryrefslogtreecommitdiff
path: root/sys/opencrypto
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2006-05-22 07:49:42 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2006-05-22 07:49:42 +0000
commit3aaf7145c5691a7ed30ec7ad132dc2a7f5e42284 (patch)
tree02d74c444cd39224d7f6bccdcfaab74cd39cee7d /sys/opencrypto
parentbda0abc6273d5a1130b8c69a06aee048b93dffaf (diff)
Notes
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/cryptodev.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h
index 919a7171347e..dec754a7a3ff 100644
--- a/sys/opencrypto/cryptodev.h
+++ b/sys/opencrypto/cryptodev.h
@@ -305,10 +305,17 @@ struct cryptkop {
int (*krp_callback)(struct cryptkop *);
};
-/* Crypto capabilities structure */
+/*
+ * Crypto capabilities structure.
+ *
+ * Synchronization:
+ * (d) - protected by CRYPTO_DRIVER_LOCK()
+ * (q) - protected by CRYPTO_Q_LOCK()
+ * Not tagged fields are read-only.
+ */
struct cryptocap {
- u_int32_t cc_sessions;
- u_int32_t cc_koperations;
+ u_int32_t cc_sessions; /* (d) number of sessions */
+ u_int32_t cc_koperations; /* (d) number os asym operations */
/*
* Largest possible operator length (in bits) for each type of
@@ -320,12 +327,12 @@ struct cryptocap {
u_int8_t cc_kalg[CRK_ALGORITHM_MAX + 1];
- u_int8_t cc_flags;
- u_int8_t cc_qblocked; /* symmetric q blocked */
- u_int8_t cc_kqblocked; /* asymmetric q blocked */
+ u_int8_t cc_flags; /* (d) flags */
#define CRYPTOCAP_F_CLEANUP 0x01 /* needs resource cleanup */
#define CRYPTOCAP_F_SOFTWARE 0x02 /* software implementation */
#define CRYPTOCAP_F_SYNC 0x04 /* operates synchronously */
+ u_int8_t cc_qblocked; /* (q) symmetric q blocked */
+ u_int8_t cc_kqblocked; /* (q) asymmetric q blocked */
void *cc_arg; /* callback argument */
int (*cc_newsession)(void*, u_int32_t*, struct cryptoini*);