pub struct Ipv4RoutingTableControllerProxy { /* private fields */ }
Implementations§
Source§impl Ipv4RoutingTableControllerProxy
impl Ipv4RoutingTableControllerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.net.multicast.admin/Ipv4RoutingTableController.
Sourcepub fn take_event_stream(&self) -> Ipv4RoutingTableControllerEventStream
pub fn take_event_stream(&self) -> Ipv4RoutingTableControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn add_route(
&self,
addresses: &Ipv4UnicastSourceAndMulticastDestination,
route: &Route,
) -> QueryResponseFut<Ipv4RoutingTableControllerAddRouteResult, DefaultFuchsiaResourceDialect>
pub fn add_route( &self, addresses: &Ipv4UnicastSourceAndMulticastDestination, route: &Route, ) -> QueryResponseFut<Ipv4RoutingTableControllerAddRouteResult, DefaultFuchsiaResourceDialect>
Adds a route such that packets matching the addresses will be forwarded accordingly.
The provided addresses act as the key for the route; any existing route with the same addresses will be overwritten when this route is installed.
If a packet arrives at an interface different from the expected input
interface set in the route, the packet will not be forwarded and a
[RoutingEvent.wrong_input_interface
] event will be sent to the client.
See [WatchRoutingEvents
] for more details.
- request
addresses
the addresses used to identify a route. - request
route
the multicast route.
Sourcepub fn del_route(
&self,
addresses: &Ipv4UnicastSourceAndMulticastDestination,
) -> QueryResponseFut<Ipv4RoutingTableControllerDelRouteResult, DefaultFuchsiaResourceDialect>
pub fn del_route( &self, addresses: &Ipv4UnicastSourceAndMulticastDestination, ) -> QueryResponseFut<Ipv4RoutingTableControllerDelRouteResult, DefaultFuchsiaResourceDialect>
Delete a route.
- request
addresses
the addresses used to identify a route.
Sourcepub fn get_route_stats(
&self,
addresses: &Ipv4UnicastSourceAndMulticastDestination,
) -> QueryResponseFut<Ipv4RoutingTableControllerGetRouteStatsResult, DefaultFuchsiaResourceDialect>
pub fn get_route_stats( &self, addresses: &Ipv4UnicastSourceAndMulticastDestination, ) -> QueryResponseFut<Ipv4RoutingTableControllerGetRouteStatsResult, DefaultFuchsiaResourceDialect>
Get a snapshot of statistics about a specific route.
- request
addresses
the addresses used to identify a route.
Sourcepub fn watch_routing_events(
&self,
) -> QueryResponseFut<(u64, Ipv4UnicastSourceAndMulticastDestination, u64, RoutingEvent), DefaultFuchsiaResourceDialect>
pub fn watch_routing_events( &self, ) -> QueryResponseFut<(u64, Ipv4UnicastSourceAndMulticastDestination, u64, RoutingEvent), DefaultFuchsiaResourceDialect>
Watch for events triggered by multicast packets.
The server will queue events to return when this method is called. If no events are ready, the call will block until an event is ready. The server will drop new events if the client is not consuming them fast enough and return the number of events dropped in-between events.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
dropped_events
the number of events that were dropped immediately before the returned event was queued. returned event. - response
addresses
the addresses in the multicast packet triggering the event. - response
input_interface
the interface the multicast packet triggering the event arrived at. - response
event
the event.
Trait Implementations§
Source§impl Clone for Ipv4RoutingTableControllerProxy
impl Clone for Ipv4RoutingTableControllerProxy
Source§fn clone(&self) -> Ipv4RoutingTableControllerProxy
fn clone(&self) -> Ipv4RoutingTableControllerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Ipv4RoutingTableControllerProxyInterface for Ipv4RoutingTableControllerProxy
impl Ipv4RoutingTableControllerProxyInterface for Ipv4RoutingTableControllerProxy
type AddRouteResponseFut = QueryResponseFut<Result<(), Ipv4RoutingTableControllerAddRouteError>>
type DelRouteResponseFut = QueryResponseFut<Result<(), Ipv4RoutingTableControllerDelRouteError>>
type GetRouteStatsResponseFut = QueryResponseFut<Result<RouteStats, Ipv4RoutingTableControllerGetRouteStatsError>>
type WatchRoutingEventsResponseFut = QueryResponseFut<(u64, Ipv4UnicastSourceAndMulticastDestination, u64, RoutingEvent)>
fn add_route( &self, addresses: &Ipv4UnicastSourceAndMulticastDestination, route: &Route, ) -> Self::AddRouteResponseFut
fn del_route( &self, addresses: &Ipv4UnicastSourceAndMulticastDestination, ) -> Self::DelRouteResponseFut
fn get_route_stats( &self, addresses: &Ipv4UnicastSourceAndMulticastDestination, ) -> Self::GetRouteStatsResponseFut
fn watch_routing_events(&self) -> Self::WatchRoutingEventsResponseFut
Source§impl Proxy for Ipv4RoutingTableControllerProxy
impl Proxy for Ipv4RoutingTableControllerProxy
Source§type Protocol = Ipv4RoutingTableControllerMarker
type Protocol = Ipv4RoutingTableControllerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for Ipv4RoutingTableControllerProxy
impl !RefUnwindSafe for Ipv4RoutingTableControllerProxy
impl Send for Ipv4RoutingTableControllerProxy
impl Sync for Ipv4RoutingTableControllerProxy
impl Unpin for Ipv4RoutingTableControllerProxy
impl !UnwindSafe for Ipv4RoutingTableControllerProxy
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
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)
clone_to_uninit
)