mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Conn: Add InitPostScript() and conn_id_ctx singleton
This commit is contained in:
parent
a2922cdde9
commit
eba6355b84
3 changed files with 17 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <cctype>
|
||||
|
||||
#include "zeek/Desc.h"
|
||||
#include "zeek/ID.h"
|
||||
#include "zeek/NetVar.h"
|
||||
#include "zeek/Reporter.h"
|
||||
#include "zeek/RunState.h"
|
||||
|
@ -22,6 +23,12 @@ namespace zeek {
|
|||
|
||||
uint64_t Connection::total_connections = 0;
|
||||
uint64_t Connection::current_connections = 0;
|
||||
zeek::RecordValPtr Connection::conn_id_ctx_singleton;
|
||||
|
||||
void Connection::InitPostScript() {
|
||||
if ( id::conn_id_ctx->NumFields() == 0 )
|
||||
conn_id_ctx_singleton = zeek::make_intrusive<zeek::RecordVal>(id::conn_id_ctx);
|
||||
}
|
||||
|
||||
Connection::Connection(zeek::IPBasedConnKeyPtr k, double t, uint32_t flow, const Packet* pkt)
|
||||
: Session(t, connection_timeout, connection_status_update, detail::connection_status_update_interval),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue