pub enum StarnixNetworksRequest {
SetDefault {
network_id: OptionalUint32,
responder: StarnixNetworksSetDefaultResponder,
},
Add {
network: Network,
responder: StarnixNetworksAddResponder,
},
Update {
network: Network,
responder: StarnixNetworksUpdateResponder,
},
Remove {
network_id: u32,
responder: StarnixNetworksRemoveResponder,
},
CheckPresence {
responder: StarnixNetworksCheckPresenceResponder,
},
}
Expand description
StarnixNetworks is used for the starnix nmfs service to communicate changes to the network. Only one connection to this service is considered valid at any one time. If the connection is lost for any reason, all previously registered networks are considered invalid and will be removed.
Variants§
SetDefault
Sets the default network.
The network must have previously been registered by a call to Add
.
Add
Add a new network.
This call will not return until the DNS servers have been successfully updated in netcfg.
Update
Update a previously Added network. This call will not return until the DNS servers have been successfully updated in netcfg.
Remove
Remove a previously Added network. This call will not return until the DNS servers have been successfully updated in netcfg.
CheckPresence
No-op method that allows checking for presence.
TODO(https://fxbug.dev/296283299): It’s not currently possible for a client with an optionally-provided protocol to check whether there’s someone on the other end without making a FIDL call . This method provides a workaround by giving a client a method that it can call to check for liveness.
Fields
responder: StarnixNetworksCheckPresenceResponder
Implementations§
Source§impl StarnixNetworksRequest
impl StarnixNetworksRequest
pub fn into_set_default( self, ) -> Option<(OptionalUint32, StarnixNetworksSetDefaultResponder)>
pub fn into_add(self) -> Option<(Network, StarnixNetworksAddResponder)>
pub fn into_update(self) -> Option<(Network, StarnixNetworksUpdateResponder)>
pub fn into_remove(self) -> Option<(u32, StarnixNetworksRemoveResponder)>
pub fn into_check_presence( self, ) -> Option<StarnixNetworksCheckPresenceResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL