64 typedef std::map<uint32_t, WATCH_STRUCT> watcher_id_map;
91 eoWatcher(uint32_t denialWarnCount,uint32_t denialTickBetween);
111 EO_SEC_WATCH_RESULT AddDevice(uint32_t
const DeviceID,uint32_t
const maxPerdiodTime,uint32_t
const minPeriodTime,uint32_t
const maxRLCDiff,uint32_t
const maxWrongCmac,
bool resetPeriod);
126 EO_SEC_WATCH_RESULT UpdateDevice(uint32_t
const DeviceID,uint32_t
const maxPerdiodTime,uint32_t
const minPeriodTime,uint32_t
const maxRLCDiff,uint32_t
const maxWrongCmac,
bool resetPeriod);
189 uint32_t denialCounter;
191 uint32_t tickOfLastTelegram;
194 uint32_t denialWarnCount;
196 uint32_t denialTickBetween;
198 watcher_id_map watchedMap;
The counter of maximal allowed telegrams with wrong cmacs has been reached.
Definition: eoWatcher.h:38
uint32_t maxRLCDiff
Warns if the RLC is to different!
Definition: eoWatcher.h:49
The minimal Interface for an eoWatcher class.
Definition: eoIWatcher.h:28
The telegram of the watched device came to early.
Definition: eoWatcher.h:34
uint32_t timeLastTelegram
tick count of the last handled Telegram
Definition: eoWatcher.h:55
uint32_t maxWrongCmac
maximal allowed wrong CMAC for the device
Definition: eoWatcher.h:59
void RemoveDevice(uint32_t const DeviceID)
Remove a device.
void SetDenialWarnCount(uint32_t const warnCount)
Definition: eoWatcher.h:169
The telegram of the watched device came to late.
Definition: eoWatcher.h:36
Device does not exist.
Definition: eoWatcher.h:22
every Communication from an EnOcean Device to another one consist out of one more Telegrams...
Definition: eoTelegram.h:43
EO_SEC_WATCH_RESULT AddDevice(uint32_t const DeviceID, uint32_t const maxPerdiodTime, uint32_t const minPeriodTime, uint32_t const maxRLCDiff, uint32_t const maxWrongCmac, bool resetPeriod)
Adds a Device to watch.
a class to describe an EnOcean Device
Definition: eoDevice.h:49
A denial of service is assumed.
Definition: eoWatcher.h:30
You tried to added a non secure device or the watched device does not have valid security information...
Definition: eoWatcher.h:26
Watch structure.
Definition: eoWatcher.h:46
Device is watched and no security issues.
Definition: eoWatcher.h:20
uint8_t Serialize(eoArchive &arch)
void SetDenialTickBetween(uint32_t const tickCount)
Definition: eoWatcher.h:179
uint32_t GetDenialTickBetween() const
Definition: eoWatcher.h:184
bool resetPeriod
Reset Period after every Received Telegram.
Definition: eoWatcher.h:61
EO_SEC_WATCH_RESULT UpdateDevice(uint32_t const DeviceID, uint32_t const maxPerdiodTime, uint32_t const minPeriodTime, uint32_t const maxRLCDiff, uint32_t const maxWrongCmac, bool resetPeriod)
Update device Information.
EO_SEC_WATCH_RESULT
Security Watch Result.
Definition: eoWatcher.h:17
The Difference RLC of the last and current has reached the allowed one.
Definition: eoWatcher.h:40
A Delay attack is assumed.
Definition: eoWatcher.h:32
uint32_t wrongCMACUsages
current wrong cmac
Definition: eoWatcher.h:57
bool CheckDeadDevices(std::vector< uint32_t > &deadDevicesVector)
Check for dead Devices.
Device duplicated.
Definition: eoWatcher.h:24
The processed device&message is not watched.
Definition: eoWatcher.h:28
uint32_t minPeriodTime
min Time before a Telegram is expected
Definition: eoWatcher.h:51
EO_SEC_WATCH_RESULT Reset(uint32_t const DeviceID)
Reset security parameters.
uint32_t CheckSecurity(eoDevice const *const device, eoTelegram const &tel)
checks the Security of a Device after Receiving a telegram.
an example implementation of an Security Watcher Class which tries to predict DOS and Delay Attacks...
Definition: eoWatcher.h:79
uint32_t GetDenialWarnCount() const
Definition: eoWatcher.h:174
the base Archive
Definition: eoArchive.h:46
uint32_t maxPeriodTime
max Time where a telegram is expected
Definition: eoWatcher.h:53