]> Git Repo - linux.git/blobdiff - include/net/xfrm.h
xfrm: Add basic infrastructure to support IPsec extended sequence numbers
[linux.git] / include / net / xfrm.h
index 8f8bd82606bff3f23f55f27e02f3e2f64731be0e..7640822bc5154c9e15b6339ae3fe5893b9e4d9bf 100644 (file)
@@ -186,9 +186,11 @@ struct xfrm_state {
 
        /* State for replay detection */
        struct xfrm_replay_state replay;
+       struct xfrm_replay_state_esn *replay_esn;
 
        /* Replay detection state at the time we sent the last notification */
        struct xfrm_replay_state preplay;
+       struct xfrm_replay_state_esn *preplay_esn;
 
        /* internal flag that only holds state for delayed aevent at the
         * moment
@@ -1569,6 +1571,11 @@ static inline int xfrm_alg_auth_len(const struct xfrm_algo_auth *alg)
        return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
 }
 
+static inline int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay_esn)
+{
+       return sizeof(*replay_esn) + replay_esn->bmp_len * sizeof(__u32);
+}
+
 #ifdef CONFIG_XFRM_MIGRATE
 static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig)
 {
This page took 0.029753 seconds and 4 git commands to generate.