Lines Matching defs:hash

69  *  - the implementation is just a (query-data) => (answer-data) hash table
758 /* use 32-bit FNV hash function */
763 _dnsPacket_hashBytes( DnsPacket* packet, int numBytes, unsigned hash )
769 hash = hash*FNV_MULT ^ *p++;
772 return hash;
777 _dnsPacket_hashQName( DnsPacket* packet, unsigned hash )
805 hash = hash*FNV_MULT ^ *p++;
810 return hash;
814 _dnsPacket_hashQR( DnsPacket* packet, unsigned hash )
816 hash = _dnsPacket_hashQName(packet, hash);
817 hash = _dnsPacket_hashBytes(packet, 4, hash); /* TYPE and CLASS */
818 return hash;
824 unsigned hash = FNV_BASIS;
831 * however we hash the RD bit to differentiate
835 hash = hash*FNV_MULT ^ (packet->base[2] & 1);
846 /* hash QDCOUNT QRs */
848 hash = _dnsPacket_hashQR(packet, hash);
850 return hash;
982 /* cache entry. for simplicity, 'hash' and 'hlink' are inlined in this
983 * structure though they are conceptually part of the hash table.
988 unsigned int hash; /* hash value */
1126 /* compute the hash of a given entry, this is a hash of most
1148 e->hash = entry_hash(e);
1167 e->hash = init->hash;
1203 /* We use a simple hash table with external collision lists
1204 * for simplicity, the hash-table fields 'hash' and 'hlink' are
1212 unsigned int hash;
1280 if (ri->hash == key->hash) {
1291 ri->hash = key->hash;
1319 if (ri->hash == key->hash) {
1491 /* This function tries to find a key within the hash table
1502 * The result of a lookup_p is only valid until you alter the hash
1509 int index = key->hash % cache->max_entries;
1518 if (node->hash == key->hash && entry_equals(node, key))
1526 /* Add a new entry to the hash table. 'lookup' must be the
1545 /* Remove an existing entry from the hash table,
1564 /* Remove the oldest entry from the hash table.
1583 /* Remove all expired entries from the hash table.