mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Refactor to make bro use a common Packet object.
Do a better job of parsing layer 2 and keeping track of layer 3 proto. Add support for raw packet event, including Layer2 headers.
This commit is contained in:
parent
2b1cd66f17
commit
30fdc37479
34 changed files with 677 additions and 429 deletions
|
@ -167,9 +167,8 @@ bool PcapSource::ExtractNextPacket(Packet* pkt)
|
|||
return false;
|
||||
}
|
||||
|
||||
pkt->ts = current_hdr.ts.tv_sec + double(current_hdr.ts.tv_usec) / 1e6;
|
||||
pkt->hdr = ¤t_hdr;
|
||||
pkt->data = last_data = data;
|
||||
last_data = data;
|
||||
pkt->Init(props.link_type, ¤t_hdr.ts, current_hdr.caplen, current_hdr.len, data);
|
||||
|
||||
if ( current_hdr.len == 0 || current_hdr.caplen == 0 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue