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_sessionis true and there is an active session.
Sourcepub fn watch_ephemeral_key_state(
&self,
) -> QueryResponseFut<EphemeralKeyState, DefaultFuchsiaResourceDialect> ⓘ
pub fn watch_ephemeral_key_state( &self, ) -> QueryResponseFut<EphemeralKeyState, DefaultFuchsiaResourceDialect> ⓘ
Observes changes to the operational state of the Ephemeral Key Manager.
The first call returns the current EphemeralKeyState immediately.
Subsequent calls block until the state differs from the value last
returned on this channel. Intermediate states are not queued: if the
state changes several times between calls, only the latest state is
returned, and a change that reverts to the last-returned value may not
be observed at all.
When ePSKc is disabled via fuchsia.lowpan.thread/FeatureConnector,
the state is reported as DISABLED.
Having more than one concurrent call to this method on the same channel
is an error and will cause the channel to be closed with a
ZX_ERR_BAD_STATE epitaph.
Trait Implementations§
Source§impl Clone for EpskcProxy
impl Clone for EpskcProxy
Source§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>>
type WatchEphemeralKeyStateResponseFut = QueryResponseFut<EphemeralKeyState>
fn start_ephemeral_key( &self, lifetime: u32, ) -> Self::StartEphemeralKeyResponseFut
fn stop_ephemeral_key( &self, retain_active_session: bool, ) -> Self::StopEphemeralKeyResponseFut
fn watch_ephemeral_key_state(&self) -> Self::WatchEphemeralKeyStateResponseFut
Source§impl Proxy for EpskcProxy
impl Proxy for EpskcProxy
Source§type Protocol = EpskcMarker
type Protocol = EpskcMarker
Proxy controls.