netfilter: xtables: add struct xt_mtchk_param::net
[safe/jmp/linux-2.6] / include / linux / crypto.h
index 29729b8..24d2e30 100644 (file)
@@ -40,6 +40,7 @@
 #define CRYPTO_ALG_TYPE_SHASH          0x00000009
 #define CRYPTO_ALG_TYPE_AHASH          0x0000000a
 #define CRYPTO_ALG_TYPE_RNG            0x0000000c
+#define CRYPTO_ALG_TYPE_PCOMPRESS      0x0000000f
 
 #define CRYPTO_ALG_TYPE_HASH_MASK      0x0000000e
 #define CRYPTO_ALG_TYPE_AHASH_MASK     0x0000000c
@@ -114,7 +115,6 @@ struct crypto_async_request;
 struct crypto_aead;
 struct crypto_blkcipher;
 struct crypto_hash;
-struct crypto_ahash;
 struct crypto_rng;
 struct crypto_tfm;
 struct crypto_type;
@@ -145,16 +145,6 @@ struct ablkcipher_request {
        void *__ctx[] CRYPTO_MINALIGN_ATTR;
 };
 
-struct ahash_request {
-       struct crypto_async_request base;
-
-       unsigned int nbytes;
-       struct scatterlist *src;
-       u8                 *result;
-
-       void *__ctx[] CRYPTO_MINALIGN_ATTR;
-};
-
 /**
  *     struct aead_request - AEAD request
  *     @base: Common attributes for async crypto requests
@@ -219,18 +209,6 @@ struct ablkcipher_alg {
        unsigned int ivsize;
 };
 
-struct ahash_alg {
-       int (*init)(struct ahash_request *req);
-       int (*reinit)(struct ahash_request *req);
-       int (*update)(struct ahash_request *req);
-       int (*final)(struct ahash_request *req);
-       int (*digest)(struct ahash_request *req);
-       int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
-                       unsigned int keylen);
-
-       unsigned int digestsize;
-};
-
 struct aead_alg {
        int (*setkey)(struct crypto_aead *tfm, const u8 *key,
                      unsigned int keylen);
@@ -272,29 +250,6 @@ struct cipher_alg {
        void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
 };
 
-struct digest_alg {
-       unsigned int dia_digestsize;
-       void (*dia_init)(struct crypto_tfm *tfm);
-       void (*dia_update)(struct crypto_tfm *tfm, const u8 *data,
-                          unsigned int len);
-       void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
-       int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
-                         unsigned int keylen);
-};
-
-struct hash_alg {
-       int (*init)(struct hash_desc *desc);
-       int (*update)(struct hash_desc *desc, struct scatterlist *sg,
-                     unsigned int nbytes);
-       int (*final)(struct hash_desc *desc, u8 *out);
-       int (*digest)(struct hash_desc *desc, struct scatterlist *sg,
-                     unsigned int nbytes, u8 *out);
-       int (*setkey)(struct crypto_hash *tfm, const u8 *key,
-                     unsigned int keylen);
-
-       unsigned int digestsize;
-};
-
 struct compress_alg {
        int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
                            unsigned int slen, u8 *dst, unsigned int *dlen);
@@ -315,9 +270,6 @@ struct rng_alg {
 #define cra_aead       cra_u.aead
 #define cra_blkcipher  cra_u.blkcipher
 #define cra_cipher     cra_u.cipher
-#define cra_digest     cra_u.digest
-#define cra_hash       cra_u.hash
-#define cra_ahash      cra_u.ahash
 #define cra_compress   cra_u.compress
 #define cra_rng                cra_u.rng
 
@@ -343,9 +295,6 @@ struct crypto_alg {
                struct aead_alg aead;
                struct blkcipher_alg blkcipher;
                struct cipher_alg cipher;
-               struct digest_alg digest;
-               struct hash_alg hash;
-               struct ahash_alg ahash;
                struct compress_alg compress;
                struct rng_alg rng;
        } cra_u;
@@ -432,18 +381,6 @@ struct hash_tfm {
        unsigned int digestsize;
 };
 
-struct ahash_tfm {
-       int (*init)(struct ahash_request *req);
-       int (*update)(struct ahash_request *req);
-       int (*final)(struct ahash_request *req);
-       int (*digest)(struct ahash_request *req);
-       int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
-                       unsigned int keylen);
-
-       unsigned int digestsize;
-       unsigned int reqsize;
-};
-
 struct compress_tfm {
        int (*cot_compress)(struct crypto_tfm *tfm,
                            const u8 *src, unsigned int slen,
@@ -464,7 +401,6 @@ struct rng_tfm {
 #define crt_blkcipher  crt_u.blkcipher
 #define crt_cipher     crt_u.cipher
 #define crt_hash       crt_u.hash
-#define crt_ahash      crt_u.ahash
 #define crt_compress   crt_u.compress
 #define crt_rng                crt_u.rng
 
@@ -478,7 +414,6 @@ struct crypto_tfm {
                struct blkcipher_tfm blkcipher;
                struct cipher_tfm cipher;
                struct hash_tfm hash;
-               struct ahash_tfm ahash;
                struct compress_tfm compress;
                struct rng_tfm rng;
        } crt_u;
@@ -769,7 +704,7 @@ static inline struct ablkcipher_request *ablkcipher_request_alloc(
 
 static inline void ablkcipher_request_free(struct ablkcipher_request *req)
 {
-       kfree(req);
+       kzfree(req);
 }
 
 static inline void ablkcipher_request_set_callback(
@@ -900,7 +835,7 @@ static inline struct aead_request *aead_request_alloc(struct crypto_aead *tfm,
 
 static inline void aead_request_free(struct aead_request *req)
 {
-       kfree(req);
+       kzfree(req);
 }
 
 static inline void aead_request_set_callback(struct aead_request *req,