Struct packet_formats::icmp::ndp::NeighborAdvertisement
source · #[repr(C)]pub struct NeighborAdvertisement { /* private fields */ }
Expand description
An NDP Neighbor Advertisement.
Implementations§
source§impl NeighborAdvertisement
impl NeighborAdvertisement
sourcepub fn new(
router_flag: bool,
solicited_flag: bool,
override_flag: bool,
target_address: Ipv6Addr
) -> Self
pub fn new( router_flag: bool, solicited_flag: bool, override_flag: bool, target_address: Ipv6Addr ) -> Self
Creates a new neighbor advertisement message with the provided
router_flag
, solicited_flag
, override_flag
and target_address
.
sourcepub fn target_address(&self) -> &Ipv6Addr
pub fn target_address(&self) -> &Ipv6Addr
Returns the target_address of an NA message.
sourcepub fn router_flag(&self) -> bool
pub fn router_flag(&self) -> bool
Returns the router flag.
sourcepub fn solicited_flag(&self) -> bool
pub fn solicited_flag(&self) -> bool
Returns the solicited flag.
sourcepub fn override_flag(&self) -> bool
pub fn override_flag(&self) -> bool
Returns the override flag.
Trait Implementations§
source§impl Clone for NeighborAdvertisement
impl Clone for NeighborAdvertisement
source§fn clone(&self) -> NeighborAdvertisement
fn clone(&self) -> NeighborAdvertisement
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 NeighborAdvertisement
impl Debug for NeighborAdvertisement
source§impl FromBytes for NeighborAdvertisement
impl FromBytes for NeighborAdvertisement
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized + NoCell,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized + NoCell,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + IntoBytes + NoCell,
Interprets the prefix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + IntoBytes + NoCell,
Interprets the suffix of the given
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl FromZeros for NeighborAdvertisement
impl FromZeros for NeighborAdvertisement
source§impl IcmpMessage<Ipv6> for NeighborAdvertisement
impl IcmpMessage<Ipv6> for NeighborAdvertisement
source§const EXPECTS_BODY: bool = true
const EXPECTS_BODY: bool = true
Whether or not a message body is expected in an ICMP packet.
§type Code = IcmpUnusedCode
type Code = IcmpUnusedCode
The type of codes used with this message. Read more
§type Body<B: ByteSlice> = Records<B, NdpOptionsImpl>
type Body<B: ByteSlice> = Records<B, NdpOptionsImpl>
The type of the body used with this message.
source§impl IntoBytes for NeighborAdvertisementwhere
u8: IntoBytes,
[u8; 3]: IntoBytes,
Ipv6Addr: IntoBytes,
HasPadding<NeighborAdvertisement, { _ }>: ShouldBe<false>,
impl IntoBytes for NeighborAdvertisementwhere
u8: IntoBytes,
[u8; 3]: IntoBytes,
Ipv6Addr: IntoBytes,
HasPadding<NeighborAdvertisement, { _ }>: ShouldBe<false>,
source§impl PartialEq for NeighborAdvertisement
impl PartialEq for NeighborAdvertisement
source§fn eq(&self, other: &NeighborAdvertisement) -> bool
fn eq(&self, other: &NeighborAdvertisement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for NeighborAdvertisement
impl Eq for NeighborAdvertisement
impl StructuralPartialEq for NeighborAdvertisement
impl Unaligned for NeighborAdvertisement
Auto Trait Implementations§
impl Freeze for NeighborAdvertisement
impl RefUnwindSafe for NeighborAdvertisement
impl Send for NeighborAdvertisement
impl Sync for NeighborAdvertisement
impl Unpin for NeighborAdvertisement
impl UnwindSafe for NeighborAdvertisement
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