pub struct NeighborAdvertisement {
pub target_addr: Ipv6Addr,
pub target_ll_addr: [u8; 6],
pub is_router: bool,
pub is_solicited: bool,
pub is_override: bool,
}Expand description
Neighbor Advertisement builder.
Fields§
§target_addr: Ipv6AddrTarget IPv6 address.
target_ll_addr: [u8; 6]Target link-layer address to include in option.
is_router: boolRouter flag.
is_solicited: boolSolicited flag (response to NS).
is_override: boolOverride flag.
Implementations§
Source§impl NeighborAdvertisement
impl NeighborAdvertisement
Sourcepub fn new(target_addr: Ipv6Addr, target_ll_addr: [u8; 6]) -> Self
pub fn new(target_addr: Ipv6Addr, target_ll_addr: [u8; 6]) -> Self
Create a new Neighbor Advertisement.
Sourcepub fn override_flag(self, is_override: bool) -> Self
pub fn override_flag(self, is_override: bool) -> Self
Set the override flag.
Sourcepub fn encode_icmpv6(&self) -> Vec<u8> ⓘ
pub fn encode_icmpv6(&self) -> Vec<u8> ⓘ
Encode the ICMPv6 Neighbor Advertisement (without checksum). Returns the ICMPv6 message body that needs checksum calculation.
Trait Implementations§
Source§impl Clone for NeighborAdvertisement
impl Clone for NeighborAdvertisement
Source§fn clone(&self) -> NeighborAdvertisement
fn clone(&self) -> NeighborAdvertisement
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 moreAuto Trait Implementations§
impl Freeze for NeighborAdvertisement
impl RefUnwindSafe for NeighborAdvertisement
impl Send for NeighborAdvertisement
impl Sync for NeighborAdvertisement
impl Unpin for NeighborAdvertisement
impl UnsafeUnpin 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