MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fnv_32_buf

Function fnv_32_buf

freebsd/sys/fnv_hash.h:22–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#define FNV_64_PRIME ((Fnv64_t) 0x100000001b3ULL)
21
22static __inline Fnv32_t
23fnv_32_buf(const void *buf, size_t len, Fnv32_t hval)
24{
25 const u_int8_t *s = (const u_int8_t *)buf;
26
27 while (len-- != 0) {
28 hval *= FNV_32_PRIME;
29 hval ^= *s++;
30 }
31 return hval;
32}
33
34static __inline Fnv32_t
35fnv_32_str(const char *str, Fnv32_t hval)

Callers 15

in6_addrhashFunction · 0.85
in_gre_hashvalFunction · 0.85
in_gif_hashvalFunction · 0.85
in6_gif_hashvalFunction · 0.85
in6_addrhashFunction · 0.85
in6_gre_hashvalFunction · 0.85
m_ether_tcpip_hash_initFunction · 0.85
m_tcpip_hashFunction · 0.85
m_ether_tcpip_hashFunction · 0.85
m_infiniband_tcpip_hashFunction · 0.85
cache_prehashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected