aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-05 12:15:12 -0700
committerDavid S. Miller <davem@davemloft.net>2005-10-05 12:15:12 -0700
commit77d8d7a6848c81084f413e1ec4982123a56e2ccb (patch)
tree37a160b0b5fcb8a079bcafec5091fd331e14d54c /include
parent140e26fcd559f6988e5a9056385eecade19d9b49 (diff)
[IPSEC]: Document that policy direction is derived from the index.
Here is a patch that adds a helper called xfrm_policy_id2dir to document the fact that the policy direction can be and is derived from the index. This is based on a patch by YOSHIFUJI Hideaki and 210313105@suda.edu.cn. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/xfrm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 7564b2ce449..b6e72f890c6 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -931,4 +931,9 @@ static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b,
}
}
+static inline int xfrm_policy_id2dir(u32 index)
+{
+ return index & 7;
+}
+
#endif /* _NET_XFRM_H */