pub struct StackProxy { /* private fields */ }
Implementations§
Source§impl StackProxy
impl StackProxy
Sourcepub fn take_event_stream(&self) -> StackEventStream
pub fn take_event_stream(&self) -> StackEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn add_forwarding_entry(
&self,
entry: &ForwardingEntry,
) -> QueryResponseFut<StackAddForwardingEntryResult, DefaultFuchsiaResourceDialect>
pub fn add_forwarding_entry( &self, entry: &ForwardingEntry, ) -> QueryResponseFut<StackAddForwardingEntryResult, DefaultFuchsiaResourceDialect>
Add a new entry to the forwarding table.
If the table already contains an entry with the same subnet and destination, an already exists error is returned.
Sourcepub fn del_forwarding_entry(
&self,
entry: &ForwardingEntry,
) -> QueryResponseFut<StackDelForwardingEntryResult, DefaultFuchsiaResourceDialect>
pub fn del_forwarding_entry( &self, entry: &ForwardingEntry, ) -> QueryResponseFut<StackDelForwardingEntryResult, DefaultFuchsiaResourceDialect>
Removes the forwarding entry. The entry must exactly match an entry in the forwarding table, with the exception of the metric value, which is ignored.
Sourcepub fn set_dhcp_client_enabled(
&self,
id: u64,
enable: bool,
) -> QueryResponseFut<StackSetDhcpClientEnabledResult, DefaultFuchsiaResourceDialect>
pub fn set_dhcp_client_enabled( &self, id: u64, enable: bool, ) -> QueryResponseFut<StackSetDhcpClientEnabledResult, DefaultFuchsiaResourceDialect>
Enables or disables the DHCP client on an interface. TODO(https://fxbug.dev/42162065): Remove this once the DHCP client is moved out of the netstack.
Sourcepub fn bridge_interfaces(
&self,
interfaces: &[u64],
bridge: ServerEnd<ControlMarker>,
) -> Result<(), Error>
pub fn bridge_interfaces( &self, interfaces: &[u64], bridge: ServerEnd<ControlMarker>, ) -> Result<(), Error>
Creates a bridge over the provided interfaces
.
If the bridge can’t be created, bridge
is closed with a BAD_PORT
termination reason.
NOTE: We’re shoehorning bridging into the admin/Control
API and
reassigning meaning to BAD_PORT
because we don’t want to leak
bridging-specific errors there. The POR is that bridging is going to get
its own API at some point.
Bridge lifetime is controlled through the bridge
handle.
Trait Implementations§
Source§impl Clone for StackProxy
impl Clone for StackProxy
Source§fn clone(&self) -> StackProxy
fn clone(&self) -> StackProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StackProxy
impl Debug for StackProxy
Source§impl Proxy for StackProxy
impl Proxy for StackProxy
Source§type Protocol = StackMarker
type Protocol = StackMarker
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>
Source§impl StackProxyInterface for StackProxy
impl StackProxyInterface for StackProxy
type AddForwardingEntryResponseFut = QueryResponseFut<Result<(), Error>>
type DelForwardingEntryResponseFut = QueryResponseFut<Result<(), Error>>
type SetDhcpClientEnabledResponseFut = QueryResponseFut<Result<(), Error>>
fn add_forwarding_entry( &self, entry: &ForwardingEntry, ) -> Self::AddForwardingEntryResponseFut
fn del_forwarding_entry( &self, entry: &ForwardingEntry, ) -> Self::DelForwardingEntryResponseFut
fn set_dhcp_client_enabled( &self, id: u64, enable: bool, ) -> Self::SetDhcpClientEnabledResponseFut
fn bridge_interfaces( &self, interfaces: &[u64], bridge: ServerEnd<ControlMarker>, ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for StackProxy
impl !RefUnwindSafe for StackProxy
impl Send for StackProxy
impl Sync for StackProxy
impl Unpin for StackProxy
impl !UnwindSafe for StackProxy
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
)