mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Merge branch 'topic/rework-packets' of https://github.com/jsbarber/bro
* 'topic/rework-packets' of https://github.com/jsbarber/bro: One more tinker to Packet -- ensure no uninitialized values Packet::IP()-created IP_Hdr should not free Make enums work for non-C++11 config 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. Conflicts: aux/plugins
This commit is contained in:
commit
fe3579f1b4
34 changed files with 572 additions and 431 deletions
|
@ -200,7 +200,7 @@ extern "C" {
|
|||
|
||||
// Gets incremented each time there's an incompatible change
|
||||
// to the communication internals.
|
||||
static const unsigned short PROTOCOL_VERSION = 0x07;
|
||||
static const unsigned short PROTOCOL_VERSION = 0x08;
|
||||
|
||||
static const char MSG_NONE = 0x00;
|
||||
static const char MSG_VERSION = 0x01;
|
||||
|
@ -1453,7 +1453,7 @@ void RemoteSerializer::Process()
|
|||
if ( packets.length() )
|
||||
{
|
||||
BufferedPacket* bp = packets[0];
|
||||
Packet* p = bp->p;
|
||||
const Packet* p = bp->p;
|
||||
|
||||
// FIXME: The following chunk of code is copied from
|
||||
// net_packet_dispatch(). We should change that function
|
||||
|
@ -1465,14 +1465,12 @@ void RemoteSerializer::Process()
|
|||
current_dispatched =
|
||||
tmgr->Advance(network_time, max_timer_expires);
|
||||
|
||||
current_hdr = p->hdr;
|
||||
current_pkt = p->pkt;
|
||||
current_pkt = p;
|
||||
current_pktsrc = 0;
|
||||
current_iosrc = this;
|
||||
sessions->NextPacket(p->time, p->hdr, p->pkt, p->hdr_size);
|
||||
sessions->NextPacket(p->time, p);
|
||||
mgr.Drain();
|
||||
|
||||
current_hdr = 0; // done with these
|
||||
current_pkt = 0;
|
||||
current_iosrc = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue