pub struct RouterSolicitPacket {
pub header: Icmpv6Header,
pub reserved: u32,
pub options: Vec<NdpOptionPacket>,
pub payload: Bytes,
}Expand description
Calculate a length of a NdpOption’s payload.
Router Solicitation Message RFC 4861 Section 4.1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options ...Fields§
§header: Icmpv6Header§reserved: u32§options: Vec<NdpOptionPacket>§payload: BytesImplementations§
Source§impl RouterSolicitPacket
impl RouterSolicitPacket
Sourcepub fn options_length(&self) -> usize
pub fn options_length(&self) -> usize
Router Solicit packet calculation for the length of the options.
Trait Implementations§
Source§impl Clone for RouterSolicitPacket
impl Clone for RouterSolicitPacket
Source§fn clone(&self) -> RouterSolicitPacket
fn clone(&self) -> RouterSolicitPacket
Returns a duplicate 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 RouterSolicitPacket
impl Debug for RouterSolicitPacket
Source§impl Packet for RouterSolicitPacket
impl Packet for RouterSolicitPacket
type Header = ()
Source§fn from_bytes(bytes: Bytes) -> Option<Self>
fn from_bytes(bytes: Bytes) -> Option<Self>
Parse from raw bytes. (with ownership)
Source§fn header_len(&self) -> usize
fn header_len(&self) -> usize
Get the length of the header.
Source§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Get the length of the payload.
fn into_parts(self) -> (Self::Header, Bytes)
Source§fn to_bytes_mut(&self) -> BytesMut
fn to_bytes_mut(&self) -> BytesMut
Convert the packet to a mutable byte buffer.
Source§fn header_mut(&self) -> BytesMut
fn header_mut(&self) -> BytesMut
Get a mutable byte buffer for the header.
Source§fn payload_mut(&self) -> BytesMut
fn payload_mut(&self) -> BytesMut
Get a mutable byte buffer for the payload.
Source§impl PartialEq for RouterSolicitPacket
impl PartialEq for RouterSolicitPacket
Source§impl TryFrom<Icmpv6Packet> for RouterSolicitPacket
impl TryFrom<Icmpv6Packet> for RouterSolicitPacket
impl Eq for RouterSolicitPacket
impl StructuralPartialEq for RouterSolicitPacket
Auto Trait Implementations§
impl !Freeze for RouterSolicitPacket
impl RefUnwindSafe for RouterSolicitPacket
impl Send for RouterSolicitPacket
impl Sync for RouterSolicitPacket
impl Unpin for RouterSolicitPacket
impl UnwindSafe for RouterSolicitPacket
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