mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Adding a test building a file analyzer plugin.
Also cleaning up, and moving, the other plugin tests.
This commit is contained in:
parent
55de5c60f4
commit
c24bb9cacd
28 changed files with 203 additions and 2336 deletions
32
testing/btest/plugins/protocol-plugin/src/Foo.h
Normal file
32
testing/btest/plugins/protocol-plugin/src/Foo.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
#ifndef BRO_PLUGIN_DEMO_FOO_H
|
||||
#define BRO_PLUGIN_DEMO_FOO_H
|
||||
|
||||
#include "analyzer/protocol/tcp/TCP.h"
|
||||
#include "analyzer/protocol/pia/PIA.h"
|
||||
|
||||
namespace binpac { namespace Foo { class Foo_Conn; } }
|
||||
|
||||
namespace plugin {
|
||||
namespace Demo_Foo {
|
||||
|
||||
class Foo : public analyzer::tcp::TCP_ApplicationAnalyzer {
|
||||
public:
|
||||
Foo(Connection* conn);
|
||||
~Foo();
|
||||
|
||||
virtual void Done();
|
||||
virtual void DeliverStream(int len, const u_char* data, bool orig);
|
||||
virtual void Undelivered(int seq, int len, bool orig);
|
||||
virtual void EndpointEOF(bool is_orig);
|
||||
|
||||
static analyzer::Analyzer* Instantiate(Connection* conn)
|
||||
{ return new Foo(conn); }
|
||||
|
||||
protected:
|
||||
binpac::Foo::Foo_Conn* interp;
|
||||
};
|
||||
|
||||
} }
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue