aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-06 19:49:12 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:16:30 +1000
commit9409f38a0c8773c04bff8dda8c552d7ea013d956 (patch)
tree694ad993535d6dcfd479f9b5cb4faab64c12fcd7
parent[CRYPTO] api: Add crypto_alg reference counting (diff)
downloadlinux-dev-9409f38a0c8773c04bff8dda8c552d7ea013d956.tar.xz
linux-dev-9409f38a0c8773c04bff8dda8c552d7ea013d956.zip
[IPSEC]: Move linux/crypto.h inclusion out of net/xfrm.h
The header file linux/crypto.h is only needed by a few files so including it in net/xfrm.h (which is included by half of the networking stack) is a waste. This patch moves it out of net/xfrm.h and into the specific header files that actually need it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--include/net/ah.h1
-rw-r--r--include/net/esp.h1
-rw-r--r--include/net/ipcomp.h4
-rw-r--r--include/net/xfrm.h2
-rw-r--r--net/xfrm/xfrm_user.c1
5 files changed, 8 insertions, 1 deletions
diff --git a/include/net/ah.h b/include/net/ah.h
index ceff00afae09..8e27c9ba8b84 100644
--- a/include/net/ah.h
+++ b/include/net/ah.h
@@ -1,6 +1,7 @@
#ifndef _NET_AH_H
#define _NET_AH_H
+#include <linux/crypto.h>
#include <net/xfrm.h>
/* This is the maximum truncated ICV length that we know of. */
diff --git a/include/net/esp.h b/include/net/esp.h
index 90cd94fad7d9..6eb837973c84 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -1,6 +1,7 @@
#ifndef _NET_ESP_H
#define _NET_ESP_H
+#include <linux/crypto.h>
#include <net/xfrm.h>
#include <asm/scatterlist.h>
diff --git a/include/net/ipcomp.h b/include/net/ipcomp.h
index e651a57ecdd5..b94e3047b4d9 100644
--- a/include/net/ipcomp.h
+++ b/include/net/ipcomp.h
@@ -1,8 +1,12 @@
#ifndef _NET_IPCOMP_H
#define _NET_IPCOMP_H
+#include <linux/types.h>
+
#define IPCOMP_SCRATCH_SIZE 65400
+struct crypto_tfm;
+
struct ipcomp_data {
u16 threshold;
struct crypto_tfm **tfms;
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 9c5ee9f20b65..10396b4bde14 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -8,7 +8,6 @@
#include <linux/list.h>
#include <linux/skbuff.h>
#include <linux/socket.h>
-#include <linux/crypto.h>
#include <linux/pfkeyv2.h>
#include <linux/in6.h>
#include <linux/mutex.h>
@@ -985,6 +984,7 @@ extern struct xfrm_algo_desc *xfrm_ealg_get_byname(char *name, int probe);
extern struct xfrm_algo_desc *xfrm_calg_get_byname(char *name, int probe);
struct crypto_tfm;
+struct scatterlist;
typedef void (icv_update_fn_t)(struct crypto_tfm *, struct scatterlist *, unsigned int);
extern void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 3e6a722d072e..7d18ca03c80d 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -10,6 +10,7 @@
*
*/
+#include <linux/crypto.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>