Move zeek::net namespace to zeek::run_state namespace.

This also moves all of the code from Net.{h,cc} to RunState.{h,cc} and marks Net.h as deprecated
This commit is contained in:
Tim Wojtulewicz 2020-08-19 17:41:24 -07:00
parent d608e7c9a5
commit 0ac3fafe13
64 changed files with 477 additions and 467 deletions

View file

@ -115,7 +115,7 @@ File::~File()
void File::UpdateLastActivityTime()
{
val->Assign(last_active_idx, zeek::make_intrusive<zeek::TimeVal>(zeek::net::network_time));
val->Assign(last_active_idx, zeek::make_intrusive<zeek::TimeVal>(zeek::run_state::network_time));
}
double File::GetLastActivityTime() const
@ -250,7 +250,7 @@ bool File::IsComplete() const
void File::ScheduleInactivityTimer() const
{
zeek::detail::timer_mgr->Add(new detail::FileTimer(zeek::net::network_time, id, GetTimeoutInterval()));
zeek::detail::timer_mgr->Add(new detail::FileTimer(zeek::run_state::network_time, id, GetTimeoutInterval()));
}
bool File::AddAnalyzer(file_analysis::Tag tag, zeek::RecordVal* args)
@ -469,7 +469,7 @@ void File::DeliverChunk(const u_char* data, uint64_t len, uint64_t offset)
}
// Forward data to the reassembler.
file_reassembler->NewBlock(zeek::net::network_time, offset, len, data);
file_reassembler->NewBlock(zeek::run_state::network_time, offset, len, data);
}
else if ( stream_offset == offset )
{
@ -482,7 +482,7 @@ void File::DeliverChunk(const u_char* data, uint64_t len, uint64_t offset)
// This is data that doesn't match the offset and the reassembler
// needs to be enabled.
file_reassembler = new FileReassembler(this, stream_offset);
file_reassembler->NewBlock(zeek::net::network_time, offset, len, data);
file_reassembler->NewBlock(zeek::run_state::network_time, offset, len, data);
}
else
{

View file

@ -7,7 +7,7 @@
#include <map>
#include "Component.h"
#include "Net.h"
#include "RunState.h"
#include "RuleMatcher.h"
#include "plugin/ComponentManager.h"
@ -381,7 +381,7 @@ protected:
* @param is_termination whether the Manager (and probably Bro) is in a
* terminating state. If true, then the timeout cannot be postponed.
*/
void Timeout(const std::string& file_id, bool is_terminating = zeek::net::terminating);
void Timeout(const std::string& file_id, bool is_terminating = zeek::run_state::terminating);
/**
* Immediately remove file_analysis::File object associated with \a file_id.