pub enum NdiscRepr<'a> {
RouterSolicit {
lladdr: Option<RawHardwareAddress>,
},
RouterAdvert {
hop_limit: u8,
flags: RouterFlags,
router_lifetime: Duration,
reachable_time: Duration,
retrans_time: Duration,
lladdr: Option<RawHardwareAddress>,
mtu: Option<u32>,
prefix_info: Option<PrefixInformation>,
},
NeighborSolicit {
target_addr: Address,
lladdr: Option<RawHardwareAddress>,
},
NeighborAdvert {
flags: NeighborFlags,
target_addr: Address,
lladdr: Option<RawHardwareAddress>,
},
Redirect {
target_addr: Address,
dest_addr: Address,
lladdr: Option<RawHardwareAddress>,
redirected_hdr: Option<RedirectedHeader<'a>>,
},
}
Expand description
A high-level representation of an Neighbor Discovery packet header.
Variants§
RouterSolicit
Fields
§
lladdr: Option<RawHardwareAddress>
RouterAdvert
Fields
§
flags: RouterFlags
§
router_lifetime: Duration
§
reachable_time: Duration
§
retrans_time: Duration
§
lladdr: Option<RawHardwareAddress>
§
prefix_info: Option<PrefixInformation>
NeighborSolicit
NeighborAdvert
Redirect
Implementations§
§impl<'a> Repr<'a>
impl<'a> Repr<'a>
pub fn parse<T>(packet: &Packet<&'a T>) -> Result<Repr<'a>, Error>where
T: AsRef<[u8]> + ?Sized,
pub fn parse<T>(packet: &Packet<&'a T>) -> Result<Repr<'a>, Error>where T: AsRef<[u8]> + ?Sized,
Parse an NDISC packet and return a high-level representation of the packet.
pub const fn buffer_len(&self) -> usize
pub fn emit<T>(&self, packet: &mut Packet<&mut T>)where T: AsRef<[u8]> + AsMut<[u8]> + ?Sized,
Trait Implementations§
impl<'a> Copy for Repr<'a>
impl<'a> Eq for Repr<'a>
impl<'a> StructuralEq for Repr<'a>
impl<'a> StructuralPartialEq for Repr<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Repr<'a>
impl<'a> Send for Repr<'a>
impl<'a> Sync for Repr<'a>
impl<'a> Unpin for Repr<'a>
impl<'a> UnwindSafe for Repr<'a>
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