pub struct RouterAdvertisementPayload {
pub reachable_time: u32,
pub retrans_timer: u32,
}Expand description
Owned payload of a Router Advertisement message (RFC 4861, Section 4.2).
The full packet layout is:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cur Hop Limit |M|O| Reserved | Router Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reachable Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retrans Timer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options ...
+-+-+-+-+-+-+-+-+-+-+-+-In this crate, Cur Hop Limit, M, O, and Router Lifetime are represented by
crate::icmpv6::RouterAdvertisementHeader in crate::Icmpv6Type::RouterAdvertisement.
This payload struct represents the fixed bytes after that:
Reachable TimeRetrans Timer
Fields§
§reachable_time: u32Reachable time in milliseconds.
retrans_timer: u32Retransmit timer in milliseconds.
Implementations§
Trait Implementations§
Source§impl Clone for RouterAdvertisementPayload
impl Clone for RouterAdvertisementPayload
Source§fn clone(&self) -> RouterAdvertisementPayload
fn clone(&self) -> RouterAdvertisementPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RouterAdvertisementPayload
Source§impl Debug for RouterAdvertisementPayload
impl Debug for RouterAdvertisementPayload
impl Eq for RouterAdvertisementPayload
Source§impl Hash for RouterAdvertisementPayload
impl Hash for RouterAdvertisementPayload
Source§impl Ord for RouterAdvertisementPayload
impl Ord for RouterAdvertisementPayload
Source§fn cmp(&self, other: &RouterAdvertisementPayload) -> Ordering
fn cmp(&self, other: &RouterAdvertisementPayload) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for RouterAdvertisementPayload
impl PartialOrd for RouterAdvertisementPayload
impl StructuralPartialEq for RouterAdvertisementPayload
Auto Trait Implementations§
impl Freeze for RouterAdvertisementPayload
impl RefUnwindSafe for RouterAdvertisementPayload
impl Send for RouterAdvertisementPayload
impl Sync for RouterAdvertisementPayload
impl Unpin for RouterAdvertisementPayload
impl UnsafeUnpin for RouterAdvertisementPayload
impl UnwindSafe for RouterAdvertisementPayload
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