Struct retina_core::config::ConnTrackConfig
source · pub struct ConnTrackConfig {
pub max_connections: usize,
pub max_out_of_order: usize,
pub timeout_resolution: usize,
pub udp_inactivity_timeout: usize,
pub tcp_inactivity_timeout: usize,
pub tcp_establish_timeout: usize,
/* private fields */
}
Expand description
Connection tracking options.
These options can be used to tune for resource usage vs. accuracy depending on expected network characteristics.
§Example
[conntrack]
max_connections = 10_000_000
max_out_of_order = 100
timeout_resolution = 100
udp_inactivity_timeout = 60_000
tcp_inactivity_timeout = 300_000
tcp_establish_timeout = 5000
Fields§
§max_connections: usize
Maximum number of connections that can be tracked simultaneously per-core. Defaults to
10_000_000
.
max_out_of_order: usize
Maximum number of out-of-order packets allowed per TCP connection before it is force
expired. Defaults to 100
.
timeout_resolution: usize
Frequency to check for inactive streams (in milliseconds). Defaults to 1000
(1 second).
udp_inactivity_timeout: usize
A UDP connection can be inactive for up to this amount of time (in milliseconds) before it
is force expired. Defaults to 60_000
(1 minute).
tcp_inactivity_timeout: usize
A TCP connection can be inactive for up to this amount of time (in milliseconds) before it
is force expired. Defaults to 300_000
(5 minutes).
tcp_establish_timeout: usize
Inactivity time between the first and second packet of a TCP connection before it is force expired (in milliseconds).
This approximates connections that remain inactive in either the SYN-SENT
or
SYN-RECEIVED
state without progressing. It is used to prevent memory exhaustion due to SYN
scans and SYN floods. Defaults to 5000
(5 seconds).
Trait Implementations§
source§impl Clone for ConnTrackConfig
impl Clone for ConnTrackConfig
source§fn clone(&self) -> ConnTrackConfig
fn clone(&self) -> ConnTrackConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ConnTrackConfig
impl Debug for ConnTrackConfig
source§impl<'de> Deserialize<'de> for ConnTrackConfig
impl<'de> Deserialize<'de> for ConnTrackConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ConnTrackConfig
impl RefUnwindSafe for ConnTrackConfig
impl Send for ConnTrackConfig
impl Sync for ConnTrackConfig
impl Unpin for ConnTrackConfig
impl UnwindSafe for ConnTrackConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more