Lines Matching defs:hash
80 * Peer hash tables
82 struct peer *peer_hash[NTP_HASH_SIZE]; /* peer hash table */
84 struct peer *assoc_hash[NTP_HASH_SIZE]; /* association ID hash table */
220 * same peer through different interfaces in the hash table.
302 u_int hash;
308 hash = NTP_HASH_ADDR(srcadr);
309 for (p = peer_hash[hash]; p != NULL; p = p->adr_link) {
366 u_int hash;
369 hash = assoc & NTP_HASH_MASK;
370 for (p = assoc_hash[hash]; p != NULL; p = p->aid_link)
475 int hash;
478 hash = NTP_HASH_ADDR(&p->srcadr);
479 peer_hash_count[hash]--;
481 UNLINK_SLIST(unlinked, peer_hash[hash], p, adr_link,
484 peer_hash_count[hash]++;
490 * Remove him from the association hash as well.
492 hash = p->associd & NTP_HASH_MASK;
493 assoc_hash_count[hash]--;
495 UNLINK_SLIST(unlinked, assoc_hash[hash], p, aid_link,
498 assoc_hash_count[hash]++;
529 * unpeer - remove peer structure from hash table and free structure
767 u_int hash;
961 * Put the new peer in the hash tables.
963 hash = NTP_HASH_ADDR(&peer->srcadr);
964 LINK_SLIST(peer_hash[hash], peer, adr_link);
965 peer_hash_count[hash]++;
966 hash = peer->associd & NTP_HASH_MASK;
967 LINK_SLIST(assoc_hash[hash], peer, aid_link);
968 assoc_hash_count[hash]++;