gi-nm-1.0.1: NM bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.NM.Structs.IPRoutingRule

Description

No description available in the introspection data.

Synopsis

Exported types

Methods

cmp

iPRoutingRuleCmp Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe IPRoutingRule

rule: the IPRoutingRule instance to compare

-> Maybe IPRoutingRule

other: the other IPRoutingRule instance to compare

-> m Int32

Returns: zero, a positive, or a negative integer to indicate equality or how the arguments compare.

No description available in the introspection data.

Since: 1.18

fromString

iPRoutingRuleFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: the string representation to convert to an IPRoutingRule

-> [IPRoutingRuleAsStringFlags]

toStringFlags: IPRoutingRuleAsStringFlags for controlling the string conversion.

-> Maybe (Map (Ptr ()) (Ptr ()))

extraArgs: extra arguments for controlling the string conversion. Currently, not extra arguments are supported.

-> m IPRoutingRule

Returns: the new IPRoutingRule or Nothing on error. (Can throw GError)

No description available in the introspection data.

Since: 1.18

getAction

iPRoutingRuleGetAction Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word8

Returns: the set action.

No description available in the introspection data.

Since: 1.18

getAddrFamily

iPRoutingRuleGetAddrFamily Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Int32

Returns: the address family of the rule. Either AF_INET or AF_INET6.

No description available in the introspection data.

Since: 1.18

getDestinationPortEnd

iPRoutingRuleGetDestinationPortEnd Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word16

Returns: the destination port end setting.

No description available in the introspection data.

Since: 1.18

getDestinationPortStart

iPRoutingRuleGetDestinationPortStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word16

Returns: the destination port start setting.

No description available in the introspection data.

Since: 1.18

getFrom

iPRoutingRuleGetFrom Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Text

Returns: the set from/src parameter or Nothing, if no value is set.

No description available in the introspection data.

Since: 1.18

getFromLen

iPRoutingRuleGetFromLen Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word8

Returns: the set prefix length for the from/src parameter.

No description available in the introspection data.

Since: 1.18

getFwmark

iPRoutingRuleGetFwmark Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word32

Returns: the fwmark setting.

No description available in the introspection data.

Since: 1.18

getFwmask

iPRoutingRuleGetFwmask Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word32

Returns: the fwmask setting.

No description available in the introspection data.

Since: 1.18

getIifname

iPRoutingRuleGetIifname Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance.

-> m Text

Returns: the set iifname or Nothing if unset.

No description available in the introspection data.

Since: 1.18

getInvert

iPRoutingRuleGetInvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Bool

Returns: the "invert" setting of the rule.

No description available in the introspection data.

Since: 1.18

getIpproto

iPRoutingRuleGetIpproto Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word8

Returns: the ipproto of the rule.

No description available in the introspection data.

Since: 1.18

getOifname

iPRoutingRuleGetOifname Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance.

-> m Text

Returns: the set oifname or Nothing if unset.

No description available in the introspection data.

Since: 1.18

getPriority

iPRoutingRuleGetPriority Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Int64

Returns: the priority. A valid priority is in the range from 0 to MAXUINT32. If unset, -1 is returned.

No description available in the introspection data.

Since: 1.18

getSourcePortEnd

iPRoutingRuleGetSourcePortEnd Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word16

Returns: the source port end setting.

No description available in the introspection data.

Since: 1.18

getSourcePortStart

iPRoutingRuleGetSourcePortStart Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word16

Returns: the source port start setting.

No description available in the introspection data.

Since: 1.18

getSuppressPrefixlength

iPRoutingRuleGetSuppressPrefixlength Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Int32

Returns: the suppress_prefixlength of the rule. -1 means that the value is unset.

No description available in the introspection data.

Since: 1.20

getTable

iPRoutingRuleGetTable Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word32

Returns: the set table.

No description available in the introspection data.

Since: 1.18

getTo

iPRoutingRuleGetTo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Text

Returns: the set to/dst parameter or Nothing, if no value is set.

No description available in the introspection data.

Since: 1.18

getToLen

iPRoutingRuleGetToLen Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word8

Returns: the set prefix length for the to/dst parameter.

No description available in the introspection data.

Since: 1.18

getTos

iPRoutingRuleGetTos Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Word8

Returns: the tos of the rule.

No description available in the introspection data.

Since: 1.18

getUidRange

iPRoutingRuleGetUidRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m (Bool, Word32, Word32)

Returns: True if a uid range is set.

This API was wrongly introduced in the header files for 1.32, but the symbols were not exported. The API only works since 1.34 and newer.

No description available in the introspection data.

Since: 1.34

isSealed

iPRoutingRuleIsSealed Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m Bool

Returns: whether self is sealed. Once sealed, an instance cannot be modified nor unsealed.

No description available in the introspection data.

Since: 1.18

new

iPRoutingRuleNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

addrFamily: the address family of the routing rule. Must be either AF_INET (2) or AF_INET6 (10).

-> m IPRoutingRule

Returns: a newly created rule instance with the provided address family. The instance is unsealed.

No description available in the introspection data.

Since: 1.18

newClone

iPRoutingRuleNewClone Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

rule: the IPRoutingRule to clone.

-> m IPRoutingRule

Returns: a newly created rule instance with the same settings as rule. Note that the instance will always be unsealed.

Since 1.42, ref-counting of IPRoutingRule is thread-safe.

Since: 1.18

ref

iPRoutingRuleRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe IPRoutingRule

self: the IPRoutingRule instance

-> m IPRoutingRule

Returns: the self argument with incremented reference count.

Since 1.42, ref-counting of IPRoutingRule is thread-safe.

Increases the reference count of the instance.

Since: 1.18

seal

iPRoutingRuleSeal Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> m () 

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.

Since: 1.18

setAction

iPRoutingRuleSetAction Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word8

action: the action to set

-> m () 

Note that currently only certain actions are allowed. iPRoutingRuleValidate will reject unsupported actions as invalid.

Since: 1.18

setDestinationPort

iPRoutingRuleSetDestinationPort Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word16

start: the start port to set.

-> Word16

end: the end port to set.

-> m () 

No description available in the introspection data.

Since: 1.18

setFrom

iPRoutingRuleSetFrom Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Maybe Text

from: the from/src address to set. The address family must match.

-> Word8

len: the corresponding prefix length of the address.

-> m () 

Setting invalid values is accepted, but will later fail during iPRoutingRuleValidate.

Since: 1.18

setFwmark

iPRoutingRuleSetFwmark Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word32

fwmark: the fwmark

-> Word32

fwmask: the fwmask

-> m () 

No description available in the introspection data.

Since: 1.18

setIifname

iPRoutingRuleSetIifname Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance.

-> Maybe Text

iifname: the iifname to set or Nothing to unset.

-> m () 

The name supports C backslash escaping for non-UTF-8 characters. Note that ipRoutingRuleFromString too uses backslash escaping when tokenizing the words by whitespace. So, in string representation you'd get double backslashes.

Since: 1.18

setInvert

iPRoutingRuleSetInvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Bool

invert: the new value to set

-> m () 

No description available in the introspection data.

Since: 1.18

setIpproto

iPRoutingRuleSetIpproto Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word8

ipproto: the ipproto to set

-> m () 

No description available in the introspection data.

Since: 1.18

setOifname

iPRoutingRuleSetOifname Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance.

-> Maybe Text

oifname: the oifname to set or Nothing to unset.

-> m () 

The name supports C backslash escaping for non-UTF-8 characters. Note that ipRoutingRuleFromString too uses backslash escaping when tokenizing the words by whitespace. So, in string representation you'd get double backslashes.

Since: 1.18

setPriority

iPRoutingRuleSetPriority Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Int64

priority: the priority to set

-> m () 

A valid priority ranges from 0 to MAXUINT32. "-1" is also allowed to reset the priority. It is a bug calling this function with any other value.

Since: 1.18

setSourcePort

iPRoutingRuleSetSourcePort Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word16

start: the start port to set.

-> Word16

end: the end port to set.

-> m () 

No description available in the introspection data.

Since: 1.18

setSuppressPrefixlength

iPRoutingRuleSetSuppressPrefixlength Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Int32

suppressPrefixlength: the suppress_prefixlength to set. The value -1 means unset.

-> m () 

No description available in the introspection data.

Since: 1.20

setTable

iPRoutingRuleSetTable Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word32

table: the table to set

-> m () 

No description available in the introspection data.

Since: 1.18

setTo

iPRoutingRuleSetTo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Maybe Text

to: the to/dst address to set. The address family must match.

-> Word8

len: the corresponding prefix length of the address. If to is Nothing, this valid is ignored.

-> m () 

Setting invalid values is accepted, but will later fail during iPRoutingRuleValidate.

Since: 1.18

setTos

iPRoutingRuleSetTos Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word8

tos: the tos to set

-> m () 

No description available in the introspection data.

Since: 1.18

setUidRange

iPRoutingRuleSetUidRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance

-> Word32

uidRangeStart: the uid_range start to set.

-> Word32

uidRangeEnd: the uid_range start to set.

-> m () 

For a valid range, start must be less or equal to end. If set to an invalid range, the range gets unset.

This API was wrongly introduced in the header files for 1.32, but the symbols were not exported. The API only works since 1.34 and newer.

Since: 1.34

toString

iPRoutingRuleToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance to convert to string.

-> [IPRoutingRuleAsStringFlags]

toStringFlags: IPRoutingRuleAsStringFlags for controlling the string conversion.

-> Maybe (Map (Ptr ()) (Ptr ()))

extraArgs: extra arguments for controlling the string conversion. Currently, not extra arguments are supported.

-> m Text

Returns: the string representation or Nothing on error. (Can throw GError)

No description available in the introspection data.

Since: 1.18

unref

iPRoutingRuleUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe IPRoutingRule

self: the IPRoutingRule instance

-> m () 

Decreases the reference count of the instance and destroys the instance if the reference count reaches zero.

Since 1.42, ref-counting of IPRoutingRule is thread-safe.

Since: 1.18

validate

iPRoutingRuleValidate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IPRoutingRule

self: the IPRoutingRule instance to validate

-> m ()

(Can throw GError)

No description available in the introspection data.

Since: 1.18