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

source§

fn clone(&self) -> ConnTrackConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ConnTrackConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ConnTrackConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ConnTrackConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,