pub struct RouterAdvertisementHeader {
pub cur_hop_limit: u8,
pub managed_address_config: bool,
pub other_config: bool,
pub router_lifetime: u16,
}Expand description
ICMPv6 router advertisement header (part of “Neighbor Discovery Protocol” RFC 4861).
Fields§
§cur_hop_limit: u8The 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).
managed_address_config: bool“Managed address configuration” flag.
When set, it indicates that addresses are available via Dynamic Host Configuration Protocol [DHCPv6].
If the M flag is set, the O flag is redundant and can be ignored because DHCPv6 will return all available configuration information.
other_config: bool“Other configuration” flag.
When set, it indicates that other configuration information is available via DHCPv6. Examples of such information are DNS-related information or information on other servers within the network.
router_lifetime: u16The lifetime associated with the default router in units of seconds.
The field can contain values up to 65535 and receivers should handle any value, while the sending rules in Section 6 of RFC 4861 limit the lifetime to 9000 seconds. A Lifetime of 0 indicates that the router is not a default router and SHOULD NOT appear on the default router list. The Router Lifetime applies only to the router’s usefulness as a default router; it does not apply to information contained in other message fields or options. Options that need time limits for their information include their own lifetime fields.
Implementations§
Source§impl RouterAdvertisementHeader
impl RouterAdvertisementHeader
Sourcepub const MANAGED_ADDRESS_CONFIG_MASK: u8 = 0b1000_0000
pub const MANAGED_ADDRESS_CONFIG_MASK: u8 = 0b1000_0000
Mask to read out the “Managed Address Configuration” flag out of the 5th byte of the ICMPv6 header.
Sourcepub const OTHER_CONFIG_MASK: u8 = 0b0100_0000
pub const OTHER_CONFIG_MASK: u8 = 0b0100_0000
Mask to read out the “Other Configuration” flag out of the 5th byte of the ICMPv6 header.
Sourcepub fn from_bytes(bytes: [u8; 4]) -> Self
pub fn from_bytes(bytes: [u8; 4]) -> Self
Decodes the header from the on the wire bytes.
Trait Implementations§
Source§impl Clone for RouterAdvertisementHeader
impl Clone for RouterAdvertisementHeader
Source§fn clone(&self) -> RouterAdvertisementHeader
fn clone(&self) -> RouterAdvertisementHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more