|
@@ -47,7 +47,6 @@ void statistics::checkTCPChecksum(const std::string &ipAddressSender, const std:
|
|
*/
|
|
*/
|
|
std::vector<float> statistics::calculateLastIntervalIPsEntropy(std::chrono::microseconds intervalStartTimestamp){
|
|
std::vector<float> statistics::calculateLastIntervalIPsEntropy(std::chrono::microseconds intervalStartTimestamp){
|
|
if(this->getDoExtraTests()) {
|
|
if(this->getDoExtraTests()) {
|
|
- std::cout << "interval start timestamp: " << intervalStartTimestamp.count() << std::endl;
|
|
|
|
|
|
|
|
std::vector<int> IPsSrcPktsCounts;
|
|
std::vector<int> IPsSrcPktsCounts;
|
|
std::vector<int> IPsDstPktsCounts;
|
|
std::vector<int> IPsDstPktsCounts;
|
|
@@ -80,9 +79,6 @@ std::vector<float> statistics::calculateLastIntervalIPsEntropy(std::chrono::micr
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- std::cout << "ip src count: " << IPsSrcPktsCounts.size() << std::endl;
|
|
|
|
- std::cout << "pkts sent total: " << pktsSent << std::endl;
|
|
|
|
-
|
|
|
|
for (auto i = IPsSrcPktsCounts.begin(); i != IPsSrcPktsCounts.end(); i++) {
|
|
for (auto i = IPsSrcPktsCounts.begin(); i != IPsSrcPktsCounts.end(); i++) {
|
|
IPsSrcProb.push_back(static_cast<double>(*i) / static_cast<double>(pktsSent));
|
|
IPsSrcProb.push_back(static_cast<double>(*i) / static_cast<double>(pktsSent));
|
|
}
|
|
}
|