|
@@ -242,12 +242,12 @@ struct entry_intervalStat {
|
|
|
float pkt_rate;
|
|
|
float kbytes;
|
|
|
float kbyte_rate;
|
|
|
- float ip_src_entropy;
|
|
|
- float ip_dst_entropy;
|
|
|
- float ip_src_novel_entropy;
|
|
|
- float ip_dst_novel_entropy;
|
|
|
- float ip_src_cum_entropy;
|
|
|
- float ip_dst_cum_entropy;
|
|
|
+ double ip_src_entropy;
|
|
|
+ double ip_dst_entropy;
|
|
|
+ double ip_src_novel_entropy;
|
|
|
+ double ip_dst_novel_entropy;
|
|
|
+ double ip_src_cum_entropy;
|
|
|
+ double ip_dst_cum_entropy;
|
|
|
std::vector<double> ttl_entropies;
|
|
|
std::vector<double> win_size_entropies;
|
|
|
std::vector<double> tos_entropies;
|
|
@@ -274,17 +274,25 @@ struct entry_intervalStat {
|
|
|
&& kbyte_rate == other.kbyte_rate
|
|
|
&& ip_src_entropy == other.ip_src_entropy
|
|
|
&& ip_dst_entropy == other.ip_dst_entropy
|
|
|
+ && ip_src_novel_entropy == other.ip_src_novel_entropy
|
|
|
+ && ip_dst_novel_entropy == other.ip_dst_novel_entropy
|
|
|
&& ip_src_cum_entropy == other.ip_src_cum_entropy
|
|
|
&& ip_dst_cum_entropy == other.ip_dst_cum_entropy
|
|
|
&& payload_count == other.payload_count
|
|
|
&& incorrect_tcp_checksum_count == other.incorrect_tcp_checksum_count
|
|
|
+ && correct_tcp_checksum_count == other.correct_tcp_checksum_count
|
|
|
&& novel_ip_src_count == other.novel_ip_src_count
|
|
|
&& novel_ip_dst_count == other.novel_ip_dst_count
|
|
|
&& novel_ttl_count == other.novel_ttl_count
|
|
|
&& novel_win_size_count == other.novel_win_size_count
|
|
|
&& novel_tos_count == other.novel_tos_count
|
|
|
&& novel_mss_count == other.novel_mss_count
|
|
|
- && novel_port_count == other.novel_port_count;
|
|
|
+ && novel_port_count == other.novel_port_count
|
|
|
+ && ttl_entropies == other.ttl_entropies
|
|
|
+ && win_size_entropies == other.win_size_entropies
|
|
|
+ && tos_entropies == other.tos_entropies
|
|
|
+ && mss_entropies == other.mss_entropies
|
|
|
+ && port_entropies == other.port_entropies;
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -560,7 +568,7 @@ public:
|
|
|
|
|
|
std::vector<float> calculateIPsCumEntropy();
|
|
|
|
|
|
- std::vector<float> calculateLastIntervalIPsEntropy(std::chrono::microseconds intervalStartTimestamp);
|
|
|
+ std::vector<double> calculateLastIntervalIPsEntropy(std::chrono::microseconds intervalStartTimestamp);
|
|
|
|
|
|
std::vector<double> calculateEntropies(std::unordered_map<int, int> &map, std::unordered_map<int, int> &old);
|
|
|
|