pub enum ClientRequest {
WatchConfiguration {
responder: ClientWatchConfigurationResponder,
},
Shutdown {
control_handle: ClientControlHandle,
},
}
Expand description
Provides methods to watch for discovered network configurations and control the DHCP client discovering them.
This protocol encodes the DHCP client’s lifetime in both directions; the DHCP client remains alive iff both ends of the protocol are open. That is:
- Closing the client end causes the DHCP client to be destroyed.
- Observing a closure of the server end indicates the DHCP client no longer exists.
Variants§
WatchConfiguration
Returns acquired DHCP configuration.
Yields a value whenever the client acquires new configuration. Notably,
does not yield a value upon DHCP lease expiry; instead, expiry of the IP
address is communicated via the AddressStateProvider
(refer to
documentation of fuchsia.net.interfaces.admin/AddressStateProvider
for
details). Non-address configuration does not expire, but is replaced by
new configuration once a new DHCP lease is obtained.
It is invalid to call this method while a previous call is pending. Doing so causes the server end of the protocol to be closed.
- response
address
the assigned address. If set, the client has acquired a new lease on an IP address. If not set, then either the client has not requested an IP address (in which case thisClient
instance has never yielded an address), or the client continues to hold a lease on a previously-acquired IP address (whose lifetime is updated viaAddressStateProvider
). - response
dns_servers
addresses of discovered DNS servers. If absent, must be interpreted as empty (the client’s configuration indicates no DNS servers, even if previously-yielded configuration included DNS servers). - response
routers
addresses of discovered routers on the client’s subnet, in descending order of preference according to the DHCP server. If absent, must be interpreted as empty (the client’s configuration indicates no routers, even if previously-yielded configuration included routers).
Fields
responder: ClientWatchConfigurationResponder
Shutdown
Instructs the client to shut down gracefully (releasing any DHCP lease
currently held). When the client is finished shutting down, it yields
the ClientExitReason::GRACEFUL_SHUTDOWN
OnExit
event.
Fields
control_handle: ClientControlHandle
Implementations§
Source§impl ClientRequest
impl ClientRequest
pub fn into_watch_configuration( self, ) -> Option<ClientWatchConfigurationResponder>
pub fn into_shutdown(self) -> Option<ClientControlHandle>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL