Deprecate global type pointers in NetVar.h

There's analogous IntrusivePtrs in zeek::vars
This commit is contained in:
Jon Siwek 2020-05-11 19:22:49 -07:00
parent 4351a26710
commit c0986f0739
51 changed files with 451 additions and 224 deletions

View file

@ -107,7 +107,7 @@ static RecordVal* build_syn_packet_val(bool is_orig, const IP_Hdr* ip,
options += opt_len;
}
RecordVal* v = new RecordVal(SYN_packet);
RecordVal* v = new RecordVal(zeek::vars::SYN_packet);
v->Assign(0, val_mgr->Bool(is_orig));
v->Assign(1, val_mgr->Bool(int(ip->DF())));
@ -1421,7 +1421,7 @@ int TCP_Analyzer::ParseTCPOptions(const struct tcphdr* tcp, bool is_orig)
{
auto p = reinterpret_cast<const uint32_t*>(o + 2);
auto num_pointers = (length - 2) / 4;
auto vt = zeek::lookup_type<VectorType>("index_vec");
auto vt = zeek::vars::index_vec;
auto sack = make_intrusive<VectorVal>(std::move(vt));
for ( auto i = 0; i < num_pointers; ++i )
@ -2077,7 +2077,7 @@ bool TCPStats_Endpoint::DataSent(double /* t */, uint64_t seq, int len, int capl
RecordVal* TCPStats_Endpoint::BuildStats()
{
RecordVal* stats = new RecordVal(endpoint_stats);
RecordVal* stats = new RecordVal(zeek::vars::endpoint_stats);
stats->Assign(0, val_mgr->Count(num_pkts));
stats->Assign(1, val_mgr->Count(num_rxmit));