Skip to main content

TcpSocketProperties

Trait TcpSocketProperties 

Source
pub trait TcpSocketProperties {
    // Required methods
    fn src_port_matches(&self, matcher: &BoundPortMatcher) -> bool;
    fn dst_port_matches(&self, matcher: &BoundPortMatcher) -> bool;
    fn state_matches(&self, matcher: &TcpStateMatcher) -> bool;
}
Expand description

Allows code to match on properties of a TCP socket without Netstack3 Core having to specifically expose that state.

Required Methods§

Source

fn src_port_matches(&self, matcher: &BoundPortMatcher) -> bool

Returns whether the socket’s source port is matched by the matcher.

Source

fn dst_port_matches(&self, matcher: &BoundPortMatcher) -> bool

Returns whether the socket’s destination port is matched by the matcher.

Source

fn state_matches(&self, matcher: &TcpStateMatcher) -> bool

Returns whether the socket’s TCP state is matched by the matcher.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TcpSocketProperties for Infallible

Source§

impl<T> TcpSocketProperties for &T

Implementors§