![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <RPCDoSDetection.h>
Inheritance diagram for FRPCDoSDetection:Friends | |
| struct | FRPCDoSStateConfig |
RPC DoS detection
Implements DoS detection for NetConnection RPC's, using an escalating series of detection states depending on the severity of the DoS, to prevent false positives and minimize any performance impact.
RPC's are profiled based on count and execution time, with careful implementation of tracking to balance lookup speed, memory usage, timing, and analytics tracking.
| void FRPCDoSDetection::Init | ( | FName | NetDriverName, |
| TSharedPtr< FNetAnalyticsAggregator > & | AnalyticsAggregator, | ||
| FGetWorld && | InWorldFunc, | ||
| FGetRPCDoSAddress && | InAddressFunc, | ||
| FGetRPCDoSPlayerUID && | InPlayerUIDFunc, | ||
| FRPCDoSKickPlayer && | InKickPlayerFunc | ||
| ) |
Initialize RPC DoS Detection, inputting callbacks for retrieving external information necessary for analytics.
| NetDriverName | The name of the NetDriver which RPC DoS Detection belongs to (e.g. GameNetDriver) |
| AnalyticsAggregator | Reference to the NetDriver analytics aggregator |
| InWorldFunc | Callback for getting the current NetConnection World. |
| InAddressFunc | Callback for getting the current NetConnection address. |
| InPlayerUIDFunc | Callback for getting the current NetConnection player UID. |
| InKickPlayerFunc | Callback for kicking the player after a bad enough RPC DoS. |
RPC DoS Detection
Initializes configuration settings for RPC DoS Detection - with support for hot reloading
| NetDriverName | The name of the NetDriver which RPC DoS Detection belongs to (e.g. GameNetDriver) |
|
inline |
Whether or not RPC DoS Detection is enabled
If RPC monitoring is disabled, does extremely lightweight tracking of RPC calls, for monitoring tracking triggers, and to allow a chance for deducing full RPC tracking information if monitoring is enabled while receiving (so that e.g. if an RPC DoS attack enables monitoring, information on the RPC responsible can be recovered).
| Function | The UFunction representing the RPC |
| FunctionName | The cached name of the function |
| void FRPCDoSDetection::NotifyClose | ( | ) |
Triggered upon NetConnection Close (for committing analytics)
|
inline |
If RPC monitoring is enabled, provides a notification for every RPC that is received, with the ability to block it.
| Reader | The net bit reader containing the packet data, in case parsing of RPC parameters is desired |
| UnmappedGuids | Reference to the set of unmapped Guid's - in case it's necessary for parsing RPC parameters |
| Object | The UObject the RPC will be called on |
| Function | The UFunction representing the RPC |
| FunctionName | The cached name of the function |
Called after the current NetConnection receives a packet.
| TimeSeconds | Cached/approximate timestamp, to save grabbing a new timestamp |
|
inline |
Called after the current NetConnection receives an RPC.
Called after the current NetConnection receives a packet, when RPC DoS Detection is active and the packet contains an RPC. NOTE: Timing is approximate - may include multiple-RPC and non-RPC packet processing time - but low cost
| TimeSeconds | Cached/approximate timestamp, to save grabbing a new timestamp |
| void FRPCDoSDetection::PostSequentialRPC | ( | EPostSequentialRPCType | SequenceType, |
| double | TimeSeconds, | ||
| FRPCDoSCounters * | RPCCounter, | ||
| FRPCTrackingInfo * | RPCTrackingInfo | ||
| ) |
Called after the same RPC was received once or multiple times sequentially, for optimal timing
| SequenceType | The type of sequential RPC call (a sequence stopping mid-packet, or at the end of the packet) |
| TimeSeconds | The current time, in seconds (may be approximate) |
| RPCCounter | Cached pointer to the currently active counter, for this RPC |
| RPCTrackingInfo | Cached pointer to the tracking info, for this RPC |
| void FRPCDoSDetection::PostTickDispatch | ( | ) |
Called after the packet-loop TickDispatch
Called prior to the current NetConnection receiving a packet.
| TimeSeconds | Cached/approximate timestamp, to save grabbing a new timestamp |
Called prior to the packet-loop TickDispatch
| TimeSeconds | Cached/approximate timestamp, to save grabbing a new timestamp |
| void FRPCDoSDetection::SetAddressFunc | ( | FGetRPCDoSAddress && | InAddressFunc | ) |
Overrides the current AddressFunc
| InAddressFunc | The new AddressFunc |
| void FRPCDoSDetection::SetKickPlayerFunc | ( | FRPCDoSKickPlayer && | InKickPlayerFunc | ) |
Overrides the current KickPlayerFunc
| InKickPlayerFunc | The new KickPlayerFunc |
| void FRPCDoSDetection::SetPlayerUIDFunc | ( | FGetRPCDoSPlayerUID && | InPlayerUIDFunc | ) |
Overrides the current PlayerUIDFunc
| InPlayerUIDFunc | The new PlayerUIDFunc |
|
inline |
Whether or not monitoring of received RPC's (i.e. calling of NotifyReceivedRPC) should be performed
|
inline |
Updates the current RPC DoS detection severity state
| Update | Whether or not we are escalating or de-escalating the severity state |
| Reason | The reason for the escalation change |
|
friend |