mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Run clang-format on all of our plugin test c++ files
This commit is contained in:
parent
b59bfe5558
commit
dc65b6248c
29 changed files with 400 additions and 336 deletions
|
@ -1,14 +1,14 @@
|
|||
|
||||
#include "Foo.h"
|
||||
#include "foo_pac.h"
|
||||
#include "events.bif.h"
|
||||
|
||||
#include "zeek/analyzer/protocol/tcp/TCP_Reassembler.h"
|
||||
|
||||
#include "events.bif.h"
|
||||
#include "foo_pac.h"
|
||||
|
||||
using namespace btest::plugin::Demo_Foo;
|
||||
|
||||
Foo::Foo(zeek::Connection* conn)
|
||||
: zeek::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);
|
||||
}
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
|
||||
#include "Plugin.h"
|
||||
|
||||
#include "Foo.h"
|
||||
#include "analyzer/Component.h"
|
||||
#include "analyzer/Manager.h"
|
||||
|
||||
#include "Foo.h"
|
||||
|
||||
namespace btest::plugin::Demo_Foo { Plugin plugin; }
|
||||
namespace btest::plugin::Demo_Foo
|
||||
{
|
||||
Plugin plugin;
|
||||
}
|
||||
|
||||
using namespace btest::plugin::Demo_Foo;
|
||||
|
||||
zeek::plugin::Configuration Plugin::Configure()
|
||||
{
|
||||
AddComponent(new zeek::analyzer::Component("Foo", btest::plugin::Demo_Foo::Foo::Instantiate, 1));
|
||||
AddComponent(
|
||||
new zeek::analyzer::Component("Foo", btest::plugin::Demo_Foo::Foo::Instantiate, 1));
|
||||
|
||||
zeek::plugin::Configuration config;
|
||||
config.name = "Demo::Foo";
|
||||
|
@ -22,12 +26,11 @@ zeek::plugin::Configuration Plugin::Configure()
|
|||
return config;
|
||||
}
|
||||
|
||||
|
||||
void Plugin::InitPostScript()
|
||||
{
|
||||
auto tag = ::zeek::analyzer_mgr->GetAnalyzerTag("Foo");
|
||||
if ( ! tag )
|
||||
::zeek::reporter->FatalError("cannot get analyzer Tag");
|
||||
auto tag = ::zeek::analyzer_mgr->GetAnalyzerTag("Foo");
|
||||
if ( ! tag )
|
||||
::zeek::reporter->FatalError("cannot get analyzer Tag");
|
||||
|
||||
zeek::analyzer_mgr->RegisterAnalyzerForPort(tag, TransportProto::TRANSPORT_TCP, 4243);
|
||||
zeek::analyzer_mgr->RegisterAnalyzerForPort(tag, TransportProto::TRANSPORT_TCP, 4243);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue