[−][src]Struct capsule::packets::icmp::v6::ndp::RouterAdvertisement
Router Advertisement Message defined in IETF RFC 4861.
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 ... +-+-+-+-+-+-+-+-+-+-+-+-
-
Cur Hop Limit: 8-bit unsigned integer. The default value that should be placed in the Hop Count field of the IP header for outgoing IP packets. A value of zero means unspecified (by this router).
-
M: 1-bit "Managed address configuration" flag. When set, it indicates that addresses are available via Dynamic Host Configuration Protocol DHCPv6.
-
O: 1-bit "Other configuration" flag. When set, it indicates that other configuration information is available via DHCPv6.
Note: If neither M nor O flags are set, this indicates that no information is available via DHCPv6.
-
Reserved: A 6-bit unused field. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.
-
Router Lifetime: 16-bit unsigned integer. The lifetime associated with the default router in units of seconds.
-
Reachable Time: 32-bit unsigned integer. The time, in milliseconds, that a node assumes a neighbor is reachable after having received a reachability confirmation.
-
Retrans Timer: 32-bit unsigned integer. The time, in milliseconds, between retransmitted Neighbor Solicitation messages.
Possible options:
-
Source link-layer address: The link-layer address of the interface from which the Router Advertisement is sent.
-
MTU: SHOULD be sent on links that have a variable MTU (as specified in the document that describes how to run IP over the particular link type). MAY be sent on other links.
-
Prefix Information: These options specify the prefixes that are on-link and/or are used for stateless address autoconfiguration.
Implementations
impl<E: Ipv6Packet> RouterAdvertisement<E>
[src]
pub fn current_hop_limit(&self) -> u8
[src]
Returns the current hop limit.
pub fn set_current_hop_limit(&mut self, current_hop_limit: u8)
[src]
Sets the current hop limit.
pub fn managed_addr_cfg(&self) -> bool
[src]
Returns a flag indicating that addresses are available via DHCPv6.
pub fn set_managed_addr_cfg(&mut self)
[src]
Sets the managed address flag.
pub fn unset_managed_addr_cfg(&mut self)
[src]
Unsets the managed address flag.
pub fn other_cfg(&self) -> bool
[src]
Returns a flag indicating that other configuration information is available via DHCPv6.
pub fn set_other_cfg(&mut self)
[src]
Sets the other configuration flag.
pub fn unset_other_cfg(&mut self)
[src]
Unsets the other configuration flag.
pub fn router_lifetime(&self) -> u16
[src]
Returns the lifetime associated with the default router in units of seconds.
pub fn set_router_lifetime(&mut self, router_lifetime: u16)
[src]
Sets the router's default lifetime.
pub fn reachable_time(&self) -> u32
[src]
Returns the time, in milliseconds, that a node assumes a neighbor is reachable.
pub fn set_reachable_time(&mut self, reachable_time: u32)
[src]
Sets the neighbor reachable time.
pub fn retrans_timer(&self) -> u32
[src]
Returns the time, in milliseconds, between retransmitted Neighbor Solicitation messages.
pub fn set_retrans_timer(&mut self, retrans_timer: u32)
[src]
Sets the retransmission timer.
Trait Implementations
impl<E: Ipv6Packet> Debug for RouterAdvertisement<E>
[src]
impl<E: Ipv6Packet> Icmpv6Message for RouterAdvertisement<E>
[src]
type Envelope = E
The preceding packet type that encapsulates this message.
fn msg_type() -> Icmpv6Type
[src]
fn icmp(&self) -> &Icmpv6<Self::Envelope>
[src]
fn icmp_mut(&mut self) -> &mut Icmpv6<Self::Envelope>
[src]
fn into_icmp(self) -> Icmpv6<Self::Envelope>
[src]
unsafe fn clone(&self, internal: Internal) -> Self
[src]
fn try_parse(
icmp: Icmpv6<Self::Envelope>,
_internal: Internal
) -> Fallible<Self>
[src]
icmp: Icmpv6<Self::Envelope>,
_internal: Internal
) -> Fallible<Self>
fn try_push(icmp: Icmpv6<Self::Envelope>, _internal: Internal) -> Fallible<Self>
[src]
fn reconcile(&mut self)
[src]
impl<E: Ipv6Packet> Icmpv6Packet for RouterAdvertisement<E>
[src]
fn msg_type(&self) -> Icmpv6Type
[src]
fn code(&self) -> u8
[src]
fn set_code(&mut self, code: u8)
[src]
fn checksum(&self) -> u16
[src]
impl<E: Ipv6Packet> NdpPacket for RouterAdvertisement<E>
[src]
fn options_offset(&self) -> usize
[src]
fn options_iter(&self) -> ImmutableNdpOptionsIterator
[src]
fn options_mut(&mut self) -> NdpOptions
[src]
impl<E: Ipv6Packet> Packet for RouterAdvertisement<E>
[src]
type Envelope = E
The preceding packet type that encapsulates this packet. Read more
fn envelope(&self) -> &Self::Envelope
[src]
fn envelope_mut(&mut self) -> &mut Self::Envelope
[src]
fn offset(&self) -> usize
[src]
fn header_len(&self) -> usize
[src]
unsafe fn clone(&self, internal: Internal) -> Self
[src]
fn try_parse(envelope: Self::Envelope, _internal: Internal) -> Fallible<Self>
[src]
fn try_push(envelope: Self::Envelope, internal: Internal) -> Fallible<Self>
[src]
fn deparse(self) -> Self::Envelope
[src]
fn reconcile(&mut self)
[src]
fn mbuf(&self) -> &Mbuf
[src]
fn mbuf_mut(&mut self) -> &mut Mbuf
[src]
fn payload_offset(&self) -> usize
[src]
fn len(&self) -> usize
[src]
fn payload_len(&self) -> usize
[src]
fn parse<T: Packet<Envelope = Self>>(self) -> Fallible<T> where
Self: Sized,
[src]
Self: Sized,
fn peek<T: Packet<Envelope = Self>>(&self) -> Fallible<Immutable<T>> where
Self: Sized,
[src]
Self: Sized,
fn push<T: Packet<Envelope = Self>>(self) -> Fallible<T> where
Self: Sized,
[src]
Self: Sized,
fn remove(self) -> Fallible<Self::Envelope> where
Self: Sized,
[src]
Self: Sized,
fn remove_payload(&mut self) -> Fallible<()>
[src]
fn reset(self) -> Mbuf where
Self: Sized,
[src]
Self: Sized,
fn reconcile_all(&mut self)
[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for RouterAdvertisement<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> !Send for RouterAdvertisement<E>
impl<E> !Sync for RouterAdvertisement<E>
impl<E> Unpin for RouterAdvertisement<E> where
E: Unpin,
E: Unpin,
impl<E> UnwindSafe for RouterAdvertisement<E> where
E: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,