aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-06-20 16:18:08 -0400
committerDavid S. Miller <davem@davemloft.net>2005-06-20 16:18:08 -0400
commit72cb6962a91f2af9eef69a06198e1949c10259ae (patch)
tree3ae65d1c4e7d7cb7ac05bfc6f457312df45f6996 /include/net
parent3f7a87d2fa9b42f7aade43914f060df68cc89cc7 (diff)
[IPSEC]: Add xfrm_init_state
This patch adds xfrm_init_state which is simply a wrapper that calls xfrm_get_type and subsequently x->type->init_state. It also gets rid of the unused args argument. Abstracting it out allows us to add common initialisation code, e.g., to set family-specific flags. The add_time setting in xfrm_user.c was deleted because it's already set by xfrm_state_alloc. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: James Morris <jmorris@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/xfrm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 0e65e02b7a1d..77bfdde440f8 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -225,7 +225,7 @@ struct xfrm_type
225 struct module *owner; 225 struct module *owner;
226 __u8 proto; 226 __u8 proto;
227 227
228 int (*init_state)(struct xfrm_state *x, void *args); 228 int (*init_state)(struct xfrm_state *x);
229 void (*destructor)(struct xfrm_state *); 229 void (*destructor)(struct xfrm_state *);
230 int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); 230 int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb);
231 int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); 231 int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb);
@@ -839,6 +839,7 @@ extern int xfrm_replay_check(struct xfrm_state *x, u32 seq);
839extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); 839extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq);
840extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); 840extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb);
841extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); 841extern int xfrm_state_mtu(struct xfrm_state *x, int mtu);
842extern int xfrm_init_state(struct xfrm_state *x);
842extern int xfrm4_rcv(struct sk_buff *skb); 843extern int xfrm4_rcv(struct sk_buff *skb);
843extern int xfrm4_output(struct sk_buff *skb); 844extern int xfrm4_output(struct sk_buff *skb);
844extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); 845extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);