pub struct StackSynchronousProxy { /* private fields */ }
Implementations§
Source§impl StackSynchronousProxy
impl StackSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<StackEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<StackEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn add_forwarding_entry(
&self,
entry: &ForwardingEntry,
___deadline: MonotonicInstant,
) -> Result<StackAddForwardingEntryResult, Error>
pub fn add_forwarding_entry( &self, entry: &ForwardingEntry, ___deadline: MonotonicInstant, ) -> Result<StackAddForwardingEntryResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<StackDelForwardingEntryResult, Error>
pub fn del_forwarding_entry( &self, entry: &ForwardingEntry, ___deadline: MonotonicInstant, ) -> Result<StackDelForwardingEntryResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<StackSetDhcpClientEnabledResult, Error>
pub fn set_dhcp_client_enabled( &self, id: u64, enable: bool, ___deadline: MonotonicInstant, ) -> Result<StackSetDhcpClientEnabledResult, Error>
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 Debug for StackSynchronousProxy
impl Debug for StackSynchronousProxy
Source§impl SynchronousProxy for StackSynchronousProxy
impl SynchronousProxy for StackSynchronousProxy
Source§type Proxy = StackProxy
type Proxy = StackProxy
Source§type Protocol = StackMarker
type Protocol = StackMarker
Proxy
controls.