From a191eed7db7b625d40336ef7aabbd2d245cbb54a Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Tue, 16 Apr 2013 14:43:20 -0700 Subject: [PATCH] Adding separate Plugin.cc for HTTP analyzer for consistency. --- src/analyzer/protocols/http/CMakeLists.txt | 2 +- src/analyzer/protocols/http/HTTP.cc | 9 --------- src/analyzer/protocols/http/Plugin.cc | 10 ++++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 src/analyzer/protocols/http/Plugin.cc diff --git a/src/analyzer/protocols/http/CMakeLists.txt b/src/analyzer/protocols/http/CMakeLists.txt index b6d877cdd7..68bdb632a4 100644 --- a/src/analyzer/protocols/http/CMakeLists.txt +++ b/src/analyzer/protocols/http/CMakeLists.txt @@ -4,7 +4,7 @@ include(BroPlugin) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) bro_plugin_begin(HTTP) -bro_plugin_cc(HTTP.cc) +bro_plugin_cc(HTTP.cc Plugin.cc) bro_plugin_bif(events.bif) bro_plugin_bif(functions.bif) bro_plugin_end() diff --git a/src/analyzer/protocols/http/HTTP.cc b/src/analyzer/protocols/http/HTTP.cc index 61ce2e0833..98c8ad484e 100644 --- a/src/analyzer/protocols/http/HTTP.cc +++ b/src/analyzer/protocols/http/HTTP.cc @@ -13,15 +13,6 @@ #include "Event.h" #include "MIME.h" -#include "plugin/Plugin.h" - -BRO_PLUGIN_BEGIN(HTTP) - BRO_PLUGIN_DESCRIPTION("HTTP Analyzer"); - BRO_PLUGIN_ANALYZER("HTTP", HTTP_Analyzer::InstantiateAnalyzer); - BRO_PLUGIN_BIF_FILE(events); - BRO_PLUGIN_BIF_FILE(functions); -BRO_PLUGIN_END - const bool DEBUG_http = false; // The EXPECT_*_NOTHING states are used to prevent further parsing. Used if a diff --git a/src/analyzer/protocols/http/Plugin.cc b/src/analyzer/protocols/http/Plugin.cc new file mode 100644 index 0000000000..5dab5c3c18 --- /dev/null +++ b/src/analyzer/protocols/http/Plugin.cc @@ -0,0 +1,10 @@ + +#include "plugin/Plugin.h" + +#include "HTTP.h" + +BRO_PLUGIN_BEGIN(HTTP) + BRO_PLUGIN_DESCRIPTION("HTTP Analyzer"); + BRO_PLUGIN_ANALYZER("HTTP", HTTP_Analyzer::InstantiateAnalyzer); + BRO_PLUGIN_BIF_FILE(events); +BRO_PLUGIN_END