aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-18 00:31:12 -0400
committerDavid S. Miller <davem@davemloft.net>2007-10-18 00:31:12 -0400
commitaa5d62cc8777f733f8b59b5586c0a1989813189e (patch)
treee04d5c0032e7460031cb83162db64fc68244af3a /include/net
parent440725000cba0b1a68ca2df20124be3a5b7f7702 (diff)
[IPSEC]: Move type and mode map into xfrm_state.c
The type and mode maps are only used by SAs, not policies. So it makes sense to move them from xfrm_policy.c into xfrm_state.c. This also allows us to mark xfrm_get_type/xfrm_put_type/xfrm_get_mode/xfrm_put_mode as static. The only other change I've made in the move is to get rid of the casts on the request_module call for types. They're unnecessary because C will promote them to ints anyway. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/xfrm.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d8974ca19032..7f156a0b94c8 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -228,8 +228,6 @@ struct xfrm_type;
228struct xfrm_dst; 228struct xfrm_dst;
229struct xfrm_policy_afinfo { 229struct xfrm_policy_afinfo {
230 unsigned short family; 230 unsigned short family;
231 struct xfrm_type *type_map[IPPROTO_MAX];
232 struct xfrm_mode *mode_map[XFRM_MODE_MAX];
233 struct dst_ops *dst_ops; 231 struct dst_ops *dst_ops;
234 void (*garbage_collect)(void); 232 void (*garbage_collect)(void);
235 int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl); 233 int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl);
@@ -256,6 +254,8 @@ extern int __xfrm_state_delete(struct xfrm_state *x);
256 254
257struct xfrm_state_afinfo { 255struct xfrm_state_afinfo {
258 unsigned short family; 256 unsigned short family;
257 struct xfrm_type *type_map[IPPROTO_MAX];
258 struct xfrm_mode *mode_map[XFRM_MODE_MAX];
259 int (*init_flags)(struct xfrm_state *x); 259 int (*init_flags)(struct xfrm_state *x);
260 void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl, 260 void (*init_tempsel)(struct xfrm_state *x, struct flowi *fl,
261 struct xfrm_tmpl *tmpl, 261 struct xfrm_tmpl *tmpl,
@@ -295,8 +295,6 @@ struct xfrm_type
295 295
296extern int xfrm_register_type(struct xfrm_type *type, unsigned short family); 296extern int xfrm_register_type(struct xfrm_type *type, unsigned short family);
297extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family); 297extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family);
298extern struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family);
299extern void xfrm_put_type(struct xfrm_type *type);
300 298
301struct xfrm_mode { 299struct xfrm_mode {
302 int (*input)(struct xfrm_state *x, struct sk_buff *skb); 300 int (*input)(struct xfrm_state *x, struct sk_buff *skb);
@@ -320,8 +318,6 @@ struct xfrm_mode {
320 318
321extern int xfrm_register_mode(struct xfrm_mode *mode, int family); 319extern int xfrm_register_mode(struct xfrm_mode *mode, int family);
322extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family); 320extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family);
323extern struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family);
324extern void xfrm_put_mode(struct xfrm_mode *mode);
325 321
326struct xfrm_tmpl 322struct xfrm_tmpl
327{ 323{