[][src]Struct libflow::flow_id::FlowId

pub struct FlowId {
    pub transport_protocol: u8,
    pub src: IpAddr,
    pub dst: IpAddr,
    pub src_port: u16,
    pub dst_port: u16,
}

The flow unique identifier. A flow id is equal to another flow with the same transport protocol, src IP and port and dest IP and port. A flow id is also equal to another flow with the same transport protocol, and the src IP and port from one equal to the dest IP and port of the other.

Fields

transport_protocol: u8

Layer 4 protocol (e.g TCP, UDP, ICMP)

src: IpAddr

Source IP address

dst: IpAddr

Destination IP address

src_port: u16

Source port. 0 if not relevant for protocol

dst_port: u16

Destination port. 0 if not relevant for protocol

Implementations

impl FlowId[src]

pub fn new(
    transport_protocol: u8,
    src: &str,
    dst: &str,
    src_port: u16,
    dst_port: u16
) -> Self
[src]

Create a Flow Id with IP addresses for src and dest provided as string.

Trait Implementations

impl Debug for FlowId[src]

impl Default for FlowId[src]

pub fn default() -> Self[src]

Create a Flow Id with defaults values and "0.0.0.0" IP addresses for src and dest.

impl Display for FlowId[src]

impl Eq for FlowId[src]

impl Hash for FlowId[src]

impl PartialEq<FlowId> for FlowId[src]

impl Serialize for FlowId[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.