#include "raw_ip_packet.h"
extern "C"
- {
- #include "libipq.h"
- }
-
-class IPQ_CAP_CREATOR
{
+#include "libipq.h"
+}
+
+class IPQ_CAP_CREATOR {
private:
IPQ_CAP * ic;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-BASE_PLUGIN * GetPlugin()
+PLUGIN * GetPlugin()
{
return icc.GetCapturer();
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-const string IPQ_CAP::GetVersion() const
+const std::string IPQ_CAP::GetVersion() const
{
return "ipq_cap v.1.2";
}
//-----------------------------------------------------------------------------
IPQ_CAP::IPQ_CAP()
+ : ipq_h(NULL),
+ nonstop(false),
+ isRunning(false),
+ capSock(-1),
+ traffCnt(NULL)
{
-isRunning = false;
-nonstop = false;
+memset(buf, 0, BUFSIZE);
}
//-----------------------------------------------------------------------------
void IPQ_CAP::SetTraffcounter(TRAFFCOUNTER * tc)
traffCnt = tc;
}
//-----------------------------------------------------------------------------
-const string & IPQ_CAP::GetStrError() const
+const std::string & IPQ_CAP::GetStrError() const
{
return errorStr;
}