Skip to main content

MacAddressingLocalServerHandler

Trait MacAddressingLocalServerHandler 

Source
pub trait MacAddressingLocalServerHandler<___T = Channel>
where ___T: Transport,
{ // Required methods fn get_unicast_address( &mut self, responder: Responder<GetUnicastAddress, ___T>, ) -> impl Future<Output = ()>; fn set_mode( &mut self, request: Request<SetMode, ___T>, responder: Responder<SetMode, ___T>, ) -> impl Future<Output = ()>; fn add_multicast_address( &mut self, request: Request<AddMulticastAddress, ___T>, responder: Responder<AddMulticastAddress, ___T>, ) -> impl Future<Output = ()>; fn remove_multicast_address( &mut self, request: Request<RemoveMulticastAddress, ___T>, responder: Responder<RemoveMulticastAddress, ___T>, ) -> impl Future<Output = ()>; }
Expand description

A server handler for the MacAddressing protocol.

See MacAddressing for more details.

Required Methods§

Source

fn get_unicast_address( &mut self, responder: Responder<GetUnicastAddress, ___T>, ) -> impl Future<Output = ()>

Gets the Device’s current unicast MAC address.

Implementers of this API do not need to return a uniquely identifiable MAC; the unicast address returned is the one that is currently in use to filter unicast frames, or that identifies the device on a link it’s currently on. Users of this API must not rely on the stability or uniqueness of the returned value to identify or disambiguate device instances.

  • response address device’s unicast MAC address.
Source

fn set_mode( &mut self, request: Request<SetMode, ___T>, responder: Responder<SetMode, ___T>, ) -> impl Future<Output = ()>

Sets requested operating mode of this device to mode.

The requested mode is attached to the current client connection to the device. Because multiple clients can be attached to the same device at once, the mode with the least restrictions is the one actively put into effect into the underlying device implementation.

If the device does not support the requested mode, but supports a mode that is more open than the requested one, SetMode succeeds regardless. Otherwise, if the device only supports more restrictive modes than the one requested, SetMode returns ZX_ERR_NOT_SUPPORTED.

Clients must be aware that the resource being accessed is shared, and that the device may be effectively operating at a more open level than the one that was requested (although never at one more restrictive).

  • request mode request mode to attach to.
  • response status ZX_ERR_NOT_SUPPORTED it the device only supports mode more restrictive than the one requested.
Source

fn add_multicast_address( &mut self, request: Request<AddMulticastAddress, ___T>, responder: Responder<AddMulticastAddress, ___T>, ) -> impl Future<Output = ()>

Adds multicast address to the list of multicast groups.

The list of multicast addresses kept is untouched by calls to SetMode. If the device’s mode is not MULTICAST_FILTER, the list of multicast addresses is ignored.

  • request address multicast address to add to the list.
  • response status ZX_ERR_INVALID_ARGS if address is not a multicast address.
  • response status ZX_ERR_NO_RESOURCES if there are more than MAX_MAC_FILTER addresses installed.
Source

fn remove_multicast_address( &mut self, request: Request<RemoveMulticastAddress, ___T>, responder: Responder<RemoveMulticastAddress, ___T>, ) -> impl Future<Output = ()>

Removes multicast address from the list of multicast groups.

  • request address multicast address to remove from the list.
  • response status ZX_ERR_INVALID_ARGS if address is not a multicast address.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<___H, ___T> MacAddressingLocalServerHandler<___T> for Local<___H>
where ___H: MacAddressingServerHandler<___T>, ___T: Transport,

Source§

async fn get_unicast_address( &mut self, responder: Responder<GetUnicastAddress, ___T>, )

Source§

async fn set_mode( &mut self, request: Request<SetMode, ___T>, responder: Responder<SetMode, ___T>, )

Source§

async fn add_multicast_address( &mut self, request: Request<AddMulticastAddress, ___T>, responder: Responder<AddMulticastAddress, ___T>, )

Source§

async fn remove_multicast_address( &mut self, request: Request<RemoveMulticastAddress, ___T>, responder: Responder<RemoveMulticastAddress, ___T>, )

Implementors§