X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/3a45cd9275dc9279e133deb0932402ae5f4d0b5f..f7163d9c994af13f0f72f49f7203b7ac3e281a1e:/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp diff --git a/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp b/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp index 07e38577..20ca2480 100644 --- a/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp +++ b/projects/stargazer/plugins/capture/ether_freebsd/ether_cap.cpp @@ -48,44 +48,24 @@ $Author: faust $ #include #include -#include "ether_cap.h" #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 -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -class BPF_CAP_CREATOR { -private: - BPF_CAP * bpfc; - -public: - BPF_CAP_CREATOR() - : bpfc(new BPF_CAP()) - { - } - ~BPF_CAP_CREATOR() - { - delete bpfc; - } - BPF_CAP * GetCapturer() - { - return bpfc; - } -}; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -BPF_CAP_CREATOR bcc; +PLUGIN_CREATOR bcc; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- PLUGIN * GetPlugin() { -return bcc.GetCapturer(); +return bcc.GetPlugin(); } //----------------------------------------------------------------------------- //-----------------------------------------------------------------------------