pub struct TemporarySlaacAddressConfiguration {
pub temp_valid_lifetime: NonZeroDuration,
pub temp_preferred_lifetime: NonZeroDuration,
pub temp_idgen_retries: u8,
pub secret_key: [u8; 32],
}
Expand description
Configuration values for SLAAC temporary addressing.
The algorithm specified in RFC 8981 Section 3.4 references several configuration parameters, which are defined in Section 3.8 and Section 3.3.2 This struct contains the following values specified by the RFC:
- TEMP_VALID_LIFETIME
- TEMP_PREFERRED_LIFETIME
- TEMP_IDGEN_RETRIES
- secret_key
Fields§
§temp_valid_lifetime: NonZeroDuration
The maximum amount of time that a temporary address can be considered valid, from the time of its creation.
temp_preferred_lifetime: NonZeroDuration
The maximum amount of time that a temporary address can be preferred, from the time of its creation.
temp_idgen_retries: u8
The number of times to attempt to pick a new temporary address after DAD detects a duplicate before stopping and giving up on temporary address generation for that prefix.
secret_key: [u8; 32]
The secret to use when generating new temporary addresses. This should be initialized from a random number generator before generating any temporary addresses.
Implementations§
source§impl TemporarySlaacAddressConfiguration
impl TemporarySlaacAddressConfiguration
sourcepub const DEFAULT_TEMP_VALID_LIFETIME: NonZeroDuration = _
pub const DEFAULT_TEMP_VALID_LIFETIME: NonZeroDuration = _
Default TEMP_VALID_LIFETIME specified by RFC 8981 Section 3.8.
sourcepub const DEFAULT_TEMP_PREFERRED_LIFETIME: NonZeroDuration = _
pub const DEFAULT_TEMP_PREFERRED_LIFETIME: NonZeroDuration = _
Default TEMP_PREFERRED_LIFETIME specified by RFC 8981 Section 3.8.
sourcepub const DEFAULT_TEMP_IDGEN_RETRIES: u8 = 3u8
pub const DEFAULT_TEMP_IDGEN_RETRIES: u8 = 3u8
Default TEMP_IDGEN_RETRIES specified by RFC 8981 Section 3.8.
sourcepub fn default_with_secret_key(secret_key: [u8; 32]) -> Self
pub fn default_with_secret_key(secret_key: [u8; 32]) -> Self
Constructs a new instance with default values and the given secret key.
Trait Implementations§
source§impl Clone for TemporarySlaacAddressConfiguration
impl Clone for TemporarySlaacAddressConfiguration
source§fn clone(&self) -> TemporarySlaacAddressConfiguration
fn clone(&self) -> TemporarySlaacAddressConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq for TemporarySlaacAddressConfiguration
impl PartialEq for TemporarySlaacAddressConfiguration
source§fn eq(&self, other: &TemporarySlaacAddressConfiguration) -> bool
fn eq(&self, other: &TemporarySlaacAddressConfiguration) -> bool
self
and other
values to be equal, and is used
by ==
.