bDDoSAnalytics
bDDoSAnalytics
#Overview
name: bDDoSAnalytics
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bDDoSAnalytics is to enable or disable analytics for DDoS (Distributed Denial of Service) detection in Unreal Engine 5. This variable is part of the networking system, specifically related to security and performance monitoring.
The Unreal Engine subsystem that relies on this setting variable is the Net Core module, particularly the DDoS detection feature. This can be seen from the file paths and class names in the provided code snippets.
The value of this variable is set in the InitConfig() function of the FDDoSDetection class. It reads the value from the engine configuration file (GEngineIni) using the GConfig system:
GConfig->GetBool(DDoSSection, TEXT("bDDoSAnalytics"), bDDoSAnalytics, GEngineIni);
This variable interacts with other DDoS detection-related variables, such as bDDoSDetection, which enables or disables the overall DDoS detection feature.
Developers must be aware that this variable controls whether analytical data about DDoS detection is collected and potentially sent. When enabled, it may trigger the NotifySeverityEscalation callback when DDoS severity escalates.
Best practices when using this variable include:
- Ensure it’s only enabled in environments where you want to collect DDoS analytics data.
- Be mindful of any privacy or performance implications of enabling this feature.
- Implement appropriate handling for the NotifySeverityEscalation callback if analytics are enabled.
- Consider the interaction between this variable and the overall DDoS detection system (bDDoSDetection).
When using this variable, developers should also review the entire DDoS detection configuration and ensure it aligns with their project’s security and performance requirements.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1648, section: [DDoSDetection]
- INI Section:
DDoSDetection
- Raw value:
false
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Misc/DDoSDetection.cpp:64
Scope (from outer to inner):
file
function FDDoSDetection::FDDoSDetection
Source code excerpt:
FDDoSDetection::FDDoSDetection()
: bDDoSDetection(false)
, bDDoSAnalytics(false)
, bHitFrameNonConnLimit(false)
, bHitFrameNetConnLimit(false)
, DetectionSeverity()
, ActiveState(0)
, WorstActiveState(0)
, LastMetEscalationConditions(0.0)
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Misc/DDoSDetection.cpp:103
Scope (from outer to inner):
file
function void FDDoSDetection::InitConfig
Source code excerpt:
GConfig->GetBool(DDoSSection, TEXT("bDDoSDetection"), bDDoSDetection, GEngineIni);
GConfig->GetBool(DDoSSection, TEXT("bDDoSAnalytics"), bDDoSAnalytics, GEngineIni);
GConfig->GetInt(DDoSSection, TEXT("DDoSLogSpamLimit"), DDoSLogSpamLimit, GEngineIni);
GConfig->GetInt(DDoSSection, TEXT("HitchTimeQuotaMS"), HitchTimeQuotaMS, GEngineIni);
GConfig->GetInt(DDoSSection, TEXT("HitchFrameTolerance"), HitchFrameTolerance32, GEngineIni);
HitchFrameTolerance = IntCastChecked<int8>(HitchFrameTolerance32);
DDoSLogSpamLimit = DDoSLogSpamLimit > 0 ? DDoSLogSpamLimit : 64;
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Misc/DDoSDetection.cpp:113
Scope (from outer to inner):
file
function void FDDoSDetection::InitConfig
Source code excerpt:
DetectionSeverity.Empty();
UE_LOG(LogNetCore, Log, TEXT("DDoS detection status: detection enabled: %d analytics enabled: %d"), bDDoSDetection, bDDoSAnalytics);
if (bDDoSDetection)
{
TArray<FString> SeverityCatagories;
int32 HighestCooloffTime = 0;
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Private/Net/Core/Misc/DDoSDetection.cpp:249
Scope (from outer to inner):
file
function void FDDoSDetection::UpdateSeverity
Source code excerpt:
if (bEscalate && ActiveState > WorstActiveState)
{
if (bDDoSAnalytics && CurState.bSendEscalateAnalytics)
{
NotifySeverityEscalation.ExecuteIfBound(CurState.SeverityCategory);
}
WorstActiveState = ActiveState;
}
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Public/Net/Core/Misc/DDoSDetection.h:251
Scope (from outer to inner):
file
class class FDDoSDetection : protected FDDoSPacketCounters, protected FDDoSState
function bool IsDDoSAnalyticsEnabled
Source code excerpt:
bool IsDDoSDetectionEnabled() const { return bDDoSDetection; }
bool IsDDoSAnalyticsEnabled() const { return bDDoSAnalytics; }
bool ShouldBlockNonConnPackets() const { return bHitFrameNonConnLimit; }
bool ShouldBlockNetConnPackets() const { return bHitFrameNetConnLimit; }
void IncNonConnPacketCounter() { ++NonConnPacketCounter; }
int32 GetNonConnPacketCounter() const { return NonConnPacketCounter; }
void IncNetConnPacketCounter() { ++NetConnPacketCounter; }
#Loc: <Workspace>/Engine/Source/Runtime/Net/Core/Public/Net/Core/Misc/DDoSDetection.h:294
Scope (from outer to inner):
file
class class FDDoSDetection : protected FDDoSPacketCounters, protected FDDoSState
Source code excerpt:
/** Whether or not analytics for DDoS detection is enabled */
bool bDDoSAnalytics;
/** Whether or not the current frame has reached non-NetConnection packet limits, and should block non-NetConnection packets */
bool bHitFrameNonConnLimit;
/** Whether or not the current frame has reached NetConnection packet limits, and should block ALL further packets */
bool bHitFrameNetConnLimit;