#ifndef _XFRM_HASH_H
#define _XFRM_HASH_H
#include <linux/xfrm.h>
#include <linux/socket.h>
#include <linux/jhash.h>
static inline unsigned int __xfrm4_addr_hash(const xfrm_address_t *addr)
{ … }
static inline unsigned int __xfrm6_addr_hash(const xfrm_address_t *addr)
{ … }
static inline unsigned int __xfrm4_daddr_saddr_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr)
{ … }
static inline unsigned int __xfrm6_daddr_saddr_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr)
{ … }
static inline u32 __bits2mask32(__u8 bits)
{ … }
static inline unsigned int __xfrm4_dpref_spref_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
__u8 dbits,
__u8 sbits)
{ … }
static inline unsigned int __xfrm6_pref_hash(const xfrm_address_t *addr,
__u8 prefixlen)
{ … }
static inline unsigned int __xfrm6_dpref_spref_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
__u8 dbits,
__u8 sbits)
{ … }
static inline unsigned int __xfrm_dst_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
u32 reqid, unsigned short family,
unsigned int hmask)
{ … }
static inline unsigned int __xfrm_src_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
unsigned short family,
unsigned int hmask)
{ … }
static inline unsigned int
__xfrm_spi_hash(const xfrm_address_t *daddr, __be32 spi, u8 proto,
unsigned short family, unsigned int hmask)
{ … }
static inline unsigned int
__xfrm_seq_hash(u32 seq, unsigned int hmask)
{ … }
static inline unsigned int __idx_hash(u32 index, unsigned int hmask)
{ … }
static inline unsigned int __sel_hash(const struct xfrm_selector *sel,
unsigned short family, unsigned int hmask,
u8 dbits, u8 sbits)
{ … }
static inline unsigned int __addr_hash(const xfrm_address_t *daddr,
const xfrm_address_t *saddr,
unsigned short family,
unsigned int hmask,
u8 dbits, u8 sbits)
{ … }
struct hlist_head *xfrm_hash_alloc(unsigned int sz);
void xfrm_hash_free(struct hlist_head *n, unsigned int sz);
#endif