Move MySQL analyzer to the new plugin architecture.

This commit is contained in:
Vlad Grigorescu 2014-10-27 13:55:10 -04:00
parent b259a41ef2
commit 45d5080870
2 changed files with 18 additions and 6 deletions

View file

@ -28,7 +28,7 @@ public:
virtual void EndpointEOF(bool is_orig);
static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn)
static analyzer::Analyzer* Instantiate(Connection* conn)
{ return new MySQL_Analyzer(conn); }
static bool Available()

View file

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