Struct cross_socket::packet::icmp::IcmpPacket
source · pub struct IcmpPacket {
pub icmp_type: IcmpType,
pub icmp_code: u8,
pub checksum: u16,
pub payload: Vec<u8>,
}
Expand description
Represents an ICMP packet.
Fields§
§icmp_type: IcmpType
ICMP type
icmp_code: u8
ICMP code
checksum: u16
ICMP checksum
payload: Vec<u8>
Payload.
Implementations§
source§impl IcmpPacket
impl IcmpPacket
sourcepub fn from_bytes(packet: &[u8]) -> IcmpPacket
pub fn from_bytes(packet: &[u8]) -> IcmpPacket
Constructs a new IcmpPacket from bytes
Trait Implementations§
source§impl Clone for IcmpPacket
impl Clone for IcmpPacket
source§fn clone(&self) -> IcmpPacket
fn clone(&self) -> IcmpPacket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IcmpPacket
impl Debug for IcmpPacket
source§impl PartialEq<IcmpPacket> for IcmpPacket
impl PartialEq<IcmpPacket> for IcmpPacket
source§fn eq(&self, other: &IcmpPacket) -> bool
fn eq(&self, other: &IcmpPacket) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for IcmpPacket
Auto Trait Implementations§
impl RefUnwindSafe for IcmpPacket
impl Send for IcmpPacket
impl Sync for IcmpPacket
impl Unpin for IcmpPacket
impl UnwindSafe for IcmpPacket
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more