pub trait FilterIpMetadata<I: IpExt, A, BT: FilterBindingsTypes>: FilterPacketMetadata {
// Required methods
fn take_connection_and_direction(
&mut self,
) -> Option<(Connection<I, NatConfig<I, A>, BT>, ConnectionDirection)>;
fn replace_connection_and_direction(
&mut self,
conn: Connection<I, NatConfig<I, A>, BT>,
direction: ConnectionDirection,
) -> Option<Connection<I, NatConfig<I, A>, BT>>;
}Expand description
A trait for interacting with the pieces of packet metadata that are important for filtering.
Required Methods§
Sourcefn take_connection_and_direction(
&mut self,
) -> Option<(Connection<I, NatConfig<I, A>, BT>, ConnectionDirection)>
fn take_connection_and_direction( &mut self, ) -> Option<(Connection<I, NatConfig<I, A>, BT>, ConnectionDirection)>
Removes the conntrack connection and packet direction, if they exist.
Sourcefn replace_connection_and_direction(
&mut self,
conn: Connection<I, NatConfig<I, A>, BT>,
direction: ConnectionDirection,
) -> Option<Connection<I, NatConfig<I, A>, BT>>
fn replace_connection_and_direction( &mut self, conn: Connection<I, NatConfig<I, A>, BT>, direction: ConnectionDirection, ) -> Option<Connection<I, NatConfig<I, A>, BT>>
Puts a new conntrack connection and packet direction into the metadata struct, returning the previous connection value, if one existed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".