Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.NM.Structs.IPRoutingRule
Contents
- Exported types
- Methods
- cmp
- fromString
- getAction
- getAddrFamily
- getDestinationPortEnd
- getDestinationPortStart
- getFrom
- getFromLen
- getFwmark
- getFwmask
- getIifname
- getInvert
- getIpproto
- getOifname
- getPriority
- getSourcePortEnd
- getSourcePortStart
- getSuppressPrefixlength
- getTable
- getTo
- getToLen
- getTos
- getUidRange
- isSealed
- new
- newClone
- ref
- seal
- setAction
- setDestinationPort
- setFrom
- setFwmark
- setIifname
- setInvert
- setIpproto
- setOifname
- setPriority
- setSourcePort
- setSuppressPrefixlength
- setTable
- setTo
- setTos
- setUidRange
- toString
- unref
- validate
Description
No description available in the introspection data.
Synopsis
- newtype IPRoutingRule = IPRoutingRule (ManagedPtr IPRoutingRule)
- iPRoutingRuleCmp :: (HasCallStack, MonadIO m) => Maybe IPRoutingRule -> Maybe IPRoutingRule -> m Int32
- iPRoutingRuleFromString :: (HasCallStack, MonadIO m) => Text -> [IPRoutingRuleAsStringFlags] -> Maybe (Map (Ptr ()) (Ptr ())) -> m IPRoutingRule
- iPRoutingRuleGetAction :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word8
- iPRoutingRuleGetAddrFamily :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Int32
- iPRoutingRuleGetDestinationPortEnd :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word16
- iPRoutingRuleGetDestinationPortStart :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word16
- iPRoutingRuleGetFrom :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Text
- iPRoutingRuleGetFromLen :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word8
- iPRoutingRuleGetFwmark :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word32
- iPRoutingRuleGetFwmask :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word32
- iPRoutingRuleGetIifname :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Text
- iPRoutingRuleGetInvert :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Bool
- iPRoutingRuleGetIpproto :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word8
- iPRoutingRuleGetOifname :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Text
- iPRoutingRuleGetPriority :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Int64
- iPRoutingRuleGetSourcePortEnd :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word16
- iPRoutingRuleGetSourcePortStart :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word16
- iPRoutingRuleGetSuppressPrefixlength :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Int32
- iPRoutingRuleGetTable :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word32
- iPRoutingRuleGetTo :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Text
- iPRoutingRuleGetToLen :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word8
- iPRoutingRuleGetTos :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Word8
- iPRoutingRuleGetUidRange :: (HasCallStack, MonadIO m) => IPRoutingRule -> m (Bool, Word32, Word32)
- iPRoutingRuleIsSealed :: (HasCallStack, MonadIO m) => IPRoutingRule -> m Bool
- iPRoutingRuleNew :: (HasCallStack, MonadIO m) => Int32 -> m IPRoutingRule
- iPRoutingRuleNewClone :: (HasCallStack, MonadIO m) => IPRoutingRule -> m IPRoutingRule
- iPRoutingRuleRef :: (HasCallStack, MonadIO m) => Maybe IPRoutingRule -> m IPRoutingRule
- iPRoutingRuleSeal :: (HasCallStack, MonadIO m) => IPRoutingRule -> m ()
- iPRoutingRuleSetAction :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word8 -> m ()
- iPRoutingRuleSetDestinationPort :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word16 -> Word16 -> m ()
- iPRoutingRuleSetFrom :: (HasCallStack, MonadIO m) => IPRoutingRule -> Maybe Text -> Word8 -> m ()
- iPRoutingRuleSetFwmark :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word32 -> Word32 -> m ()
- iPRoutingRuleSetIifname :: (HasCallStack, MonadIO m) => IPRoutingRule -> Maybe Text -> m ()
- iPRoutingRuleSetInvert :: (HasCallStack, MonadIO m) => IPRoutingRule -> Bool -> m ()
- iPRoutingRuleSetIpproto :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word8 -> m ()
- iPRoutingRuleSetOifname :: (HasCallStack, MonadIO m) => IPRoutingRule -> Maybe Text -> m ()
- iPRoutingRuleSetPriority :: (HasCallStack, MonadIO m) => IPRoutingRule -> Int64 -> m ()
- iPRoutingRuleSetSourcePort :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word16 -> Word16 -> m ()
- iPRoutingRuleSetSuppressPrefixlength :: (HasCallStack, MonadIO m) => IPRoutingRule -> Int32 -> m ()
- iPRoutingRuleSetTable :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word32 -> m ()
- iPRoutingRuleSetTo :: (HasCallStack, MonadIO m) => IPRoutingRule -> Maybe Text -> Word8 -> m ()
- iPRoutingRuleSetTos :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word8 -> m ()
- iPRoutingRuleSetUidRange :: (HasCallStack, MonadIO m) => IPRoutingRule -> Word32 -> Word32 -> m ()
- iPRoutingRuleToString :: (HasCallStack, MonadIO m) => IPRoutingRule -> [IPRoutingRuleAsStringFlags] -> Maybe (Map (Ptr ()) (Ptr ())) -> m Text
- iPRoutingRuleUnref :: (HasCallStack, MonadIO m) => Maybe IPRoutingRule -> m ()
- iPRoutingRuleValidate :: (HasCallStack, MonadIO m) => IPRoutingRule -> m ()
Exported types
newtype IPRoutingRule Source #
Memory-managed wrapper type.
Constructors
IPRoutingRule (ManagedPtr IPRoutingRule) |
Instances
Eq IPRoutingRule Source # | |
Defined in GI.NM.Structs.IPRoutingRule Methods (==) :: IPRoutingRule -> IPRoutingRule -> Bool # (/=) :: IPRoutingRule -> IPRoutingRule -> Bool # | |
GBoxed IPRoutingRule Source # | |
Defined in GI.NM.Structs.IPRoutingRule | |
ManagedPtrNewtype IPRoutingRule Source # | |
Defined in GI.NM.Structs.IPRoutingRule Methods | |
TypedObject IPRoutingRule Source # | |
Defined in GI.NM.Structs.IPRoutingRule | |
HasParentTypes IPRoutingRule Source # | |
Defined in GI.NM.Structs.IPRoutingRule | |
IsGValue (Maybe IPRoutingRule) Source # | Convert |
Defined in GI.NM.Structs.IPRoutingRule Methods gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe IPRoutingRule -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe IPRoutingRule) # | |
type ParentTypes IPRoutingRule Source # | |
Defined in GI.NM.Structs.IPRoutingRule |
Methods
Click to display all available methods, including inherited ones
Methods
cmp, isSealed, newClone, ref, seal, toString, unref, validate.
Getters
getAction, getAddrFamily, getDestinationPortEnd, getDestinationPortStart, getFrom, getFromLen, getFwmark, getFwmask, getIifname, getInvert, getIpproto, getOifname, getPriority, getSourcePortEnd, getSourcePortStart, getSuppressPrefixlength, getTable, getTo, getToLen, getTos, getUidRange.
Setters
setAction, setDestinationPort, setFrom, setFwmark, setIifname, setInvert, setIpproto, setOifname, setPriority, setSourcePort, setSuppressPrefixlength, setTable, setTo, setTos, setUidRange.
cmp
Arguments
:: (HasCallStack, MonadIO m) | |
=> Maybe IPRoutingRule |
|
-> Maybe IPRoutingRule |
|
-> 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 |
|
-> [IPRoutingRuleAsStringFlags] |
|
-> Maybe (Map (Ptr ()) (Ptr ())) |
|
-> m IPRoutingRule | Returns: the new |
No description available in the introspection data.
Since: 1.18
getAction
iPRoutingRuleGetAction Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Word8 | Returns: the set action. |
No description available in the introspection data.
Since: 1.18
getAddrFamily
iPRoutingRuleGetAddrFamily Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Int32 | Returns: the address family of the rule. Either |
No description available in the introspection data.
Since: 1.18
getDestinationPortEnd
iPRoutingRuleGetDestinationPortEnd Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> 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 |
|
-> m Word16 | Returns: the destination port start setting. |
No description available in the introspection data.
Since: 1.18
getFrom
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Text | Returns: the set from/src parameter or
|
No description available in the introspection data.
Since: 1.18
getFromLen
iPRoutingRuleGetFromLen Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> 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 |
|
-> m Word32 | Returns: the fwmark setting. |
No description available in the introspection data.
Since: 1.18
getFwmask
iPRoutingRuleGetFwmask Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Word32 | Returns: the fwmask setting. |
No description available in the introspection data.
Since: 1.18
getIifname
iPRoutingRuleGetIifname Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Text | Returns: the set iifname or |
No description available in the introspection data.
Since: 1.18
getInvert
iPRoutingRuleGetInvert Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> 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 |
|
-> 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 |
|
-> m Text | Returns: the set oifname or |
No description available in the introspection data.
Since: 1.18
getPriority
iPRoutingRuleGetPriority Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Int64 | Returns: the priority. A valid priority is in the range from
0 to |
No description available in the introspection data.
Since: 1.18
getSourcePortEnd
iPRoutingRuleGetSourcePortEnd Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> 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 |
|
-> 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 |
|
-> 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 |
|
-> m Word32 | Returns: the set table. |
No description available in the introspection data.
Since: 1.18
getTo
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Text | Returns: the set to/dst parameter or
|
No description available in the introspection data.
Since: 1.18
getToLen
iPRoutingRuleGetToLen Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> m Word8 | Returns: the set prefix length for the to/dst parameter. |
No description available in the introspection data.
Since: 1.18
getTos
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> 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 |
|
-> m (Bool, Word32, Word32) | Returns: 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 |
|
-> m Bool | Returns: whether |
No description available in the introspection data.
Since: 1.18
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> 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 |
|
-> m IPRoutingRule | Returns: a newly created rule instance with
the same settings as |
Since 1.42, ref-counting of IPRoutingRule
is thread-safe.
Since: 1.18
ref
Arguments
:: (HasCallStack, MonadIO m) | |
=> Maybe IPRoutingRule |
|
-> m IPRoutingRule | Returns: the Since 1.42, ref-counting of |
Increases the reference count of the instance.
Since: 1.18
seal
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> 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 |
|
-> Word8 |
|
-> 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 |
|
-> Word16 |
|
-> Word16 |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setFrom
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Maybe Text |
|
-> Word8 |
|
-> m () |
Setting invalid values is accepted, but will later fail
during iPRoutingRuleValidate
.
Since: 1.18
setFwmark
iPRoutingRuleSetFwmark Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setIifname
iPRoutingRuleSetIifname Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Maybe Text |
|
-> 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 |
|
-> Bool |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setIpproto
iPRoutingRuleSetIpproto Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Word8 |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setOifname
iPRoutingRuleSetOifname Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Maybe Text |
|
-> 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 |
|
-> Int64 |
|
-> 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 |
|
-> Word16 |
|
-> Word16 |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setSuppressPrefixlength
iPRoutingRuleSetSuppressPrefixlength Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Int32 |
|
-> m () |
No description available in the introspection data.
Since: 1.20
setTable
iPRoutingRuleSetTable Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Word32 |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setTo
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Maybe Text |
|
-> Word8 |
|
-> m () |
Setting invalid values is accepted, but will later fail
during iPRoutingRuleValidate
.
Since: 1.18
setTos
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Word8 |
|
-> m () |
No description available in the introspection data.
Since: 1.18
setUidRange
iPRoutingRuleSetUidRange Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IPRoutingRule |
|
-> Word32 |
|
-> Word32 |
|
-> 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 |
|
-> [IPRoutingRuleAsStringFlags] |
|
-> Maybe (Map (Ptr ()) (Ptr ())) |
|
-> m Text | Returns: the string representation or |
No description available in the introspection data.
Since: 1.18
unref
Arguments
:: (HasCallStack, MonadIO m) | |
=> Maybe IPRoutingRule |
|
-> 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 |
|
-> m () | (Can throw |
No description available in the introspection data.
Since: 1.18