#include <netinet/in.h>
#include <arpa/inet.h>
-#include "debug_cap.h"
-#include "../../../traffcounter.h"
#include "libpal.h"
+#include "stg/plugin_creator.h"
+#include "stg/traffcounter.h"
+#include "debug_cap.h"
//-----------------------------------------------------------------------------
void WriteStat(uint32_t u, uint32_t d)
fclose(f);
}
//-----------------------------------------------------------------------------
-
-class CAP_DEBUG_CREATOR
-{
-private:
- DEBUG_CAP * dc;
-
-public:
- CAP_DEBUG_CREATOR()
- : dc(new DEBUG_CAP())
- {
- };
- ~CAP_DEBUG_CREATOR()
- {
- delete dc;
- };
-
- DEBUG_CAP * GetCapturer()
- {
- return dc;
- };
-};
-//-----------------------------------------------------------------------------
-RAW_PACKET MakeTCPPacket(const char * src,
- const char * dst,
- uint16_t sport,
- uint16_t dport,
- uint16_t len);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-CAP_DEBUG_CREATOR cdc;
+PLUGIN_CREATOR<DEBUG_CAP> cdc;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
BASE_PLUGIN * GetPlugin()
{
-return cdc.GetCapturer();
+return cdc.GetPlugin();
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+RAW_PACKET MakeTCPPacket(const char * src,
+ const char * dst,
+ uint16_t sport,
+ uint16_t dport,
+ uint16_t len);
const string DEBUG_CAP::GetVersion() const
{
return "Debug_cap v.0.01a";
//-----------------------------------------------------------------------------
uint16_t DEBUG_CAP::GetStartPosition() const
{
-return 0;
+return 40;
}
//-----------------------------------------------------------------------------
uint16_t DEBUG_CAP::GetStopPosition() const
{
-return 0;
+return 40;
}
//-----------------------------------------------------------------------------
RAW_PACKET MakeTCPPacket(const char * src,