mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Move cur_pos from packet into packet manager loop.
This commit is contained in:
parent
c2500d03d6
commit
96d0e11bb8
39 changed files with 148 additions and 169 deletions
|
@ -59,17 +59,12 @@ void Packet::Init(int arg_link_type, pkt_timeval *arg_ts, uint32_t arg_caplen,
|
|||
l3_proto = L3_UNKNOWN;
|
||||
l3_checksummed = false;
|
||||
|
||||
// For packet analyzer: cur_pos points to the next payload.
|
||||
cur_pos = data;
|
||||
|
||||
if ( data )
|
||||
{
|
||||
// From here we assume that layer 2 is valid. If a packet analyzer encounters
|
||||
// an issue, it will call Packet::Weird(), which sets l2_valid to false.
|
||||
l2_valid = true;
|
||||
packet_mgr->ProcessPacket(this);
|
||||
// Calculate header size after processing lower layers.
|
||||
hdr_size = cur_pos - data;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue