diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-05 21:15:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-10-05 21:15:12 +0200 |
commit | 77d8d7a6848c81084f413e1ec4982123a56e2ccb (patch) | |
tree | 37a160b0b5fcb8a079bcafec5091fd331e14d54c /include | |
parent | [IPV6]: Fix NS handing for proxy/anycast address (diff) | |
download | linux-77d8d7a6848c81084f413e1ec4982123a56e2ccb.tar.xz linux-77d8d7a6848c81084f413e1ec4982123a56e2ccb.zip |
[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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 7564b2ce449f..b6e72f890c6c 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 */ |