mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
23 lines
490 B
C++
23 lines
490 B
C++
// See the file "COPYING" in the main distribution directory for copyright.
|
|
|
|
#pragma once
|
|
|
|
#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
|