pub struct OpaqueIid(/* private fields */);
Expand description
An opaque interface identifier (IID).
Implementations§
Source§impl OpaqueIid
impl OpaqueIid
Sourcepub fn new<IF, ID>(
prefix: Subnet<Ipv6Addr>,
net_iface: IF,
net_id: ID,
dad_counter: OpaqueIidNonce,
secret_key: &IidSecret,
) -> Self
pub fn new<IF, ID>( prefix: Subnet<Ipv6Addr>, net_iface: IF, net_id: ID, dad_counter: OpaqueIidNonce, secret_key: &IidSecret, ) -> Self
Computes an opaque interface identifier (IID) using the algorithm in RFC 7217 Section 5.
Each argument to generate_opaque_interface_identifier
corresponds to an
argument from Section 5 of the RFC:
prefix
corresponds to the “Prefix” argumentnet_iface
corresponds to the “Net_Iface” argumentnet_id
corresponds to the “Network_ID” argumentnonce
corresponds to the “DAD_Counter” argument if nonce = [OpaqueIidNonce::DadCounter
]secret_key
corresponds to the “secret_key” argument
Callers can set nonce
= [OpaqueIidNonce::Random(x)
] to pass in a
randomly-generated value. This guaranteese the caller similar privacy
properties as the original algorithm specified in the RFC without requiring
that they keep state in the form of a DAD count.
For fixed inputs, the output of generate_opaque_interface_identifier
is
guaranteed to be stable across versions this codebase.
Sourcepub fn to_be_bytes(&self) -> [u8; 16]
pub fn to_be_bytes(&self) -> [u8; 16]
Copies the bytes from this identifier in Big Endian representation.
Trait Implementations§
Source§impl Ord for OpaqueIid
impl Ord for OpaqueIid
Source§impl PartialOrd for OpaqueIid
impl PartialOrd for OpaqueIid
impl Copy for OpaqueIid
impl Eq for OpaqueIid
impl StructuralPartialEq for OpaqueIid
Auto Trait Implementations§
impl Freeze for OpaqueIid
impl RefUnwindSafe for OpaqueIid
impl Send for OpaqueIid
impl Sync for OpaqueIid
impl Unpin for OpaqueIid
impl UnwindSafe for OpaqueIid
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more