Enum smoltcp::wire::Icmpv4Repr
source · pub enum Icmpv4Repr<'a> {
EchoRequest {
ident: u16,
seq_no: u16,
data: &'a [u8],
},
EchoReply {
ident: u16,
seq_no: u16,
data: &'a [u8],
},
DstUnreachable {
reason: DstUnreachable,
header: Ipv4Repr,
data: &'a [u8],
},
// some variants omitted
}
Expand description
A high-level representation of an Internet Control Message Protocol version 4 packet header.
Variants§
Implementations§
source§impl<'a> Repr<'a>
impl<'a> Repr<'a>
sourcepub fn parse<T>(
packet: &Packet<&'a T>,
checksum_caps: &ChecksumCapabilities
) -> Result<Repr<'a>>where
T: AsRef<[u8]> + ?Sized,
pub fn parse<T>(
packet: &Packet<&'a T>,
checksum_caps: &ChecksumCapabilities
) -> Result<Repr<'a>>where
T: AsRef<[u8]> + ?Sized,
Parse an Internet Control Message Protocol version 4 packet and return a high-level representation.
sourcepub fn buffer_len(&self) -> usize
pub fn buffer_len(&self) -> usize
Return the length of a packet that will be emitted from this high-level representation.