Struct Flow

Source
pub struct Flow {
Show 21 fields pub id: Option<u32>, pub origin: Option<IpTuple>, pub reply: Option<IpTuple>, pub proto_info: Option<ProtoInfo>, pub counter_origin: Option<Counter>, pub counter_reply: Option<Counter>, pub timeout: Option<Duration>, pub status: Option<Vec<String>>, pub entry_use: Option<u32>, pub zone: Option<u16>, pub mark: Option<u32>, pub mark_mask: Option<u32>, pub timestamp: Option<Timestamp>, pub status_mask: Option<u32>, pub helper: Option<Helper>, pub nat_src: Option<Nat>, pub seq_adj_orig: Option<SeqAdj>, pub seq_adj_repl: Option<SeqAdj>, pub sec_ctx: Option<SecCtx>, pub sec_mark: Option<u32>, pub exp: Option<Exp>,
}
Expand description

The Flow type contains all the information of a connection dumped from the conntrack table. Note that the Flow type can be used to support multiple extended formats as well to allow for expansions on the library. Thus, all fields will be optional to support the various formats/options/configs that can be set by the linux kernel.

Fields§

§id: Option<u32>

Unique id assigned to this conntrack entry.

§origin: Option<IpTuple>

The origin of the network traffic, containing the src address and sport, the dst address and dport, and protocol information.

§reply: Option<IpTuple>

The reply of the network traffic, containing the src address and sport, the dst address and dport, and protocol information.

§proto_info: Option<ProtoInfo>

Metadata specific to the protocol being used to facilitate the network transfer.

§counter_origin: Option<Counter>

Byte and packet counter data relative to the traffic origin. Enable with sysctl -w net.netfilter.nf_conntrack_acct=1

§counter_reply: Option<Counter>

Byte and packet counter data relative to the traffic reply. Enable with sysctl -w net.netfilter.nf_conntrack_acct=1

§timeout: Option<Duration>

Duration until conntrack entry is invalidated; reset to initial value when connection sees a new packet. Default TCP connection timeout is 5 days.

§status: Option<Vec<String>>

Contains the status values parsed into the various status flags, represented as strings.

§entry_use: Option<u32>

Use is a reference count for the connection used internally for garbage collection.

§zone: Option<u16>§mark: Option<u32>§mark_mask: Option<u32>§timestamp: Option<Timestamp>§status_mask: Option<u32>§helper: Option<Helper>§nat_src: Option<Nat>§seq_adj_orig: Option<SeqAdj>§seq_adj_repl: Option<SeqAdj>§sec_ctx: Option<SecCtx>§sec_mark: Option<u32>§exp: Option<Exp>

Trait Implementations§

Source§

impl<'a> AttrDecoder<'a, ConntrackAttr, Flow> for Flow

Source§

impl Clone for Flow

Source§

fn clone(&self) -> Flow

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 Flow

Source§

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

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

impl Default for Flow

Source§

fn default() -> Flow

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

impl<'de> Deserialize<'de> for Flow

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 Flow

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§

§

impl Freeze for Flow

§

impl RefUnwindSafe for Flow

§

impl Send for Flow

§

impl Sync for Flow

§

impl Unpin for Flow

§

impl UnwindSafe for Flow

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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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

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