Run clang-format on all of our plugin test c++ files

This commit is contained in:
Tim Wojtulewicz 2022-06-27 16:28:50 -07:00
parent b59bfe5558
commit dc65b6248c
29 changed files with 400 additions and 336 deletions

View file

@ -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);
}