Home
last modified time | relevance | path

Searched refs:hval (Results 1 – 20 of 20) sorted by relevance

/freebsd/sys/sys/
H A Dfnv_hash.h21 fnv_32_buf(const void *buf, size_t len, Fnv32_t hval) in fnv_32_buf() argument
26 hval *= FNV_32_PRIME; in fnv_32_buf()
27 hval ^= *s++; in fnv_32_buf()
29 return hval; in fnv_32_buf()
33 fnv_32_str(const char *str, Fnv32_t hval) in fnv_32_str() argument
39 hval *= FNV_32_PRIME; in fnv_32_str()
40 hval ^= c; in fnv_32_str()
42 return hval; in fnv_32_str()
46 fnv_64_buf(const void *buf, size_t len, Fnv64_t hval) in fnv_64_buf() argument
51 hval *= FNV_64_PRIME; in fnv_64_buf()
[all …]
/freebsd/crypto/krb5/src/lib/crypto/crypto_tests/
H A Dt_sha2.c94 krb5_data hval; in hash_test() local
97 if (alloc_data(&hval, hash->hashsize)) in hash_test()
110 if (hash->hash(iovs, 1000, &hval) != 0) in hash_test()
112 if (memcmp(hval.data, t->hash, hval.length) != 0) in hash_test()
121 if (hash->hash(&iov, 1, &hval) != 0) in hash_test()
123 if (memcmp(hval.data, t->hash, hval.length) != 0) in hash_test()
128 if (k5_sha256(&iov.data, 1, (uint8_t *)hval.data) != 0) in hash_test()
130 if (memcmp(hval.data, t->hash, hval.length) != 0) in hash_test()
135 free(hval.data); in hash_test()
/freebsd/sbin/hastd/
H A Dlzf.c130 unsigned int hval; in lzf_compress() local
146 hval = FRST (ip); in lzf_compress()
149 hval = NEXT (hval, ip); in lzf_compress()
150 hslot = htab + IDX (hval); in lzf_compress()
240 hval = FRST (ip); in lzf_compress()
242 hval = NEXT (hval, ip); in lzf_compress()
243 htab[IDX (hval)] = ip; in lzf_compress()
247 hval in lzf_compress()
[all...]
/freebsd/sys/dev/cxgbe/cudbg/
H A Dfastlz.c192 unsigned int hval; in FASTLZ_COMPRESSOR() local
242 HASH_FUNCTION(hval, ip); in FASTLZ_COMPRESSOR()
243 hslot = htab + hval; in FASTLZ_COMPRESSOR()
244 ref = htab[hval]; in FASTLZ_COMPRESSOR()
384 HASH_FUNCTION(hval, ip); in FASTLZ_COMPRESSOR()
385 htab[hval] = ip++; in FASTLZ_COMPRESSOR()
386 HASH_FUNCTION(hval, ip); in FASTLZ_COMPRESSOR()
387 htab[hval] = ip++; in FASTLZ_COMPRESSOR()
/freebsd/crypto/krb5/src/util/support/
H A Dt_hashtab.c110 uint64_t k0, k1, hval; in test_siphash() local
119 hval = siphash24(seq, i, k0, k1); in test_siphash()
120 assert(hval == vectors[i]); in test_siphash()
/freebsd/sys/netpfil/ipfw/nat64/
H A Dnat64lsn.c319 const struct ipfw_flow_id *f_id, uint32_t hval, in_addr_t faddr, in nat64lsn_get_state6to4() argument
330 CK_SLIST_FOREACH(state, &STATE_HASH(host, hval), entries) { in nat64lsn_get_state6to4()
388 state->hval = hval; in nat64lsn_get_state6to4()
395 CK_SLIST_INSERT_HEAD(&STATE_HASH(host, hval), in nat64lsn_get_state6to4()
810 CK_SLIST_REMOVE(&STATE_HASH(host, state->hval), in nat64lsn_maintain_pg()
1032 uint32_t hval, data[2]; in nat64lsn_alloc_host() local
1068 host->hval = ji->src6_hval; in nat64lsn_alloc_host()
1091 ji->state_hval = hval = STATE_HVAL(cfg, data); in nat64lsn_alloc_host()
1092 state = nat64lsn_get_state6to4(cfg, host, &ji->f_id, hval, in nat64lsn_alloc_host()
1475 state->hval), state, nat64lsn_state, in nat64lsn_pg_cleanup()
[all …]
H A Dnat64lsn.h52 uint32_t hval; member
180 uint32_t hval; member
/freebsd/usr.bin/mkstr/
H A Dmkstr.c258 long hval; member
281 if (hp->hval == hashval) { in hashit()
295 hp->hval = hashval; in hashit()
/freebsd/sys/vm/
H A Duma_int.h607 u_int hval; in hash_sfind() local
609 hval = UMA_HASH(hash, data); in hash_sfind()
611 LIST_FOREACH(slab, &hash->uh_slab_hash[hval], uhs_hlink) { in hash_sfind()
H A Duma_core.c1289 u_int hval; in hash_expand() local
1307 hval = UMA_HASH(newhash, slab->uhs_data); in hash_expand()
1308 LIST_INSERT_HEAD(&newhash->uh_slab_hash[hval], in hash_expand()
/freebsd/sys/net/
H A Dif_ipsec.c135 uint32_t hval; in ipsec_srchash() local
140 hval = fnv_32_buf( in ipsec_srchash()
143 return (&V_ipsec4_srchtbl[hval & (IPSEC_HASH_SIZE - 1)]); in ipsec_srchash()
147 hval = fnv_32_buf( in ipsec_srchash()
150 return (&V_ipsec6_srchtbl[hval & (IPSEC_HASH_SIZE - 1)]); in ipsec_srchash()
/freebsd/sys/dev/bhnd/nvram/
H A Dbhnd_nvram_data_bcm.c668 union bhnd_nvram_bcm_hvar_value hval; in bhnd_nvram_bcm_init() local
685 hval_len = sizeof(hval); in bhnd_nvram_bcm_init()
687 BHND_NVRAM_TYPE_STRING, &hval, &hval_len, in bhnd_nvram_bcm_init()
697 } else if (memcmp(&hval, &hvar->value, hval_len) != 0) { in bhnd_nvram_bcm_init()
/freebsd/sys/dev/igc/
H A Digc_nvm.c729 u8 q, hval, rem, result; in igc_get_fw_version() local
784 hval = q * NVM_HEX_TENS; in igc_get_fw_version()
786 result = hval + rem; in igc_get_fw_version()
/freebsd/contrib/ntp/ntpq/
H A Dntpq.c3665 sockaddr_u hval; in cookedprint()
3699 if (!value || !decodenetnum(value, &hval)) { in cookedprint()
3702 output(fp, name, nntohost(&hval)); in cookedprint()
3704 output(fp, name, stoa(&hval)); in cookedprint()
3711 } else if (decodenetnum(value, &hval)) { in cookedprint()
3712 if (datatype == TYPE_CLOCK && IS_IPV4(&hval)) { in cookedprint()
3719 unsigned char *str = (unsigned char *)&(hval.sa4).sin_addr; in cookedprint()
3725 } else if (ISREFCLOCKADR(&hval)) { in cookedprint()
3726 output(fp, name, refnumtoa(&hval)); in cookedprint()
3729 output(fp, name, stoa(&hval)); in cookedprint()
3669 sockaddr_u hval; cookedprint() local
[all...]
/freebsd/sys/cddl/contrib/opensolaris/uts/common/dtrace/
H A Dfasttrap.c282 uint_t hval = 0; in fasttrap_hash_str() local
285 hval = (hval << 4) + *p++; in fasttrap_hash_str()
286 if ((g = (hval & 0xf0000000)) != 0) in fasttrap_hash_str()
287 hval ^= g >> 24; in fasttrap_hash_str()
288 hval &= ~g; in fasttrap_hash_str()
290 return (hval); in fasttrap_hash_str()
H A Ddtrace.c8057 uint_t hval = 0; local
8060 hval = (hval << 4) + *p++;
8061 if ((g = (hval & 0xf0000000)) != 0)
8062 hval ^= g >> 24;
8063 hval &= ~g;
8065 return (hval);
8343 int hval = dtrace_hash_str(str) % DTRACE_ERRHASHSZ; local
8351 if (dtrace_errhash[hval].dter_msg == str) {
8352 dtrace_errhash[hval].dter_count++;
8356 if (dtrace_errhash[hval].dter_msg != NULL) {
[all …]
/freebsd/sys/dev/e1000/
H A De1000_nvm.c1295 u8 q, hval, rem, result; in e1000_get_fw_version() local
1378 hval = q * NVM_HEX_TENS; in e1000_get_fw_version()
1380 result = hval + rem; in e1000_get_fw_version()
/freebsd/sys/contrib/openzfs/module/nvpair/
H A Dnvpair.c292 uint32_t g, hval = 0; in nvt_hash() local
295 hval = (hval << 4) + *p++; in nvt_hash()
296 if ((g = (hval & 0xf0000000)) != 0) in nvt_hash()
297 hval ^= g >> 24; in nvt_hash()
298 hval &= ~g; in nvt_hash()
300 return (hval); in nvt_hash()
/freebsd/sys/netipsec/
H A Dkey.c292 uint32_t hval; in key_addrprotohash() local
294 hval = fnv_32_buf(proto, sizeof(*proto), in key_addrprotohash()
299 hval = fnv_32_buf(&src->sin.sin_addr, in key_addrprotohash()
300 sizeof(in_addr_t), hval); in key_addrprotohash()
301 hval = fnv_32_buf(&dst->sin.sin_addr, in key_addrprotohash()
302 sizeof(in_addr_t), hval); in key_addrprotohash()
307 hval = fnv_32_buf(&src->sin6.sin6_addr, in key_addrprotohash()
308 sizeof(struct in6_addr), hval); in key_addrprotohash()
309 hval = fnv_32_buf(&dst->sin6.sin6_addr, in key_addrprotohash()
310 sizeof(struct in6_addr), hval); in key_addrprotohash()
[all …]
/freebsd/sys/netpfil/ipfw/
H A Dip_fw_dynamic.c2712 #define DYN_RELINK_STATES(s, hval, i, head, ohead) do { \ in dyn_grow_hashtable() argument
2715 CK_SLIST_INSERT_HEAD(&head[DYN_BUCKET(s->hval, new)], \ in dyn_grow_hashtable()