pub trait IcmpPacketTypeRaw<B: SplitByteSliceMut, I: Ip>: Sized + ParsablePacket<B, (), Error = ParseError> {
// Required methods
fn update_checksum_pseudo_header_address(
&mut self,
old: I::Addr,
new: I::Addr,
);
fn update_checksum_header_field<F: IntoBytes + Immutable>(
&mut self,
old: F,
new: F,
);
// Provided method
fn update_checksum_header_field_u16(&mut self, old: u16, new: u16) { ... }
}
Expand description
An ICMP or ICMPv6 packet
‘IcmpPacketType’ is implemented by Icmpv4Packet
and Icmpv6Packet
Required Methods§
Sourcefn update_checksum_pseudo_header_address(&mut self, old: I::Addr, new: I::Addr)
fn update_checksum_pseudo_header_address(&mut self, old: I::Addr, new: I::Addr)
Update the checksum to reflect an updated address in the pseudo header.
Sourcefn update_checksum_header_field<F: IntoBytes + Immutable>(
&mut self,
old: F,
new: F,
)
fn update_checksum_header_field<F: IntoBytes + Immutable>( &mut self, old: F, new: F, )
Update the checksum to reflect a field change in the header.
It is the caller’s responsibility to ensure the field is actually part of an ICMP header for checksumming.
Provided Methods§
Sourcefn update_checksum_header_field_u16(&mut self, old: u16, new: u16)
fn update_checksum_header_field_u16(&mut self, old: u16, new: u16)
Like IcmpPacketTypeRaw::update_checksum_header_field
, but takes
native endian u16s.
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.