pub enum Init {
EchoRequest {
source: Source,
dst_addr: Address,
ident: u16,
seq_no: u16,
payload: usize,
},
}Expand description
A helper struct for packet initialization.
In other layers the equivalent utilizes the endpoint itself for specialized initialization but
the ICMP endpoint has almost no state. The [RawPacket::prepare] method thus mostly wraps
packet buffer initialization that could be implemented by the user, in a slightly more
ergonomic interface.
Variants§
EchoRequest
An initializer for an echo request, expecting an echo response by the identified remote party.
Auto Trait Implementations§
impl Freeze for Init
impl RefUnwindSafe for Init
impl Send for Init
impl Sync for Init
impl Unpin for Init
impl UnwindSafe for Init
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