pub struct RuleMessage {Show 20 fields
pub header: FibRuleHdr,
pub priority: u32,
pub source: Option<IpAddr>,
pub destination: Option<IpAddr>,
pub iifname: Option<String>,
pub oifname: Option<String>,
pub fwmark: Option<u32>,
pub fwmask: Option<u32>,
pub table: u32,
pub goto: Option<u32>,
pub flow: Option<u32>,
pub tun_id: Option<u64>,
pub suppress_ifgroup: Option<u32>,
pub suppress_prefixlen: Option<u32>,
pub l3mdev: Option<u8>,
pub uid_range: Option<FibRuleUidRange>,
pub protocol: Option<u8>,
pub ip_proto: Option<u8>,
pub sport_range: Option<FibRulePortRange>,
pub dport_range: Option<FibRulePortRange>,
}Expand description
Strongly-typed routing rule message with all attributes parsed.
Fields§
§header: FibRuleHdrFixed-size header.
priority: u32Rule priority (FRA_PRIORITY).
source: Option<IpAddr>Source address (FRA_SRC).
destination: Option<IpAddr>Destination address (FRA_DST).
iifname: Option<String>Input interface name (FRA_IIFNAME).
oifname: Option<String>Output interface name (FRA_OIFNAME).
fwmark: Option<u32>Firewall mark (FRA_FWMARK).
fwmask: Option<u32>Firewall mark mask (FRA_FWMASK).
table: u32Routing table ID (FRA_TABLE, overrides header.table).
goto: Option<u32>Goto target rule priority (FRA_GOTO).
flow: Option<u32>Flow classification ID (FRA_FLOW).
tun_id: Option<u64>Tunnel ID (FRA_TUN_ID).
suppress_ifgroup: Option<u32>Suppress interface group (FRA_SUPPRESS_IFGROUP).
suppress_prefixlen: Option<u32>Suppress prefix length (FRA_SUPPRESS_PREFIXLEN).
l3mdev: Option<u8>L3 master device (FRA_L3MDEV).
uid_range: Option<FibRuleUidRange>UID range (FRA_UID_RANGE).
protocol: Option<u8>Rule protocol (FRA_PROTOCOL).
ip_proto: Option<u8>IP protocol for port matching (FRA_IP_PROTO).
sport_range: Option<FibRulePortRange>Source port range (FRA_SPORT_RANGE).
dport_range: Option<FibRulePortRange>Destination port range (FRA_DPORT_RANGE).
Implementations§
Source§impl RuleMessage
impl RuleMessage
Sourcepub fn action(&self) -> FibRuleAction
pub fn action(&self) -> FibRuleAction
Get the rule action.
Sourcepub fn is_blackhole(&self) -> bool
pub fn is_blackhole(&self) -> bool
Check if this is a blackhole rule.
Sourcepub fn is_unreachable(&self) -> bool
pub fn is_unreachable(&self) -> bool
Check if this is an unreachable rule.
Sourcepub fn is_prohibit(&self) -> bool
pub fn is_prohibit(&self) -> bool
Check if this is a prohibit rule.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Check if this is a default rule (priority 0, 32766, or 32767).
Trait Implementations§
Source§impl Clone for RuleMessage
impl Clone for RuleMessage
Source§fn clone(&self) -> RuleMessage
fn clone(&self) -> RuleMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more