pub enum RuleSetV4Request {
AuthenticateForRouteTable {
table: u32,
token: Event,
responder: RuleSetV4AuthenticateForRouteTableResponder,
},
RemoveRule {
index: u32,
responder: RuleSetV4RemoveRuleResponder,
},
Close {
control_handle: RuleSetV4ControlHandle,
},
AddRule {
index: u32,
matcher: RuleMatcherV4,
action: RuleAction,
responder: RuleSetV4AddRuleResponder,
},
}Expand description
Provides mutable access over a set of the system’s IPv4 route rules.
A RuleSet has a priority and a rule has an index. A global order among the
rules is determined first by the priority of the RuleSet the rule belongs
to, and then the index of the rule inside the RuleSet.
This protocol encodes the lifetime of the rule set. Closing the client end removes the rule set, and all the rules that are owned by the rule set.
Variants§
AuthenticateForRouteTable
Authenticates for a route table that will be used in an action.
RemoveRule
Removes a rule from this rule set.
If the client tries to remove from an index that does not have a rule,
the error RULE_DOES_NOT_EXIST will be returned.
- request
indexthe index of the rule.
Close
Removes all rules in the rule set and the underlying channel will be closed after the rules are removed.
This method provides a way for synchronous closure.
Fields
control_handle: RuleSetV4ControlHandleAddRule
Adds a rule to this rule set.
If there is already a rule at the provided index, RULE_ALREADY_EXISTS
is returned.
- request
indexwhere to insert the rule. - request
matcherthe matcher of the rule. - request
actionaction of the rule.
Implementations§
Source§impl RuleSetV4Request
impl RuleSetV4Request
pub fn into_authenticate_for_route_table( self, ) -> Option<(u32, Event, RuleSetV4AuthenticateForRouteTableResponder)>
pub fn into_remove_rule(self) -> Option<(u32, RuleSetV4RemoveRuleResponder)>
pub fn into_close(self) -> Option<RuleSetV4ControlHandle>
pub fn into_add_rule( self, ) -> Option<(u32, RuleMatcherV4, RuleAction, RuleSetV4AddRuleResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL