| FDDoSPacketCounters | ||
| FDDoSState
|
Module |
|
Header |
/Engine/Source/Runtime/Net/Core/Public/Net/Core/Misc/DDoSDetection.h |
Include |
#include "Net/Core/Misc/DDoSDetection.h" |
class FDDoSDetection :
protected FDDoSPacketCounters,
protected FDDoSState
The main DDoS detection tracking class, for counting packets and applying restrictions. Implemented separate to the NetDriver, to allow wider use e.g. potentially at socket level, if useful.
Name | Description | ||
---|---|---|---|
|
ActiveState |
The currently active DDoS severity state settings |
|
|
bDDoSAnalytics |
Whether or not analytics for DDoS detection is enabled |
|
|
bDDoSDetection |
Whether or not DDoS detection is presently enabled |
|
|
bDDoSLogRestrictions |
Whether or not restriction of log messages from non-NetConnection packets is enabled |
|
|
bHitFrameNetConnLimit |
Whether or not the current frame has reached NetConnection packet limits, and should block ALL further packets |
|
|
bHitFrameNonConnLimit |
Whether or not the current frame has reached non-NetConnection packet limits, and should block non-NetConnection packets |
|
|
bMetEscalationConditionsThisFrame |
Limit checking previous states escalation conditions to once per frame |
|
|
CounterPerSecHistory |
Stores enough per second quota history, to allow all DetectionSeverity states to recalculate if their CooloffTime is reached |
|
|
DDoSLogSpamLimit |
The maximum number of non-NetConnection triggered log messages per frame, before further logs are dropped this frame |
|
|
DetectionSeverity |
The different DDoS detection states, of escalating severity, depending on the strength of the DDoS |
|
|
double |
EndFrameRecvTimestamp |
Timestamp for the end of the last frames receive loop |
|
double |
ExpectedFrameTime |
The expected time between frames (1.0 / MaxTickRate) - used for adjusting limits/quota's based on DeltaTime |
|
float |
FrameAdjustment |
The current frames adjustment/deviation, from ExpectedFrameTime |
|
HitchFrameCount |
The number of consecutive frames spent hitching |
|
|
HitchFrameTolerance |
The number of frames spent hitching, before disabling false positive detection, and treating packet buildup as potential DDoS |
|
|
HitchTimeQuotaMS |
The amount of time since the previous frame, for detecting frame hitches, to prevent DDoS detection false positives |
|
|
LastCounterPerSecHistoryIdx |
The last written index of CounterPerSecHistory |
|
|
double |
LastMetEscalationConditions |
The last time the previous severity states escalation conditions were met (to prevent bouncing up/down between states) |
|
double |
LastPerSecQuotaBegin |
Timestamp for the last time per-second quota counting began |
|
LogHitCounter |
Counter for log restriction hits, in the current frame |
|
|
NotifySeverityEscalation |
Analytics delegate for notifying of severity state escalations |
|
|
StartFramePacketCount |
Counts the packets from the start of the current frame |
|
|
double |
StartFrameRecvTimestamp |
The timestamp for the start of the current frames receive |
|
WorstActiveState |
The worst DDoS severity state that has been active - used for limiting analytics events |
Name | Description | |
---|---|---|
|
FDDoSDetection() |
Default constructor |
Name | Description | ||
---|---|---|---|
|
CheckLogRestrictions() |
Accessor for bDDoSLogRestrictions - doubles as a per-frame logspam counter, automatically disabling logs after a quota |
|
|
CheckNetConnLimits() |
Performs periodic checks on NetConnection packet limits |
|
|
CheckNonConnQuotasAndLimits() |
Performs periodic checks on trigger quota's and packet limits, for non-NetConnection packets |
|
|
CondCheckNetConnLimits() |
Rate limited call to CheckNetConnLimits |
|
|
CondCheckNonConnQuotasAndLimits() |
Rate limited call to CheckNonConnQuotasAndLimits |
|
|
GetBadPacketCounter() |
||
|
GetDisconnPacketCounter() |
||
|
GetDroppedPacketCounter() |
||
|
GetErrorPacketCounter() |
||
|
GetNetConnPacketCounter() |
||
|
GetNonConnPacketCounter() |
||
|
IncBadPacketCounter() |
||
|
IncDisconnPacketCounter() |
||
|
IncDroppedPacketCounter ( |
||
|
IncErrorPacketCounter() |
||
|
IncNetConnPacketCounter() |
||
|
IncNonConnPacketCounter() |
||
|
Init ( |
Initializes the DDoS detection settings |
|
|
InitConfig() |
Initializes the settings from the .ini file - must support reloading of settings on-the-fly |
|
|
IsDDoSAnalyticsEnabled() |
||
|
IsDDoSDetectionEnabled() |
||
|
PostFrameReceive() |
Triggered after packet receive ends, during the current frame |
|
|
PreFrameReceive ( |
Triggered before packet receive begins, during the current frame |
|
|
ShouldBlockNetConnPackets() |
||
|
ShouldBlockNonConnPackets() |
||
|
UpdateSeverity ( |
Updates the current DDoS detection severity state |