mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Refactoring various usages of new IPAddr class.
Reducing number of places that internal representation was exposed via GetBytes/CopyIPv6. Also fixed a bug in remask_addr bif.
This commit is contained in:
parent
d887eb3178
commit
d7dafe2fe2
24 changed files with 301 additions and 267 deletions
10
src/Hash.cc
10
src/Hash.cc
|
@ -103,16 +103,6 @@ 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue