[][src]Struct capsule::packets::icmp::v6::ndp::RouterAdvertisement

pub struct RouterAdvertisement<E: Ipv6Packet> { /* fields omitted */ }

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.

impl<E: Ipv6Packet> Icmpv6Packet for RouterAdvertisement<E>[src]

impl<E: Ipv6Packet> NdpPacket for RouterAdvertisement<E>[src]

impl<E: Ipv6Packet> Packet for RouterAdvertisement<E>[src]

type Envelope = E

The preceding packet type that encapsulates this packet. Read more

Auto Trait Implementations

impl<E> RefUnwindSafe for RouterAdvertisement<E> where
    E: RefUnwindSafe

impl<E> !Send for RouterAdvertisement<E>

impl<E> !Sync for RouterAdvertisement<E>

impl<E> Unpin for RouterAdvertisement<E> where
    E: Unpin

impl<E> UnwindSafe for RouterAdvertisement<E> where
    E: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,