| 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.IPRoute
Description
No description available in the introspection data.
Synopsis
- newtype IPRoute = IPRoute (ManagedPtr IPRoute)
- iPRouteAttributeValidate :: (HasCallStack, MonadIO m) => Text -> GVariant -> Int32 -> m Bool
- iPRouteDup :: (HasCallStack, MonadIO m) => IPRoute -> m IPRoute
- iPRouteEqual :: (HasCallStack, MonadIO m) => IPRoute -> IPRoute -> m Bool
- iPRouteEqualFull :: (HasCallStack, MonadIO m) => IPRoute -> IPRoute -> Word32 -> m Bool
- iPRouteGetAttribute :: (HasCallStack, MonadIO m) => IPRoute -> Text -> m GVariant
- iPRouteGetAttributeNames :: (HasCallStack, MonadIO m) => IPRoute -> m [Text]
- iPRouteGetDest :: (HasCallStack, MonadIO m) => IPRoute -> m Text
- iPRouteGetFamily :: (HasCallStack, MonadIO m) => IPRoute -> m Int32
- iPRouteGetMetric :: (HasCallStack, MonadIO m) => IPRoute -> m Int64
- iPRouteGetNextHop :: (HasCallStack, MonadIO m) => IPRoute -> m Text
- iPRouteGetPrefix :: (HasCallStack, MonadIO m) => IPRoute -> m Word32
- iPRouteGetVariantAttributeSpec :: (HasCallStack, MonadIO m) => m VariantAttributeSpec
- iPRouteNew :: (HasCallStack, MonadIO m) => Int32 -> Text -> Word32 -> Maybe Text -> Int64 -> m IPRoute
- iPRouteNewBinary :: (HasCallStack, MonadIO m) => Int32 -> Ptr () -> Word32 -> Ptr () -> Int64 -> m IPRoute
- iPRouteRef :: (HasCallStack, MonadIO m) => IPRoute -> m ()
- iPRouteSetAttribute :: (HasCallStack, MonadIO m) => IPRoute -> Text -> Maybe GVariant -> m ()
- iPRouteSetDest :: (HasCallStack, MonadIO m) => IPRoute -> Text -> m ()
- iPRouteSetMetric :: (HasCallStack, MonadIO m) => IPRoute -> Int64 -> m ()
- iPRouteSetNextHop :: (HasCallStack, MonadIO m) => IPRoute -> Maybe Text -> m ()
- iPRouteSetPrefix :: (HasCallStack, MonadIO m) => IPRoute -> Word32 -> m ()
- iPRouteUnref :: (HasCallStack, MonadIO m) => IPRoute -> m ()
Exported types
Memory-managed wrapper type.
Constructors
| IPRoute (ManagedPtr IPRoute) |
Instances
| Eq IPRoute Source # | |
| GBoxed IPRoute Source # | |
Defined in GI.NM.Structs.IPRoute | |
| ManagedPtrNewtype IPRoute Source # | |
Defined in GI.NM.Structs.IPRoute Methods toManagedPtr :: IPRoute -> ManagedPtr IPRoute # | |
| TypedObject IPRoute Source # | |
Defined in GI.NM.Structs.IPRoute | |
| HasParentTypes IPRoute Source # | |
Defined in GI.NM.Structs.IPRoute | |
| IsGValue (Maybe IPRoute) Source # | Convert |
Defined in GI.NM.Structs.IPRoute | |
| type ParentTypes IPRoute Source # | |
Defined in GI.NM.Structs.IPRoute | |
Methods
Click to display all available methods, including inherited ones
Methods
dup, equal, equalFull, ref, unref.
Getters
getAttribute, getAttributeNames, getDest, getFamily, getMetric, getNextHop, getPrefix.
Setters
attributeValidate
iPRouteAttributeValidate Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> GVariant |
|
| -> Int32 |
|
| -> m Bool | (Can throw |
Validates a route attribute, i.e. checks that the attribute is a known one and the value is of the correct type and well-formed.
Since: 1.8
dup
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m IPRoute | Returns: a copy of This API was part of public headers before 1.32.0 but was erroneously not exported in the ABI. It is thus only usable since 1.32.0. |
Creates a copy of route
Since: 1.32
equal
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> IPRoute |
|
| -> m Bool | Returns: |
Determines if two IPRoute objects contain the same destination, prefix,
next hop, and metric. (Attributes are not compared.)
equalFull
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> IPRoute |
|
| -> Word32 |
|
| -> m Bool | Returns: |
Determines if two IPRoute objects contain the same destination, prefix,
next hop, and metric.
Since: 1.10
getAttribute
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> Text |
|
| -> m GVariant | Returns: the value of the attribute with name |
Gets the value of the attribute with name name on route
getAttributeNames
iPRouteGetAttributeNames Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m [Text] | Returns: a |
Gets an array of attribute names defined on route.
getDest
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m Text | Returns: the IP address of the route's destination |
Gets the IP destination address property of this route object.
getFamily
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m Int32 | Returns: the IP address family |
Gets the IP address family (eg, AF_INET) property of this route object.
getMetric
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m Int64 | Returns: the route metric |
Gets the route metric property of this route object; lower values indicate "better" or more preferred routes; -1 indicates "default" (meaning NetworkManager will set it appropriately).
getNextHop
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m Text | Returns: the IP address of the next hop, or |
Gets the IP address of the next hop of this route; this will be Nothing if the
route has no next hop.
getPrefix
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m Word32 | Returns: the IP prefix |
Gets the IP prefix (ie "24" or "30" etc) of this route.
getVariantAttributeSpec
iPRouteGetVariantAttributeSpec Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m VariantAttributeSpec | Returns: the specifiers for route attributes |
No description available in the introspection data.
Since: 1.8
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Int32 |
|
| -> Text |
|
| -> Word32 |
|
| -> Maybe Text |
|
| -> Int64 |
|
| -> m IPRoute | Returns: the new |
Creates a new IPRoute object.
newBinary
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Int32 |
|
| -> Ptr () |
|
| -> Word32 |
|
| -> Ptr () |
|
| -> Int64 |
|
| -> m IPRoute | Returns: the new |
ref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m () |
Increases the reference count of the object.
setAttribute
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> Text |
|
| -> Maybe GVariant |
|
| -> m () |
Sets the named attribute on route to the given value.
setDest
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> Text |
|
| -> m () |
Sets the destination property of this route object.
dest must be a valid address of route's family. If you aren't sure you
have a valid address, use nm_inet_is_valid() to check it.
setMetric
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> Int64 |
|
| -> m () |
Sets the metric property of this route object.
setNextHop
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> Maybe Text |
|
| -> m () |
Sets the next-hop property of this route object.
nextHop (if non-Nothing) must be a valid address of route's family. If you
aren't sure you have a valid address, use utilsIpaddrValid to check
it.
setPrefix
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> Word32 |
|
| -> m () |
Sets the prefix property of this route object.
unref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => IPRoute |
|
| -> m () |
Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.