IpSocketProperties

Trait IpSocketProperties 

Source
pub trait IpSocketProperties<DeviceClass> {
    // Required methods
    fn family_matches(&self, family: &IpVersion) -> bool;
    fn src_addr_matches(&self, addr: &AgnosticAddressMatcher) -> bool;
    fn dst_addr_matches(&self, addr: &AgnosticAddressMatcher) -> bool;
    fn transport_protocol_matches(
        &self,
        matcher: &SocketTransportProtocolMatcher,
    ) -> bool;
    fn bound_interface_matches(
        &self,
        iface: &BoundInterfaceMatcher<DeviceClass>,
    ) -> bool;
    fn cookie_matches(&self, cookie: &SocketCookieMatcher) -> bool;
    fn mark1_matches(&self, mark: &MarkMatcher) -> bool;
    fn mark2_matches(&self, mark: &MarkMatcher) -> bool;
}
Expand description

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

Required Methods§

Source

fn family_matches(&self, family: &IpVersion) -> bool

Returns whether the provided IP version matches the socket.

Source

fn src_addr_matches(&self, addr: &AgnosticAddressMatcher) -> bool

Returns whether the provided address matcher matches the socket’s source address.

Source

fn dst_addr_matches(&self, addr: &AgnosticAddressMatcher) -> bool

Returns whether the provided address matcher matches the socket’s destination address.

Source

fn transport_protocol_matches( &self, matcher: &SocketTransportProtocolMatcher, ) -> bool

Returns whether the transport protocol matches the socket’s transport-layer information.

Source

fn bound_interface_matches( &self, iface: &BoundInterfaceMatcher<DeviceClass>, ) -> bool

Returns whether the provided interface matcher matches the socket’s bound interface, if present.

Source

fn cookie_matches(&self, cookie: &SocketCookieMatcher) -> bool

Returns whether the provided cookie matcher matches the socket’s cookie.

Source

fn mark1_matches(&self, mark: &MarkMatcher) -> bool

Returns whether the provided mark matcher matches the socket’s mark 1, if present.

Source

fn mark2_matches(&self, mark: &MarkMatcher) -> bool

Returns whether the provided mark matcher matches the socket’s mark 2, if present.

Implementors§