/freebsd/sys/sys/ |
H A D | fnv_hash.h | 21 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/sbin/hastd/ |
H A D | lzf.c | 130 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 D | fastlz.c | 192 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/sys/netpfil/ipfw/nat64/ |
H A D | nat64lsn.c | 319 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 D | nat64lsn.h | 52 uint32_t hval; member 180 uint32_t hval; member
|
/freebsd/usr.bin/mkstr/ |
H A D | mkstr.c | 258 long hval; member 281 if (hp->hval == hashval) { in hashit() 295 hp->hval = hashval; in hashit()
|
/freebsd/sys/vm/ |
H A D | uma_int.h | 607 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 D | uma_core.c | 1287 u_int hval; in hash_expand() local 1305 hval = UMA_HASH(newhash, slab->uhs_data); in hash_expand() 1306 LIST_INSERT_HEAD(&newhash->uh_slab_hash[hval], in hash_expand()
|
/freebsd/sys/net/ |
H A D | if_ipsec.c | 135 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 D | bhnd_nvram_data_bcm.c | 668 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 D | igc_nvm.c | 729 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 D | ntpq.c | 3665 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 D | fasttrap.c | 282 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 D | dtrace.c | 8029 uint_t hval = 0; local 8032 hval = (hval << 4) + *p++; 8033 if ((g = (hval & 0xf0000000)) != 0) 8034 hval ^= g >> 24; 8035 hval &= ~g; 8037 return (hval); 8315 int hval = dtrace_hash_str(str) % DTRACE_ERRHASHSZ; local 8323 if (dtrace_errhash[hval].dter_msg == str) { 8324 dtrace_errhash[hval].dter_count++; 8328 if (dtrace_errhash[hval].dter_msg != NULL) { [all …]
|
/freebsd/sys/dev/e1000/ |
H A D | e1000_nvm.c | 1288 u8 q, hval, rem, result; in e1000_get_fw_version() local 1371 hval = q * NVM_HEX_TENS; in e1000_get_fw_version() 1373 result = hval + rem; in e1000_get_fw_version()
|
/freebsd/sys/contrib/openzfs/module/nvpair/ |
H A D | nvpair.c | 300 uint32_t g, hval = 0; in nvt_hash() local 303 hval = (hval << 4) + *p++; in nvt_hash() 304 if ((g = (hval & 0xf0000000)) != 0) in nvt_hash() 305 hval ^= g >> 24; in nvt_hash() 306 hval &= ~g; in nvt_hash() 308 return (hval); in nvt_hash()
|
/freebsd/sys/netipsec/ |
H A D | key.c | 290 uint32_t hval; in key_addrprotohash() local 292 hval = fnv_32_buf(proto, sizeof(*proto), in key_addrprotohash() 297 hval = fnv_32_buf(&src->sin.sin_addr, in key_addrprotohash() 298 sizeof(in_addr_t), hval); in key_addrprotohash() 299 hval = fnv_32_buf(&dst->sin.sin_addr, in key_addrprotohash() 300 sizeof(in_addr_t), hval); in key_addrprotohash() 305 hval = fnv_32_buf(&src->sin6.sin6_addr, in key_addrprotohash() 306 sizeof(struct in6_addr), hval); in key_addrprotohash() 307 hval = fnv_32_buf(&dst->sin6.sin6_addr, in key_addrprotohash() 308 sizeof(struct in6_addr), hval); in key_addrprotohash() [all …]
|
/freebsd/sys/netpfil/ipfw/ |
H A D | ip_fw_dynamic.c | 2681 #define DYN_RELINK_STATES(s, hval, i, head, ohead) do { \ in dyn_grow_hashtable() argument 2684 CK_SLIST_INSERT_HEAD(&head[DYN_BUCKET(s->hval, new)], \ in dyn_grow_hashtable()
|