X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1345c0a23da2a0dc0bbeb6a91783abef1b235fbe..d3c78e84233473904620d9806d6558604f1b57f9:/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp diff --git a/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp b/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp index 6019fa4b..28984686 100644 --- a/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp +++ b/stargazer/plugins/capture/divert_freebsd/divert_cap.cpp @@ -25,8 +25,9 @@ $Date: 2010/09/10 06:43:03 $ #include "divert_cap.h" -#include "stg/common.h" #include "stg/traffcounter.h" +#include "stg/raw_ip_packet.h" +#include "stg/common.h" #include #include @@ -156,7 +157,7 @@ pthread_sigmask(SIG_BLOCK, &signalSet, NULL); DIVERT_CAP * dc = static_cast(d); dc->isRunning = true; -char buffer[pcktSize + 14]; +char buffer[STG::packetSize + 14]; while (dc->nonstop) { STG::RawPacket rp; @@ -165,7 +166,7 @@ while (dc->nonstop) if (buffer[12] != 0x8) continue; - memcpy(rp.rawPacket.pckt, &buffer[14], pcktSize); + memcpy(&rp.rawPacket, &buffer[14], STG::packetSize); dc->traffCnt->process(rp); }