aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index e100291e43f4..afa508d92c93 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -143,6 +143,11 @@ struct xfrm_state
143 /* Replay detection state at the time we sent the last notification */ 143 /* Replay detection state at the time we sent the last notification */
144 struct xfrm_replay_state preplay; 144 struct xfrm_replay_state preplay;
145 145
146 /* internal flag that only holds state for delayed aevent at the
147 * moment
148 */
149 u32 xflags;
150
146 /* Replay detection notification settings */ 151 /* Replay detection notification settings */
147 u32 replay_maxage; 152 u32 replay_maxage;
148 u32 replay_maxdiff; 153 u32 replay_maxdiff;
@@ -168,6 +173,9 @@ struct xfrm_state
168 void *data; 173 void *data;
169}; 174};
170 175
176/* xflags - make enum if more show up */
177#define XFRM_TIME_DEFER 1
178
171enum { 179enum {
172 XFRM_STATE_VOID, 180 XFRM_STATE_VOID,
173 XFRM_STATE_ACQ, 181 XFRM_STATE_ACQ,
@@ -242,7 +250,6 @@ extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo);
242 250
243extern void xfrm_state_delete_tunnel(struct xfrm_state *x); 251extern void xfrm_state_delete_tunnel(struct xfrm_state *x);
244 252
245struct xfrm_decap_state;
246struct xfrm_type 253struct xfrm_type
247{ 254{
248 char *description; 255 char *description;
@@ -251,7 +258,7 @@ struct xfrm_type
251 258
252 int (*init_state)(struct xfrm_state *x); 259 int (*init_state)(struct xfrm_state *x);
253 void (*destructor)(struct xfrm_state *); 260 void (*destructor)(struct xfrm_state *);
254 int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); 261 int (*input)(struct xfrm_state *, struct sk_buff *skb);
255 int (*output)(struct xfrm_state *, struct sk_buff *pskb); 262 int (*output)(struct xfrm_state *, struct sk_buff *pskb);
256 /* Estimate maximal size of result of transformation of a dgram */ 263 /* Estimate maximal size of result of transformation of a dgram */
257 u32 (*get_max_size)(struct xfrm_state *, int size); 264 u32 (*get_max_size)(struct xfrm_state *, int size);
@@ -606,25 +613,11 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
606 613
607extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); 614extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
608 615
609/* Decapsulation state, used by the input to store data during
610 * decapsulation procedure, to be used later (during the policy
611 * check
612 */
613struct xfrm_decap_state {
614 char decap_data[20];
615 __u16 decap_type;
616};
617
618struct sec_decap_state {
619 struct xfrm_state *xvec;
620 struct xfrm_decap_state decap;
621};
622
623struct sec_path 616struct sec_path
624{ 617{
625 atomic_t refcnt; 618 atomic_t refcnt;
626 int len; 619 int len;
627 struct sec_decap_state x[XFRM_MAX_DEPTH]; 620 struct xfrm_state *xvec[XFRM_MAX_DEPTH];
628}; 621};
629 622
630static inline struct sec_path * 623static inline struct sec_path *