Trim the list of "global type pointers" from NetVar.h further

Most of them are deprecated now, with usage sites now doing the lookup
themselves.
This commit is contained in:
Jon Siwek 2020-05-12 16:38:05 -07:00
parent d34b24e776
commit 9210d443d3
26 changed files with 290 additions and 315 deletions

View file

@ -4,6 +4,7 @@
#include "IP.h"
#include "IntrusivePtr.h"
#include "iosource/Manager.h"
#include "Var.h"
extern "C" {
#include <pcap.h>
@ -593,8 +594,10 @@ void Packet::ProcessLayer2()
IntrusivePtr<RecordVal> Packet::ToRawPktHdrVal() const
{
auto pkt_hdr = make_intrusive<RecordVal>(zeek::vars::raw_pkt_hdr_type);
RecordVal* l2_hdr = new RecordVal(zeek::vars::l2_hdr_type);
static auto raw_pkt_hdr_type = zeek::lookup_type<RecordType>("raw_pkt_hdr");
static auto l2_hdr_type = zeek::lookup_type<RecordType>("l2_hdr");
auto pkt_hdr = make_intrusive<RecordVal>(raw_pkt_hdr_type);
RecordVal* l2_hdr = new RecordVal(l2_hdr_type);
bool is_ethernet = link_type == DLT_EN10MB;