pub struct RouterAdvertPacket {
pub header: Icmpv6Header,
pub hop_limit: u8,
pub flags: u8,
pub lifetime: u16,
pub reachable_time: u32,
pub retrans_time: u32,
pub options: Vec<NdpOptionPacket>,
pub payload: Bytes,
}Expand description
Router Advertisement Message Format RFC 4861 Section 4.2
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cur Hop Limit |M|O| Reserved | Router Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reachable Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retrans Timer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options ...
+-+-+-+-+-+-+-+-+-+-+-+-Fields§
§header: Icmpv6Header§hop_limit: u8§flags: u8§lifetime: u16§reachable_time: u32§retrans_time: u32§options: Vec<NdpOptionPacket>§payload: BytesImplementations§
Source§impl RouterAdvertPacket
impl RouterAdvertPacket
Sourcepub fn options_length(&self) -> usize
pub fn options_length(&self) -> usize
Router Advert packet calculation for the length of the options.
Trait Implementations§
Source§impl Clone for RouterAdvertPacket
impl Clone for RouterAdvertPacket
Source§fn clone(&self) -> RouterAdvertPacket
fn clone(&self) -> RouterAdvertPacket
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 RouterAdvertPacket
impl Debug for RouterAdvertPacket
Source§impl Packet for RouterAdvertPacket
impl Packet for RouterAdvertPacket
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 RouterAdvertPacket
impl PartialEq for RouterAdvertPacket
Source§impl TryFrom<Icmpv6Packet> for RouterAdvertPacket
impl TryFrom<Icmpv6Packet> for RouterAdvertPacket
impl Eq for RouterAdvertPacket
impl StructuralPartialEq for RouterAdvertPacket
Auto Trait Implementations§
impl !Freeze for RouterAdvertPacket
impl RefUnwindSafe for RouterAdvertPacket
impl Send for RouterAdvertPacket
impl Sync for RouterAdvertPacket
impl Unpin for RouterAdvertPacket
impl UnwindSafe for RouterAdvertPacket
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