Moving existing built-in plugins over to new interface.

This commit is contained in:
Robin Sommer 2014-01-18 22:10:06 +01:00
parent ea01a1be30
commit 2c34101394
85 changed files with 944 additions and 293 deletions

View file

@ -183,7 +183,7 @@ public:
virtual void ConnectionReset();
virtual void PacketWithRST();
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
static analyzer::Analyzer* Instantiate(Connection* conn)
{ return new HTTP_Analyzer(conn); }
static bool Available()

View file

@ -1,11 +1,25 @@
// See the file in the main distribution directory for copyright.
#include "plugin/Plugin.h"
#include "HTTP.h"
BRO_PLUGIN_BEGIN(Bro, HTTP)
BRO_PLUGIN_DESCRIPTION("HTTP analyzer");
BRO_PLUGIN_ANALYZER("HTTP", http::HTTP_Analyzer);
BRO_PLUGIN_BIF_FILE(events);
BRO_PLUGIN_BIF_FILE(functions);
BRO_PLUGIN_END
namespace plugin {
namespace Bro_HTTP {
class Plugin : public plugin::Plugin {
public:
plugin::Configuration Configure()
{
AddComponent(new ::analyzer::Component("HTTP", ::analyzer::http::HTTP_Analyzer::Instantiate));
plugin::Configuration config;
config.name = "Bro::HTTP";
config.description = "HTTP analyzer";
return config;
}
} plugin;
}
}