X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/e5499c61083684b28bcbc6950aae66cbf0938703..e9ae1f101b5418c0ba2e6c9d86b23c12f0140982:/stargazer/plugins/capture/ether_linux/ether_cap.cpp diff --git a/stargazer/plugins/capture/ether_linux/ether_cap.cpp b/stargazer/plugins/capture/ether_linux/ether_cap.cpp index cc64bc18..389f2eb5 100644 --- a/stargazer/plugins/capture/ether_linux/ether_cap.cpp +++ b/stargazer/plugins/capture/ether_linux/ether_cap.cpp @@ -27,6 +27,17 @@ $Revision: 1.23 $ $Date: 2009/12/13 13:45:13 $ */ +#include "ether_cap.h" + +#include "stg/common.h" +#include "stg/raw_ip_packet.h" +#include "stg/traffcounter.h" + +#include +#include +#include +#include +#include #include #include @@ -38,36 +49,12 @@ $Date: 2009/12/13 13:45:13 $ #include #include -#include -#include -#include -#include -#include - -#include "stg/common.h" -#include "stg/raw_ip_packet.h" -#include "stg/traffcounter.h" -#include "stg/plugin_creator.h" - -#include "ether_cap.h" - //#define CAP_DEBUG 1 -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -namespace -{ -PLUGIN_CREATOR ecc; -} - -extern "C" PLUGIN * GetPlugin(); -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -PLUGIN * GetPlugin() +extern "C" Plugin* GetPlugin() { -return ecc.GetPlugin(); +static ETHER_CAP plugin; +return &plugin; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -82,7 +69,7 @@ ETHER_CAP::ETHER_CAP() isRunning(false), capSock(-1), traffCnt(NULL), - logger(GetPluginLogger(GetStgLogger(), "cap_ether")) + logger(PluginLogger::get("cap_ether")) { } //-----------------------------------------------------------------------------