zeek/src/WeirdState.h
Benjamin Bannier f5a76c1aed Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
2023-10-30 09:40:55 +01:00

21 lines
497 B
C++

// See the file "COPYING" in the main distribution directory for copyright.
#pragma once
#include <cstdint>
#include <string>
#include <unordered_map>
namespace zeek::detail {
struct WeirdState {
WeirdState() = default;
uint64_t count = 0;
double sampling_start_time = 0;
};
using WeirdStateMap = std::unordered_map<std::string, WeirdState>;
bool PermitWeird(WeirdStateMap& wsm, const char* name, uint64_t threshold, uint64_t rate, double duration);
} // namespace zeek::detail