pub struct IPRoutingRule { /* private fields */ }Expand description
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl IPRoutingRule
impl IPRoutingRule
Sourcepub fn as_ptr(&self) -> *mut NMIPRoutingRule
pub fn as_ptr(&self) -> *mut NMIPRoutingRule
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut NMIPRoutingRule) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut NMIPRoutingRule) -> &Self
Borrows the underlying C value.
Source§impl IPRoutingRule
impl IPRoutingRule
Sourcepub fn new(addr_family: i32) -> IPRoutingRule
Available on crate feature v1_18 only.
pub fn new(addr_family: i32) -> IPRoutingRule
v1_18 only.Sourcepub fn cmp(&self, other: Option<&IPRoutingRule>) -> i32
Available on crate feature v1_18 only.
pub fn cmp(&self, other: Option<&IPRoutingRule>) -> i32
v1_18 only.Sourcepub fn addr_family(&self) -> i32
Available on crate feature v1_18 only.
pub fn addr_family(&self) -> i32
v1_18 only.§Returns
the address family of the rule. Either AF_INET or AF_INET6.
Sourcepub fn destination_port_end(&self) -> u16
Available on crate feature v1_18 only.
pub fn destination_port_end(&self) -> u16
v1_18 only.§Returns
the destination port end setting.
Sourcepub fn destination_port_start(&self) -> u16
Available on crate feature v1_18 only.
pub fn destination_port_start(&self) -> u16
v1_18 only.§Returns
the destination port start setting.
Sourcepub fn from_len(&self) -> u8
Available on crate feature v1_18 only.
pub fn from_len(&self) -> u8
v1_18 only.§Returns
the set prefix length for the from/src parameter.
Sourcepub fn inverts(&self) -> bool
Available on crate feature v1_18 only.
pub fn inverts(&self) -> bool
v1_18 only.§Returns
the “invert” setting of the rule.
Sourcepub fn ipproto(&self) -> u8
Available on crate feature v1_18 only.
pub fn ipproto(&self) -> u8
v1_18 only.§Returns
the ipproto of the rule.
Sourcepub fn priority(&self) -> i64
Available on crate feature v1_18 only.
pub fn priority(&self) -> i64
v1_18 only.§Returns
the priority. A valid priority is in the range from
0 to G_MAXUINT32. If unset, -1 is returned.
Sourcepub fn source_port_end(&self) -> u16
Available on crate feature v1_18 only.
pub fn source_port_end(&self) -> u16
v1_18 only.§Returns
the source port end setting.
Sourcepub fn source_port_start(&self) -> u16
Available on crate feature v1_18 only.
pub fn source_port_start(&self) -> u16
v1_18 only.§Returns
the source port start setting.
Sourcepub fn suppress_prefixlength(&self) -> i32
Available on crate feature v1_20 only.
pub fn suppress_prefixlength(&self) -> i32
v1_20 only.§Returns
the suppress_prefixlength of the rule. -1 means that the value is unset.
Sourcepub fn to_len(&self) -> u8
Available on crate feature v1_18 only.
pub fn to_len(&self) -> u8
v1_18 only.§Returns
the set prefix length for the to/dst parameter.
Sourcepub fn is_sealed(&self) -> bool
Available on crate feature v1_18 only.
pub fn is_sealed(&self) -> bool
v1_18 only.§Returns
whether @self is sealed. Once sealed, an instance cannot be modified nor unsealed.
Sourcepub fn new_clone(&self) -> IPRoutingRule
Available on crate feature v1_18 only.
pub fn new_clone(&self) -> IPRoutingRule
v1_18 only.Since 1.42, ref-counting of #NMIPRoutingRule is thread-safe.
§Returns
a newly created rule instance with the same settings as @self. Note that the instance will always be unsealed.
Sourcepub fn seal(&self)
Available on crate feature v1_18 only.
pub fn seal(&self)
v1_18 only.Seals the routing rule. Afterwards, the instance can no longer be modified, and it is a bug to call any of the accessors that would modify the rule. If @self was already sealed, this has no effect.
Sourcepub fn set_action(&self, action: u8)
Available on crate feature v1_18 only.
pub fn set_action(&self, action: u8)
v1_18 only.Note that currently only certain actions are allowed. nm_ip_routing_rule_validate() will reject unsupported actions as invalid.
§action
the action to set
Sourcepub fn set_destination_port(&self, start: u16, end: u16)
Available on crate feature v1_18 only.
pub fn set_destination_port(&self, start: u16, end: u16)
v1_18 only.Sourcepub fn set_fwmark(&self, fwmark: u32, fwmask: u32)
Available on crate feature v1_18 only.
pub fn set_fwmark(&self, fwmark: u32, fwmask: u32)
v1_18 only.Sourcepub fn set_iifname(&self, iifname: Option<&str>)
Available on crate feature v1_18 only.
pub fn set_iifname(&self, iifname: Option<&str>)
v1_18 only.Sourcepub fn set_invert(&self, invert: bool)
Available on crate feature v1_18 only.
pub fn set_invert(&self, invert: bool)
v1_18 only.§invert
the new value to set
Sourcepub fn set_ipproto(&self, ipproto: u8)
Available on crate feature v1_18 only.
pub fn set_ipproto(&self, ipproto: u8)
v1_18 only.§ipproto
the ipproto to set
Sourcepub fn set_oifname(&self, oifname: Option<&str>)
Available on crate feature v1_18 only.
pub fn set_oifname(&self, oifname: Option<&str>)
v1_18 only.Sourcepub fn set_priority(&self, priority: i64)
Available on crate feature v1_18 only.
pub fn set_priority(&self, priority: i64)
v1_18 only.A valid priority ranges from 0 to G_MAXUINT32. “-1” is also allowed
to reset the priority. It is a bug calling this function with any
other value.
§priority
the priority to set
Sourcepub fn set_source_port(&self, start: u16, end: u16)
Available on crate feature v1_18 only.
pub fn set_source_port(&self, start: u16, end: u16)
v1_18 only.Sourcepub fn set_suppress_prefixlength(&self, suppress_prefixlength: i32)
Available on crate feature v1_20 only.
pub fn set_suppress_prefixlength(&self, suppress_prefixlength: i32)
v1_20 only.§suppress_prefixlength
the suppress_prefixlength to set. The value -1 means unset.
Sourcepub fn set_table(&self, table: u32)
Available on crate feature v1_18 only.
pub fn set_table(&self, table: u32)
v1_18 only.§table
the table to set
Trait Implementations§
Source§impl Clone for IPRoutingRule
impl Clone for IPRoutingRule
Source§impl Debug for IPRoutingRule
impl Debug for IPRoutingRule
Source§impl From<IPRoutingRule> for Value
impl From<IPRoutingRule> for Value
Source§fn from(s: IPRoutingRule) -> Self
fn from(s: IPRoutingRule) -> Self
Source§impl HasParamSpec for IPRoutingRule
impl HasParamSpec for IPRoutingRule
type ParamSpec = ParamSpecBoxed
Source§type SetValue = IPRoutingRule
type SetValue = IPRoutingRule
type BuilderFn = fn(&str) -> ParamSpecBoxedBuilder<'_, IPRoutingRule>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for IPRoutingRule
impl Hash for IPRoutingRule
Source§impl Ord for IPRoutingRule
impl Ord for IPRoutingRule
Source§fn cmp(&self, other: &IPRoutingRule) -> Ordering
fn cmp(&self, other: &IPRoutingRule) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for IPRoutingRule
impl PartialEq for IPRoutingRule
Source§impl PartialOrd for IPRoutingRule
impl PartialOrd for IPRoutingRule
Source§impl StaticType for IPRoutingRule
impl StaticType for IPRoutingRule
Source§fn static_type() -> Type
fn static_type() -> Type
Self.