pub struct EpskcProxy { /* private fields */ }
Implementations§
Source§impl EpskcProxy
impl EpskcProxy
Sourcepub fn take_event_stream(&self) -> EpskcEventStream
pub fn take_event_stream(&self) -> EpskcEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn start_ephemeral_key(
&self,
lifetime: u32,
) -> QueryResponseFut<EpskcStartEphemeralKeyResult, DefaultFuchsiaResourceDialect>
pub fn start_ephemeral_key( &self, lifetime: u32, ) -> QueryResponseFut<EpskcStartEphemeralKeyResult, DefaultFuchsiaResourceDialect>
Starts the ephemeral key handler.
The ePSKc functionality must first be enabled via fuchsia.lowpan.thread/FeatureConnector.
The lifetime is in units of milliseconds.
From OpenThread:
When successfully set, the ephemeral key can be used only once by an external commissioner candidate to establish a secure session. After the commissioner candidate disconnects, the use of the ephemeral key is stopped.
The maximum ephemeral key lifetime is 10 minutes.
If a lifetime of 0 is provided, OpenThread will use its default lifetime of 2 minutes.
If the lifetime expires, the use of the ephemeral key is stopped, and any connected session using the key is immediately disconnected.
The Ephemeral Key Manager limits the number of failed DTLS connections to 10 attempts. After the 10th failed attempt, the use of the ephemeral key is automatically stopped (even if the lifetime has not yet expired).
ZX_ERR_INVALID_ARGS
: The specified lifetime is greater than allowed.ZX_ERR_BAD_STATE
: The ePSKc functionality has not been enabled.ZX_ERR_INTERNAL
: There was a failure in generating the ephemeral key.`
Sourcepub fn stop_ephemeral_key(
&self,
retain_active_session: bool,
) -> QueryResponseFut<EpskcStopEphemeralKeyResult, DefaultFuchsiaResourceDialect>
pub fn stop_ephemeral_key( &self, retain_active_session: bool, ) -> QueryResponseFut<EpskcStopEphemeralKeyResult, DefaultFuchsiaResourceDialect>
Stops the ephemeral key use.
Existing sessions are terminated if retain_active_session is false. If retain_active_session is true and there is an ongoing session, the ephemeral key is not stopped.
The ePSKc functionality must first be enabled via fuchsia.lowpan.thread/FeatureConnector.
ZX_ERR_BAD_STATE
: The ePSKc functionality has not been enabled orretain_active_session
is true and there is an active session.
Trait Implementations§
Source§impl Clone for EpskcProxy
impl Clone for EpskcProxy
Source§fn clone(&self) -> EpskcProxy
fn clone(&self) -> EpskcProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EpskcProxy
impl Debug for EpskcProxy
Source§impl EpskcProxyInterface for EpskcProxy
impl EpskcProxyInterface for EpskcProxy
type StartEphemeralKeyResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
type StopEphemeralKeyResponseFut = QueryResponseFut<Result<(), i32>>
fn start_ephemeral_key( &self, lifetime: u32, ) -> Self::StartEphemeralKeyResponseFut
fn stop_ephemeral_key( &self, retain_active_session: bool, ) -> Self::StopEphemeralKeyResponseFut
Source§impl Proxy for EpskcProxy
impl Proxy for EpskcProxy
Source§type Protocol = EpskcMarker
type Protocol = EpskcMarker
Proxy
controls.