Struct t2plugin::nethdr::Flow [] [src]

#[repr(C, packed)]
pub struct Flow { pub vlan_id: u16, pub src_port: u16, pub dst_port: u16, pub l4_proto: u8, pub findex: u64, pub status: u64, pub flow_index: c_ulong, pub opposite_flow_index: c_ulong, // some fields omitted }

Tranalyzer2 internal per flow structure.

Fields

flow inner VLAN tag

flow source port (UDP or TCP)

flow destination port (UDP or TCP)

Protocol number of the layer 4 header.

Unique flow index: second column of Tranalyzer2 flow output.

flow status bits.

Tranalyzer2 internal flow index: uniquely identify a flow in internal hashmap but is not unique over a Tranalyzer2 run.

Use this value with the getflow function. Use findex for a unique flow index.

Similar to flow_index but identifies the opposite flow associated to this flow.

Equals HASHTABLE_ENTRY_NOT_FOUND if this flow has no opposite flow.

Methods

impl Flow
[src]

Timestamp of the first seen packet (as the number of seconds since 1970-01-01).

Timestamp of the last seen packet (as the number of seconds since 1970-01-01).

Duration of this flow in seconds.

This method should only be called after the flow termination. To compute the current flow duration before the flow termination, use first_seen and last_seen.

Returns source IPv4 address for an IPv4 flow. None for an IPv6 flow.

Returns destination IPv4 address for an IPv4 flow. None for an IPv6 flow.

Returns source IPv6 address for an IPv6 flow. None for an IPv4 flow.

Returns destination IPv6 address for an IPv6 flow. None for an IPv4 flow.

Returns the IP version of this flow (4 or 6).