Port DNS_Mgr to use new IPAddr class, enable lookups on IPv6 addrs.

Host lookups still need to be changed to also do AAAA queries.
This commit is contained in:
Jon Siwek 2012-02-13 15:57:59 -06:00
parent c0f05f57a7
commit 0f207c243c
6 changed files with 61 additions and 84 deletions

View file

@ -103,6 +103,16 @@ HashKey::HashKey(const BroString* s)
is_our_dynamic = 0;
}
HashKey::HashKey(const IPAddr& addr)
{
const uint32* bytes;
int len = addr.GetBytes(&bytes);
size = len * sizeof(uint32);
key = CopyKey(bytes, size);
is_our_dynamic = 1;
hash = HashBytes(key, size);
}
HashKey::HashKey(int copy_key, void* arg_key, int arg_size)
{
size = arg_size;