pub struct ControllerProxy { /* private fields */ }
Implementations§
source§impl ControllerProxy
impl ControllerProxy
sourcepub fn take_event_stream(&self) -> ControllerEventStream
pub fn take_event_stream(&self) -> ControllerEventStream
Get a Stream of events from the remote end of the Controller protocol
Panics
Panics if the event stream was already taken.
sourcepub fn add_entry(
&self,
interface: u64,
neighbor: &mut IpAddress,
mac: &mut MacAddress
) -> QueryResponseFut<ControllerAddEntryResult>
pub fn add_entry( &self, interface: u64, neighbor: &mut IpAddress, mac: &mut MacAddress ) -> QueryResponseFut<ControllerAddEntryResult>
Create a static entry. If a conflict is found, overwrite the existing entry. Conflicts occur when two entries have the same interface identifier and IP address.
- request
interface
identifier for the interface used for communicating with the neighbor. - request
neighbor
IP address of the neighbor. - request
mac
MAC address of the neighbor.
- error
ZX_ERR_NOT_FOUND
ifinterface
does not exist. - error
ZX_ERR_NOT_SUPPORTED
ifinterface
does not keep a neighbor table (e.g. point-to-point links).
sourcepub fn remove_entry(
&self,
interface: u64,
neighbor: &mut IpAddress
) -> QueryResponseFut<ControllerRemoveEntryResult>
pub fn remove_entry( &self, interface: u64, neighbor: &mut IpAddress ) -> QueryResponseFut<ControllerRemoveEntryResult>
Delete a dynamic or static entry.
- request
interface
identifier for the interface associated with the entry to be deleted. - request
neighbor
IP address of the entry to be deleted.
- error
ZX_ERR_NOT_FOUND
if no entries matchinterface
andneighbor
. - error
ZX_ERR_NOT_SUPPORTED
ifinterface
does not keep a neighbor table (e.g. point-to-point links).
sourcepub fn clear_entries(
&self,
interface: u64,
ip_version: IpVersion
) -> QueryResponseFut<ControllerClearEntriesResult>
pub fn clear_entries( &self, interface: u64, ip_version: IpVersion ) -> QueryResponseFut<ControllerClearEntriesResult>
Delete all dynamic and static entries belonging to an interface.
- request
interface
identifier for the interface associated with the entries to be deleted. - request
ip_version
the IP version to clear entries from.
- error
ZX_ERR_NOT_FOUND
ifinterface
does not exist. - error
ZX_ERR_NOT_SUPPORTED
ifinterface
does not keep a neighbor table (e.g. point-to-point links).
sourcepub fn update_unreachability_config(
&self,
interface: u64,
ip_version: IpVersion,
config: UnreachabilityConfig
) -> QueryResponseFut<ControllerUpdateUnreachabilityConfigResult>
pub fn update_unreachability_config( &self, interface: u64, ip_version: IpVersion, config: UnreachabilityConfig ) -> QueryResponseFut<ControllerUpdateUnreachabilityConfigResult>
Change the configuration of the neighbor discovery algorithm for an interface.
- request
interface
the interface to be configured. - request
ip_version
the IP version to be configured. - request
config
used for updating the configuration for an interface. Only the specified fields will be changed. All other fields will remain the same as the original configuration.
- error
ZX_ERR_NOT_FOUND
ifinterface
references an interface that does not exist. - error
ZX_ERR_NOT_SUPPORTED
ifinterface
references an interface that does not keep a neighbor table (e.g. point-to-point links). - error
ZX_ERR_INVALID_ARGS
ifconfig
contains an invalid value, see [fuchsia.net.neighbor/UnreachabilityConfig
] for the list of constraints.
Trait Implementations§
source§impl Clone for ControllerProxy
impl Clone for ControllerProxy
source§fn clone(&self) -> ControllerProxy
fn clone(&self) -> ControllerProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ControllerProxyInterface for ControllerProxy
impl ControllerProxyInterface for ControllerProxy
type AddEntryResponseFut = QueryResponseFut<Result<(), i32>>
fn add_entry( &self, interface: u64, neighbor: &mut IpAddress, mac: &mut MacAddress ) -> Self::AddEntryResponseFut
type RemoveEntryResponseFut = QueryResponseFut<Result<(), i32>>
fn remove_entry( &self, interface: u64, neighbor: &mut IpAddress ) -> Self::RemoveEntryResponseFut
type ClearEntriesResponseFut = QueryResponseFut<Result<(), i32>>
fn clear_entries( &self, interface: u64, ip_version: IpVersion ) -> Self::ClearEntriesResponseFut
type UpdateUnreachabilityConfigResponseFut = QueryResponseFut<Result<(), i32>>
fn update_unreachability_config( &self, interface: u64, ip_version: IpVersion, config: UnreachabilityConfig ) -> Self::UpdateUnreachabilityConfigResponseFut
source§impl Debug for ControllerProxy
impl Debug for ControllerProxy
source§impl Proxy for ControllerProxy
impl Proxy for ControllerProxy
§type Protocol = ControllerMarker
type Protocol = ControllerMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more