engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
FDDoSDetection类 参考

The main DDoS detection tracking class, for counting packets and applying restrictions. 更多...

#include <DDoSDetection.h>

+ 类 FDDoSDetection 继承关系图:

Public 成员函数

bool CheckLogRestrictions ()
 Accessor for bDDoSLogRestrictions - doubles as a per-frame logspam counter, automatically disabling logs after a quota
 
void CondCheckNetConnLimits ()
 Rate limited call to CheckNetConnLimits
 
void CondCheckNonConnQuotasAndLimits ()
 Rate limited call to CheckNonConnQuotasAndLimits
 
 FDDoSDetection ()
 Default constructor
 
void Init (int32 MaxTickRate)
 Initializes the DDoS detection settings 更多...
 
void InitConfig ()
 Initializes the settings from the .ini file - must support reloading of settings on-the-fly
 
void PostFrameReceive ()
 Triggered after packet receive ends, during the current frame
 
void PreFrameReceive (float DeltaTime)
 Triggered before packet receive begins, during the current frame
 
void UpdateSeverity (bool bEscalate)
 Updates the current DDoS detection severity state 更多...
 

Public 属性

FDDoSSeverityEscalation NotifySeverityEscalation
 Analytics delegate for notifying of severity state escalations
 

Protected 成员函数

bool CheckNetConnLimits ()
 Performs periodic checks on NetConnection packet limits 更多...
 
bool CheckNonConnQuotasAndLimits ()
 Performs periodic checks on trigger quota's and packet limits, for non-NetConnection packets 更多...
 
- Protected 成员函数 继承自 FDDoSState
bool HasHitQuota (FDDoSPacketCounters &InCounter, int32 TimePassedMS) const
 Whether or not the specified counters and time passed has hit any of the quota's 更多...
 

Protected 属性

int8 ActiveState
 The currently active DDoS severity state settings
 
bool bDDoSAnalytics
 Whether or not analytics for DDoS detection is enabled
 
bool bDDoSDetection
 Whether or not DDoS detection is presently enabled
 
bool bDDoSLogRestrictions
 Whether or not restriction of log messages from non-NetConnection packets is enabled
 
bool bHitFrameNetConnLimit
 Whether or not the current frame has reached NetConnection packet limits, and should block ALL further packets
 
bool bHitFrameNonConnLimit
 Whether or not the current frame has reached non-NetConnection packet limits, and should block non-NetConnection packets
 
bool bMetEscalationConditionsThisFrame
 Limit checking previous states escalation conditions to once per frame
 
TArray< FDDoSPacketCounters > CounterPerSecHistory
 Stores enough per second quota history, to allow all DetectionSeverity states to recalculate if their CooloffTime is reached
 
int32 DDoSLogSpamLimit
 The maximum number of non-NetConnection triggered log messages per frame, before further logs are dropped this frame
 
TArray< FDDoSStateConfig > 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
 
int32 HitchFrameCount
 The number of consecutive frames spent hitching
 
int8 HitchFrameTolerance
 The number of frames spent hitching, before disabling false positive detection, and treating packet buildup as potential DDoS
 
int32 HitchTimeQuotaMS
 The amount of time since the previous frame, for detecting frame hitches, to prevent DDoS detection false positives
 
int32 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
 
int32 LogHitCounter
 Counter for log restriction hits, in the current frame
 
int32 StartFramePacketCount
 Counts the packets from the start of the current frame
 
double StartFrameRecvTimestamp
 The timestamp for the start of the current frames receive
 
int8 WorstActiveState
 The worst DDoS severity state that has been active - used for limiting analytics events
 
- Protected 属性 继承自 FDDoSPacketCounters
int32 BadPacketCounter
 Counter for bad non-NetConnection packets received, since the last per second quota period began
 
int32 DisconnPacketCounter
 Counter for recently-disconnected NetConnection packets received, since the last per second quota period beegan
 
int32 DroppedPacketCounter
 Counter for the number of packets (of any type) dropped, since the last per second quota period began
 
int32 ErrorPacketCounter
 Counter for non-DDoS packet errors received
 
int32 NetConnPacketCounter
 Counter for NetConnection packets received, since the last per second quota period began
 
int32 NonConnPacketCounter
 Counter for non-NetConnection packets received, since the last per second quota period began
 
int32 WorstFrameReceiveTimeMS
 The worst per-frame packet receive time in milliseconds, over the ~1 second this packet counter history represents
 
- Protected 属性 继承自 FDDoSState
int32 CooloffTime
 The amount of time, in seconds, before the current DDoS severity category cools off and de-escalates
 
int32 EscalateQuotaBadPacketsPerSec
 The number of bad (failed to process correctly) packets/sec, before the next stage of DDoS detection is triggered
 
int32 EscalateQuotaDisconnPacketsPerSec
 The number of recently disconnected NetConnection packets/sec, before the next stage of DDoS detection is triggered.
 
int32 EscalateQuotaPacketsPerSec
 The number of packets/sec before the next stage of DDoS detection is triggered
 
int16 EscalateTimeQuotaMSPerFrame
 The amount of time spent processing packets, before the next stage of DDoS detection is triggered
 
int32 NetConnPacketTimeLimitMSPerFrame
 The limit for time spent processing NetConnection packets, each frame (counts all packets time, non-NetConn and NetConn)
 
int32 PacketLimitPerFrame
 The limit for the number of non-NetConnection packets to process, each frame
 
int32 PacketTimeLimitMSPerFrame
 The limit for time spent processing non-NetConnection packets, each frame (counts all packets time, non-NetConn and NetConn)
 

详细描述

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.

成员函数说明

◆ CheckNetConnLimits()

bool FDDoSDetection::CheckNetConnLimits ( )
inlineprotected

Performs periodic checks on NetConnection packet limits

返回
Whether or not NetColnnection packet limits have been reached

◆ CheckNonConnQuotasAndLimits()

bool FDDoSDetection::CheckNonConnQuotasAndLimits ( )
protected

Performs periodic checks on trigger quota's and packet limits, for non-NetConnection packets

返回
Whether or not non-NetConnection packet limits have been reached

◆ Init()

void FDDoSDetection::Init ( int32  MaxTickRate)

Initializes the DDoS detection settings

参数
MaxTickRateThe maximum tick rate of the server

◆ UpdateSeverity()

void FDDoSDetection::UpdateSeverity ( bool  bEscalate)

Updates the current DDoS detection severity state

参数
bEscalateWhether or not we are escalating or de-escalating the severity state

该类的文档由以下文件生成: