aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-14 00:36:51 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:41 -0500
commitf04e7e8d7f175c05bbde3ae748bf2541da53721d (patch)
tree0e9a61e66fa507fc389d3e85917eaeb614cc9525 /include/net/xfrm.h
parentfff693888012806370c98c601fbaa141fb12dfca (diff)
[IPSEC]: Replace x->type->{local,remote}_addr with flags
The functions local_addr and remote_addr are more than what they're needed for. The same thing can be done easily with flags on the type object. This patch does that and simplifies the wrapper functions in xfrm6_policy accordingly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 1dd20cf17982..3434fdc7de37 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -282,6 +282,8 @@ struct xfrm_type
282 __u8 flags; 282 __u8 flags;
283#define XFRM_TYPE_NON_FRAGMENT 1 283#define XFRM_TYPE_NON_FRAGMENT 1
284#define XFRM_TYPE_REPLAY_PROT 2 284#define XFRM_TYPE_REPLAY_PROT 2
285#define XFRM_TYPE_LOCAL_COADDR 4
286#define XFRM_TYPE_REMOTE_COADDR 8
285 287
286 int (*init_state)(struct xfrm_state *x); 288 int (*init_state)(struct xfrm_state *x);
287 void (*destructor)(struct xfrm_state *); 289 void (*destructor)(struct xfrm_state *);
@@ -289,8 +291,6 @@ struct xfrm_type
289 int (*output)(struct xfrm_state *, struct sk_buff *pskb); 291 int (*output)(struct xfrm_state *, struct sk_buff *pskb);
290 int (*reject)(struct xfrm_state *, struct sk_buff *, struct flowi *); 292 int (*reject)(struct xfrm_state *, struct sk_buff *, struct flowi *);
291 int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **); 293 int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **);
292 xfrm_address_t *(*local_addr)(struct xfrm_state *, xfrm_address_t *);
293 xfrm_address_t *(*remote_addr)(struct xfrm_state *, xfrm_address_t *);
294 /* Estimate maximal size of result of transformation of a dgram */ 294 /* Estimate maximal size of result of transformation of a dgram */
295 u32 (*get_mtu)(struct xfrm_state *, int size); 295 u32 (*get_mtu)(struct xfrm_state *, int size);
296}; 296};