diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 05:53:16 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-08 06:58:29 -0400 |
commit | d06854f0243d91badabaab14503f7f3bb770061d (patch) | |
tree | 252603fecb02a8cc4933b0e582444ff7cb504018 /include/crypto/algapi.h | |
parent | 942969992d86330c9700e2cd9afe8a6bea42df78 (diff) |
crypto: api - Add crypto_attr_alg2 helper
This patch adds the helper crypto_attr_alg2 which is similar to
crypto_attr_alg but takes an extra frontend argument. This is
intended to be used by new style algorithm types such as shash.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r-- | include/crypto/algapi.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index c9bff92a9e0e..1d15a926041e 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
@@ -136,7 +136,16 @@ static inline void crypto_set_spawn(struct crypto_spawn *spawn, | |||
136 | struct crypto_attr_type *crypto_get_attr_type(struct rtattr **tb); | 136 | struct crypto_attr_type *crypto_get_attr_type(struct rtattr **tb); |
137 | int crypto_check_attr_type(struct rtattr **tb, u32 type); | 137 | int crypto_check_attr_type(struct rtattr **tb, u32 type); |
138 | const char *crypto_attr_alg_name(struct rtattr *rta); | 138 | const char *crypto_attr_alg_name(struct rtattr *rta); |
139 | struct crypto_alg *crypto_attr_alg(struct rtattr *rta, u32 type, u32 mask); | 139 | struct crypto_alg *crypto_attr_alg2(struct rtattr *rta, |
140 | const struct crypto_type *frontend, | ||
141 | u32 type, u32 mask); | ||
142 | |||
143 | static inline struct crypto_alg *crypto_attr_alg(struct rtattr *rta, | ||
144 | u32 type, u32 mask) | ||
145 | { | ||
146 | return crypto_attr_alg2(rta, NULL, type, mask); | ||
147 | } | ||
148 | |||
140 | int crypto_attr_u32(struct rtattr *rta, u32 *num); | 149 | int crypto_attr_u32(struct rtattr *rta, u32 *num); |
141 | void *crypto_alloc_instance2(const char *name, struct crypto_alg *alg, | 150 | void *crypto_alloc_instance2(const char *name, struct crypto_alg *alg, |
142 | unsigned int head); | 151 | unsigned int head); |