pub enum StateRequest {
Resolve {
destination: IpAddress,
responder: StateResolveResponder,
},
Resolve2 {
destination: IpAddress,
options: ResolveOptions,
responder: StateResolve2Responder,
},
GetRouteTableName {
table_id: u32,
responder: StateGetRouteTableNameResponder,
},
}Expand description
Provides access to the system’s routing state.
Variants§
Resolve
Resolves the route to a destination.
- request
destinationthe IP address to resolve a route to. If the unspecified address (all zeroes) is provided, the default route will be returned. The variant ofdestinationdetermines variant of [fuchsia.net/IpAddress] fields in the resolved route.
- response
resultcontains the resolved route todestination.
- error
ZX_ERR_ADDRESS_UNREACHABLEifdestinationcan’t be resolved.
Resolve2
Resolves the route to a destination.
- request
destinationthe IP address to resolve a route to. If the unspecified address (all zeroes) is provided, the default route will be returned. The variant ofdestinationdetermines variant of [fuchsia.net/IpAddress] fields in the resolved route. - request
optionscontains optional information used for the route resolution.
- response
resultcontains the resolved route todestination.
- error
ADDRESS_UNREACHABLEifdestinationcan’t be resolved.
GetRouteTableName
Gets the route table name by its ID.
- request
table_idthe ID of the route table in question.
- response
table_namethe name of the route table, if the route table does not have a name, an empty string is returned.
- error
NO_TABLEif the route table does not exist.
Implementations§
Source§impl StateRequest
impl StateRequest
pub fn into_resolve(self) -> Option<(IpAddress, StateResolveResponder)>
pub fn into_resolve2( self, ) -> Option<(IpAddress, ResolveOptions, StateResolve2Responder)>
pub fn into_get_route_table_name( self, ) -> Option<(u32, StateGetRouteTableNameResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateRequest
impl !RefUnwindSafe for StateRequest
impl Send for StateRequest
impl Sync for StateRequest
impl Unpin for StateRequest
impl !UnwindSafe for StateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more