Skip to main content

FilterConfig

Struct FilterConfig 

Source
pub struct FilterConfig {
Show 17 fields pub negate: bool, pub rules: Vec<FilterRuleConfig>, pub proto: Vec<String>, pub src_ip: Vec<String>, pub dst_ip: Vec<String>, pub ip: Vec<String>, pub src_port: Vec<String>, pub dst_port: Vec<String>, pub port: Vec<String>, pub flow_id: Vec<String>, pub from: Option<String>, pub to: Option<String>, pub tcp_flags: Option<String>, pub min_len: Option<u32>, pub max_len: Option<u32>, pub unidirectional: bool, pub min_flow_packets: Option<u64>,
}
Expand description

Filter configuration.

Fields§

§negate: bool

When true, the entire filter result is inverted.

§rules: Vec<FilterRuleConfig>

Additional filter rules chained after the base body.

§proto: Vec<String>

IP protocols to keep (e.g. ["tcp", "udp"]).

§src_ip: Vec<String>

Source IP addresses / CIDRs to keep (OR-ed).

§dst_ip: Vec<String>

Destination IP addresses / CIDRs to keep (OR-ed).

§ip: Vec<String>

Either-endpoint IP addresses / CIDRs (OR-ed).

§src_port: Vec<String>

Source port or range strings to keep (OR-ed).

§dst_port: Vec<String>

Destination port or range strings to keep (OR-ed).

§port: Vec<String>

Either-endpoint port or range strings (OR-ed).

§flow_id: Vec<String>

Hex flow IDs to retain (comma-separated or multiple entries).

§from: Option<String>

Retain only packets at or after this datetime (RFC 3339 or Unix epoch seconds).

§to: Option<String>

Retain only packets at or before this datetime (RFC 3339 or Unix epoch seconds).

§tcp_flags: Option<String>

TCP flags filter string (e.g. "SYN+ACK", "RST:exact").

§min_len: Option<u32>

Minimum captured packet length in bytes.

§max_len: Option<u32>

Maximum captured packet length in bytes.

§unidirectional: bool

Use unidirectional flow IDs (default: bidirectional).

§min_flow_packets: Option<u64>

Only include flows with at least this many packets. Non-IP packets are excluded when this filter is active.

Trait Implementations§

Source§

impl Debug for FilterConfig

Source§

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

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

impl Default for FilterConfig

Source§

fn default() -> FilterConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FilterConfig

Source§

fn deserialize(value: &mut Value<'de>) -> Result<Self, DeserError>

Given a mutable Value, allows you to deserialize the type from it, or accumulate 1 or more errors

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V