pub struct NeighborAdvertPacket {
pub header: Icmpv6Header,
pub flags: u8,
pub reserved: u24be,
pub target_addr: Ipv6Addr,
pub options: Vec<NdpOptionPacket>,
pub payload: Bytes,
}Expand description
Neighbor Advertisement Message Format RFC 4861 Section 4.4
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|S|O| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Target Address +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options ...
+-+-+-+-+-+-+-+-+-+-+-+-Fields§
§header: Icmpv6Header§flags: u8§reserved: u24be§target_addr: Ipv6Addr§options: Vec<NdpOptionPacket>§payload: BytesImplementations§
Source§impl NeighborAdvertPacket
impl NeighborAdvertPacket
Sourcepub fn options_length(&self) -> usize
pub fn options_length(&self) -> usize
Neighbor Advert packet calculation for the length of the options.
Trait Implementations§
Source§impl Clone for NeighborAdvertPacket
impl Clone for NeighborAdvertPacket
Source§fn clone(&self) -> NeighborAdvertPacket
fn clone(&self) -> NeighborAdvertPacket
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 NeighborAdvertPacket
impl Debug for NeighborAdvertPacket
Source§impl Packet for NeighborAdvertPacket
impl Packet for NeighborAdvertPacket
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 NeighborAdvertPacket
impl PartialEq for NeighborAdvertPacket
Source§impl TryFrom<Icmpv6Packet> for NeighborAdvertPacket
impl TryFrom<Icmpv6Packet> for NeighborAdvertPacket
impl Eq for NeighborAdvertPacket
impl StructuralPartialEq for NeighborAdvertPacket
Auto Trait Implementations§
impl !Freeze for NeighborAdvertPacket
impl RefUnwindSafe for NeighborAdvertPacket
impl Send for NeighborAdvertPacket
impl Sync for NeighborAdvertPacket
impl Unpin for NeighborAdvertPacket
impl UnwindSafe for NeighborAdvertPacket
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