mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00

The main change is that reassembly code (e.g. for TCP) now uses int64/uint64 (signedness is situational) data types in place of int types in order to support delivering data to analyzers that pass 2GB thresholds. There's also changes in logic that accompany the change in data types, e.g. to fix TCP sequence space arithmetic inconsistencies. Another significant change is in the Analyzer API: the *Packet and *Undelivered methods now use a uint64 in place of an int for the relative sequence space offset parameter.
37 lines
768 B
C++
37 lines
768 B
C++
// See the file "COPYING" in the main distribution directory for copyright.
|
|
|
|
#include "GTPv1.h"
|
|
|
|
#include "events.bif.h"
|
|
|
|
using namespace analyzer::gtpv1;
|
|
|
|
GTPv1_Analyzer::GTPv1_Analyzer(Connection* conn)
|
|
: Analyzer("GTPV1", conn)
|
|
{
|
|
interp = new binpac::GTPv1::GTPv1_Conn(this);
|
|
}
|
|
|
|
GTPv1_Analyzer::~GTPv1_Analyzer()
|
|
{
|
|
delete interp;
|
|
}
|
|
|
|
void GTPv1_Analyzer::Done()
|
|
{
|
|
Analyzer::Done();
|
|
Event(udp_session_done);
|
|
}
|
|
|
|
void GTPv1_Analyzer::DeliverPacket(int len, const u_char* data, bool orig, uint64 seq, const IP_Hdr* ip, int caplen)
|
|
{
|
|
Analyzer::DeliverPacket(len, data, orig, seq, ip, caplen);
|
|
try
|
|
{
|
|
interp->NewData(orig, data, data + len);
|
|
}
|
|
catch ( const binpac::Exception& e )
|
|
{
|
|
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
|
|
}
|
|
}
|