Added get_current_packet_header bif.

This commit is contained in:
Jan Grashoefer 2016-04-20 00:00:47 +02:00
parent 2fc8ef232a
commit c0bf1b3c67
6 changed files with 92 additions and 74 deletions

View file

@ -428,15 +428,6 @@ void Packet::ProcessLayer2()
RecordVal* Packet::BuildPktHdrVal() const
{
static RecordType* l2_hdr_type = 0;
static RecordType* raw_pkt_hdr_type = 0;
if ( ! raw_pkt_hdr_type )
{
raw_pkt_hdr_type = internal_type("raw_pkt_hdr")->AsRecordType();
l2_hdr_type = internal_type("l2_hdr")->AsRecordType();
}
RecordVal* pkt_hdr = new RecordVal(raw_pkt_hdr_type);
RecordVal* l2_hdr = new RecordVal(l2_hdr_type);