mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Move Anon.h into zeek::detail namespace
This commit is contained in:
parent
7a5dae4354
commit
9992ec5c11
4 changed files with 19 additions and 14 deletions
12
src/Anon.cc
12
src/Anon.cc
|
@ -14,7 +14,9 @@
|
|||
#include "ID.h"
|
||||
#include "IPAddr.h"
|
||||
|
||||
AnonymizeIPAddr* ip_anonymizer[NUM_ADDR_ANONYMIZATION_METHODS] = {nullptr};
|
||||
using namespace zeek::detail;
|
||||
|
||||
AnonymizeIPAddr* zeek::detail::ip_anonymizer[NUM_ADDR_ANONYMIZATION_METHODS] = {nullptr};
|
||||
|
||||
static uint32_t rand32()
|
||||
{
|
||||
|
@ -22,7 +24,7 @@ static uint32_t rand32()
|
|||
}
|
||||
|
||||
// From tcpdpriv.
|
||||
int bi_ffs(uint32_t value)
|
||||
static int bi_ffs(uint32_t value)
|
||||
{
|
||||
int add = 0;
|
||||
static uint8_t bvals[] = {
|
||||
|
@ -360,7 +362,7 @@ static IntrusivePtr<TableVal> anon_preserve_orig_addr;
|
|||
static IntrusivePtr<TableVal> anon_preserve_resp_addr;
|
||||
static IntrusivePtr<TableVal> anon_preserve_other_addr;
|
||||
|
||||
void init_ip_addr_anonymizers()
|
||||
void zeek::detail::init_ip_addr_anonymizers()
|
||||
{
|
||||
ip_anonymizer[KEEP_ORIG_ADDR] = nullptr;
|
||||
ip_anonymizer[SEQUENTIALLY_NUMBERED] = new AnonymizeIPAddr_Seq();
|
||||
|
@ -384,7 +386,7 @@ void init_ip_addr_anonymizers()
|
|||
anon_preserve_other_addr = cast_intrusive<TableVal>(id->GetVal());
|
||||
}
|
||||
|
||||
ipaddr32_t anonymize_ip(ipaddr32_t ip, enum ip_addr_anonymization_class_t cl)
|
||||
ipaddr32_t zeek::detail::anonymize_ip(ipaddr32_t ip, enum ip_addr_anonymization_class_t cl)
|
||||
{
|
||||
TableVal* preserve_addr = nullptr;
|
||||
auto addr = make_intrusive<AddrVal>(ip);
|
||||
|
@ -439,7 +441,7 @@ ipaddr32_t anonymize_ip(ipaddr32_t ip, enum ip_addr_anonymization_class_t cl)
|
|||
#include "NetVar.h"
|
||||
#include "Event.h"
|
||||
|
||||
void log_anonymization_mapping(ipaddr32_t input, ipaddr32_t output)
|
||||
void zeek::detail::log_anonymization_mapping(ipaddr32_t input, ipaddr32_t output)
|
||||
{
|
||||
if ( anonymization_mapping )
|
||||
mgr.Enqueue(anonymization_mapping,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue