mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +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
|
@ -5,9 +5,7 @@ inline static prefix_t* make_prefix(const IPAddr& addr, int width)
|
|||
{
|
||||
prefix_t* prefix = (prefix_t*) safe_malloc(sizeof(prefix_t));
|
||||
|
||||
uint32 bytes[4];
|
||||
addr.CopyIPv6(bytes);
|
||||
memcpy(&prefix->add.sin6, bytes, 4 * sizeof(uint32));
|
||||
addr.CopyIPv6(&prefix->add.sin6);
|
||||
prefix->family = AF_INET6;
|
||||
prefix->bitlen = width;
|
||||
prefix->ref_count = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue