mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Deprecate Analyzer::ConnectionEvent()
And update usages to Analyzer::EnqueueConnEvent()
This commit is contained in:
parent
e394ea38bc
commit
5e496e43b7
34 changed files with 954 additions and 1043 deletions
|
@ -150,7 +150,7 @@ int NFS_Interp::RPC_BuildReply(RPC_CallInfo* c, BifEnum::rpc_status rpc_status,
|
|||
{
|
||||
auto vl = event_common_vl(c, rpc_status, nfs_status,
|
||||
start_time, last_time, reply_len, 0);
|
||||
analyzer->ConnectionEventFast(nfs_reply_status, std::move(vl));
|
||||
analyzer->EnqueueConnEvent(nfs_reply_status, std::move(vl));
|
||||
}
|
||||
|
||||
if ( ! rpc_success )
|
||||
|
@ -281,12 +281,12 @@ int NFS_Interp::RPC_BuildReply(RPC_CallInfo* c, BifEnum::rpc_status rpc_status,
|
|||
start_time, last_time, reply_len, (bool)request + (bool)reply);
|
||||
|
||||
if ( request )
|
||||
vl.push_back(request);
|
||||
vl.emplace_back(AdoptRef{}, request);
|
||||
|
||||
if ( reply )
|
||||
vl.push_back(reply);
|
||||
vl.emplace_back(AdoptRef{}, reply);
|
||||
|
||||
analyzer->ConnectionEventFast(event, std::move(vl));
|
||||
analyzer->EnqueueConnEvent(event, std::move(vl));
|
||||
}
|
||||
else
|
||||
Unref(reply);
|
||||
|
@ -318,21 +318,22 @@ StringVal* NFS_Interp::nfs3_file_data(const u_char*& buf, int& n, uint64_t offse
|
|||
return 0;
|
||||
}
|
||||
|
||||
val_list NFS_Interp::event_common_vl(RPC_CallInfo *c, BifEnum::rpc_status rpc_status,
|
||||
zeek::Args NFS_Interp::event_common_vl(RPC_CallInfo *c, BifEnum::rpc_status rpc_status,
|
||||
BifEnum::NFS3::status_t nfs_status,
|
||||
double rep_start_time,
|
||||
double rep_last_time, int reply_len, int extra_elements)
|
||||
{
|
||||
// Returns a new val_list that already has a conn_val, and nfs3_info.
|
||||
// These are the first parameters for each nfs_* event ...
|
||||
val_list vl(2 + extra_elements);
|
||||
vl.push_back(analyzer->BuildConnVal());
|
||||
VectorVal* auxgids = new VectorVal(internal_type("index_vec")->AsVectorType());
|
||||
zeek::Args vl;
|
||||
vl.reserve(2 + extra_elements);
|
||||
vl.emplace_back(IntrusivePtr{AdoptRef{}, analyzer->BuildConnVal()});
|
||||
auto auxgids = make_intrusive<VectorVal>(internal_type("index_vec")->AsVectorType());
|
||||
|
||||
for ( size_t i = 0; i < c->AuxGIDs().size(); ++i )
|
||||
auxgids->Assign(i, val_mgr->GetCount(c->AuxGIDs()[i]));
|
||||
|
||||
RecordVal *info = new RecordVal(BifType::Record::NFS3::info_t);
|
||||
auto info = make_intrusive<RecordVal>(BifType::Record::NFS3::info_t);
|
||||
info->Assign(0, BifType::Enum::rpc_status->GetVal(rpc_status));
|
||||
info->Assign(1, BifType::Enum::NFS3::status_t->GetVal(nfs_status));
|
||||
info->Assign(2, make_intrusive<Val>(c->StartTime(), TYPE_TIME));
|
||||
|
@ -345,9 +346,9 @@ val_list NFS_Interp::event_common_vl(RPC_CallInfo *c, BifEnum::rpc_status rpc_st
|
|||
info->Assign(9, val_mgr->GetCount(c->Gid()));
|
||||
info->Assign(10, val_mgr->GetCount(c->Stamp()));
|
||||
info->Assign(11, make_intrusive<StringVal>(c->MachineName()));
|
||||
info->Assign(12, auxgids);
|
||||
info->Assign(12, std::move(auxgids));
|
||||
|
||||
vl.push_back(info);
|
||||
vl.emplace_back(std::move(info));
|
||||
return vl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue