pub struct Server_SynchronousProxy { /* private fields */ }
Implementations§
Source§impl Server_SynchronousProxy
impl Server_SynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<Server_Event, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<Server_Event, 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 start_serving(
&self,
___deadline: MonotonicInstant,
) -> Result<ServerStartServingResult, Error>
pub fn start_serving( &self, ___deadline: MonotonicInstant, ) -> Result<ServerStartServingResult, Error>
Starts serving DHCP leases.
Starts the DHCP server with the current set of parameters.
On error the server remains in the stopped state. If the server is
already serving, StartServing
is a no-op.
*error a zx.Status indicating why the server could not be started.
Sourcepub fn stop_serving(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn stop_serving(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Stops serving DHCP leases.
Stopping causes all the listening ports to be closed.
Configuring parameters on the DHCP server is only allowed when the server is stopped.
If the server is not currently serving, StopServing
is a no-op.
Sourcepub fn is_serving(&self, ___deadline: MonotonicInstant) -> Result<bool, Error>
pub fn is_serving(&self, ___deadline: MonotonicInstant) -> Result<bool, Error>
Returns whether or not the server is serving DHCP leases.
Sourcepub fn get_option(
&self,
code: OptionCode,
___deadline: MonotonicInstant,
) -> Result<ServerGetOptionResult, Error>
pub fn get_option( &self, code: OptionCode, ___deadline: MonotonicInstant, ) -> Result<ServerGetOptionResult, Error>
Returns the requested Option if it is supported.
- request
code
the code of an Option whose value has been requested.
- response
value
the value of the requested Option.
- error a zx.Status indicating why the value could not be retrieved.
Sourcepub fn get_parameter(
&self,
name: ParameterName,
___deadline: MonotonicInstant,
) -> Result<ServerGetParameterResult, Error>
pub fn get_parameter( &self, name: ParameterName, ___deadline: MonotonicInstant, ) -> Result<ServerGetParameterResult, Error>
Returns the requested Parameter if it is supported.
- request
name
the name of a Parameter whose value has been requested.
- response
value
the value of the requested Parameter.
- error a zx.Status indicating why the value could not be retrieved.
Sourcepub fn set_option(
&self,
value: &Option_,
___deadline: MonotonicInstant,
) -> Result<ServerSetOptionResult, Error>
pub fn set_option( &self, value: &Option_, ___deadline: MonotonicInstant, ) -> Result<ServerSetOptionResult, Error>
Sets the Option to the argument. On success, a SetOption will take effect immediately.
- request
value
an Option whose value will be set to the value of this argument.
- error a zx.Status indicating the cause of failure.
Sourcepub fn set_parameter(
&self,
value: &Parameter,
___deadline: MonotonicInstant,
) -> Result<ServerSetParameterResult, Error>
pub fn set_parameter( &self, value: &Parameter, ___deadline: MonotonicInstant, ) -> Result<ServerSetParameterResult, Error>
Sets the Parameter to the argument. On success, the new parameter value can be queried by GetParameter or ListParameter immediately. However, the server may require a restart in order for the new Parameter value to take effect.
Setting parameters is only allowed if the server is stopped.
ZX_ERR_BAD_STATE
is returned otherwise.
- request
value
a Parameter whose value will be set to the value of this argument.
- error a zx.Status indicating the cause of failure.
Sourcepub fn list_options(
&self,
___deadline: MonotonicInstant,
) -> Result<ServerListOptionsResult, Error>
pub fn list_options( &self, ___deadline: MonotonicInstant, ) -> Result<ServerListOptionsResult, Error>
Lists all DHCP options for which the Server has a value. Any option which does not have a value will be omitted from the returned list. ListOptions provides administrators a means to print a server’s configuration as opposed to querying the value of a single Option.
- response
options
a vector containing all of the options for which the Server has a value. Bounded to 256 as options are identified by a 1 octet code and 256 is the maximum number of such codes.
- error a zx.Status indicating the cause of failure.
Sourcepub fn list_parameters(
&self,
___deadline: MonotonicInstant,
) -> Result<ServerListParametersResult, Error>
pub fn list_parameters( &self, ___deadline: MonotonicInstant, ) -> Result<ServerListParametersResult, Error>
Lists all DHCP server parameters. ListParameters provides administrators a means to print a server’s configuration as opposed to querying the value of a single Parameter.
- response
parameter
a vector containing the values of all of the Server’s parameters. Bounded to 256 to provide a generous upper limit on the number of server parameters while being of the same size as ListOptions.
- error a zx.Status indicating the cause of failure.
Sourcepub fn reset_options(
&self,
___deadline: MonotonicInstant,
) -> Result<ServerResetOptionsResult, Error>
pub fn reset_options( &self, ___deadline: MonotonicInstant, ) -> Result<ServerResetOptionsResult, Error>
Resets all DHCP options to have no value. On success, ResetOptions will take effect immediately.
- error a zx.Status indicating the cause of failure.
Sourcepub fn reset_parameters(
&self,
___deadline: MonotonicInstant,
) -> Result<ServerResetParametersResult, Error>
pub fn reset_parameters( &self, ___deadline: MonotonicInstant, ) -> Result<ServerResetParametersResult, Error>
Resets all DHCP server parameters to their default value. On success, the reset parameter values can be queried immediately with GetParameter or ListParameters. However, the server must be restarted before all new parameter values take effect.
Setting parameters is only allowed if the server is stopped.
ZX_ERR_BAD_STATE
is returned otherwise.
- error a zx.Status indicating the cause of failure.
Sourcepub fn clear_leases(
&self,
___deadline: MonotonicInstant,
) -> Result<ServerClearLeasesResult, Error>
pub fn clear_leases( &self, ___deadline: MonotonicInstant, ) -> Result<ServerClearLeasesResult, Error>
Clears all leases maintained by the Server. On success, ClearLeases will take effect immediately. Server administrators should take care when calling this method as the DHCP protocol does not provide a mechanism by which a Server can notify a client that its lease has been cleared.
- error a zx.Status indicating the cause of failure.
Trait Implementations§
Source§impl Debug for Server_SynchronousProxy
impl Debug for Server_SynchronousProxy
Source§impl SynchronousProxy for Server_SynchronousProxy
impl SynchronousProxy for Server_SynchronousProxy
Source§type Proxy = Server_Proxy
type Proxy = Server_Proxy
Source§type Protocol = Server_Marker
type Protocol = Server_Marker
Proxy
controls.