pub trait IcmpMessage<I: IpExt>: IcmpMessage<I> + MaybeTransportPacket {
const IS_REWRITABLE: bool;
// Required method
fn update_icmp_id(&mut self, id: u16) -> u16;
// Provided method
fn is_rewritable(&self) -> bool { ... }
}
Expand description
An ICMP message type that may allow for transport-layer packet inspection.
Required Associated Constants§
Sourceconst IS_REWRITABLE: bool
const IS_REWRITABLE: bool
Whether this ICMP message supports rewriting the ID.
Required Methods§
Sourcefn update_icmp_id(&mut self, id: u16) -> u16
fn update_icmp_id(&mut self, id: u16) -> u16
Sets the ICMP ID for the message, returning the previous value.
The ICMP ID is both the src AND dst ports for conntrack entries.
Provided Methods§
Sourcefn is_rewritable(&self) -> bool
fn is_rewritable(&self) -> bool
The same as IcmpMessage::IS_REWRITABLE
, but for when you have an
object, rather than a type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.