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

In many cases, classes derived from TCP_ApplicationAnalyzer were *overloading* instead of overriding EndpointEOF causing the parent class version to become hidden in the child and also for the child's version to never to called polymorphically from TCP_Analyzer::EndpointEOF. Clang gave a warning in each case.
46 lines
972 B
C++
46 lines
972 B
C++
#include "HTTP-binpac.h"
|
|
#include "TCP_Reassembler.h"
|
|
|
|
HTTP_Analyzer_binpac::HTTP_Analyzer_binpac(Connection *c)
|
|
: TCP_ApplicationAnalyzer(AnalyzerTag::HTTP_BINPAC, c)
|
|
{
|
|
interp = new binpac::HTTP::HTTP_Conn(this);
|
|
}
|
|
|
|
HTTP_Analyzer_binpac::~HTTP_Analyzer_binpac()
|
|
{
|
|
delete interp;
|
|
}
|
|
|
|
void HTTP_Analyzer_binpac::Done()
|
|
{
|
|
TCP_ApplicationAnalyzer::Done();
|
|
|
|
interp->FlowEOF(true);
|
|
interp->FlowEOF(false);
|
|
}
|
|
|
|
void HTTP_Analyzer_binpac::EndpointEOF(bool is_orig)
|
|
{
|
|
TCP_ApplicationAnalyzer::EndpointEOF(is_orig);
|
|
interp->FlowEOF(is_orig);
|
|
}
|
|
|
|
void HTTP_Analyzer_binpac::DeliverStream(int len, const u_char* data, bool orig)
|
|
{
|
|
TCP_ApplicationAnalyzer::DeliverStream(len, data, orig);
|
|
|
|
assert(TCP());
|
|
|
|
if ( TCP()->IsPartial() )
|
|
// punt on partial.
|
|
return;
|
|
|
|
interp->NewData(orig, data, data + len);
|
|
}
|
|
|
|
void HTTP_Analyzer_binpac::Undelivered(int seq, int len, bool orig)
|
|
{
|
|
TCP_ApplicationAnalyzer::Undelivered(seq, len, orig);
|
|
interp->NewGap(orig, len);
|
|
}
|