mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Update plugin btests for namespace changes
This commit is contained in:
parent
70c2397f69
commit
874e170341
43 changed files with 420 additions and 317 deletions
|
@ -5,10 +5,10 @@
|
|||
|
||||
#include <analyzer/protocol/tcp/TCP_Reassembler.h>
|
||||
|
||||
using namespace plugin::Demo_Foo;
|
||||
using namespace btest::plugin::Demo_Foo;
|
||||
|
||||
Foo::Foo(Connection* conn)
|
||||
: analyzer::tcp::TCP_ApplicationAnalyzer("Foo", conn)
|
||||
Foo::Foo(zeek::Connection* conn)
|
||||
: zeek::analyzer::tcp::TCP_ApplicationAnalyzer("Foo", conn)
|
||||
{
|
||||
interp = new binpac::Foo::Foo_Conn(this);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ Foo::~Foo()
|
|||
|
||||
void Foo::Done()
|
||||
{
|
||||
analyzer::tcp::TCP_ApplicationAnalyzer::Done();
|
||||
zeek::analyzer::tcp::TCP_ApplicationAnalyzer::Done();
|
||||
|
||||
interp->FlowEOF(true);
|
||||
interp->FlowEOF(false);
|
||||
|
@ -28,13 +28,13 @@ void Foo::Done()
|
|||
|
||||
void Foo::EndpointEOF(bool is_orig)
|
||||
{
|
||||
analyzer::tcp::TCP_ApplicationAnalyzer::EndpointEOF(is_orig);
|
||||
zeek::analyzer::tcp::TCP_ApplicationAnalyzer::EndpointEOF(is_orig);
|
||||
interp->FlowEOF(is_orig);
|
||||
}
|
||||
|
||||
void Foo::DeliverStream(int len, const u_char* data, bool orig)
|
||||
{
|
||||
analyzer::tcp::TCP_ApplicationAnalyzer::DeliverStream(len, data, orig);
|
||||
zeek::analyzer::tcp::TCP_ApplicationAnalyzer::DeliverStream(len, data, orig);
|
||||
|
||||
assert(TCP());
|
||||
|
||||
|
@ -48,12 +48,12 @@ void Foo::DeliverStream(int len, const u_char* data, bool orig)
|
|||
}
|
||||
catch ( const binpac::Exception& e )
|
||||
{
|
||||
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
|
||||
ProtocolViolation(zeek::util::fmt("Binpac exception: %s", e.c_msg()));
|
||||
}
|
||||
}
|
||||
|
||||
void Foo::Undelivered(uint64 seq, int len, bool orig)
|
||||
void Foo::Undelivered(uint64_t seq, int len, bool orig)
|
||||
{
|
||||
analyzer::tcp::TCP_ApplicationAnalyzer::Undelivered(seq, len, orig);
|
||||
zeek::analyzer::tcp::TCP_ApplicationAnalyzer::Undelivered(seq, len, orig);
|
||||
interp->NewGap(orig, len);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue