mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Initial import of svn+ssh:://svn.icir.org/bro/trunk/bro as of r7088
This commit is contained in:
commit
61757ac78b
1383 changed files with 380824 additions and 0 deletions
48
src/HTTP-binpac.cc
Normal file
48
src/HTTP-binpac.cc
Normal file
|
@ -0,0 +1,48 @@
|
|||
// $Id:$
|
||||
|
||||
#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(TCP_Reassembler* endp)
|
||||
{
|
||||
TCP_ApplicationAnalyzer::EndpointEOF(endp);
|
||||
interp->FlowEOF(endp->IsOrig());
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue