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: Time) -> Result<StackEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> 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: Time
) -> Result<StackAddForwardingEntryResult, Error>
pub fn add_forwarding_entry( &self, entry: &ForwardingEntry, ___deadline: Time ) -> 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: Time
) -> Result<StackDelForwardingEntryResult, Error>
pub fn del_forwarding_entry( &self, entry: &ForwardingEntry, ___deadline: Time ) -> 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_interface_ip_forwarding_deprecated(
&self,
id: u64,
ip_version: IpVersion,
enabled: bool,
___deadline: Time
) -> Result<StackSetInterfaceIpForwardingDeprecatedResult, Error>
pub fn set_interface_ip_forwarding_deprecated( &self, id: u64, ip_version: IpVersion, enabled: bool, ___deadline: Time ) -> Result<StackSetInterfaceIpForwardingDeprecatedResult, Error>
Sets the IP forwarding state for an interface.
sourcepub fn set_dhcp_client_enabled(
&self,
id: u64,
enable: bool,
___deadline: Time
) -> Result<StackSetDhcpClientEnabledResult, Error>
pub fn set_dhcp_client_enabled( &self, id: u64, enable: bool, ___deadline: Time ) -> Result<StackSetDhcpClientEnabledResult, Error>
Enables or disables the DHCP client on an interface. TODO(https://fxbug.dev/81593): 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
§type Proxy = StackProxy
type Proxy = StackProxy
§type Protocol = StackMarker
type Protocol = StackMarker
Proxy
controls.