Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
InetAddressMask
represents a range of IPv4 or IPv6 addresses
described by a base address and a length indicating how many bits
of the base address are relevant for matching purposes. These are
often given in string form. Eg, "10.0.0.0/8", or "fe80::/10".
Since: 2.32
Synopsis
- newtype InetAddressMask = InetAddressMask (ManagedPtr InetAddressMask)
- class GObject o => IsInetAddressMask o
- toInetAddressMask :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddressMask
- noInetAddressMask :: Maybe InetAddressMask
- inetAddressMaskEqual :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddressMask b) => a -> b -> m Bool
- inetAddressMaskGetAddress :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m InetAddress
- inetAddressMaskGetFamily :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m SocketFamily
- inetAddressMaskGetLength :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Word32
- inetAddressMaskMatches :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddress b) => a -> b -> m Bool
- inetAddressMaskNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word32 -> m InetAddressMask
- inetAddressMaskNewFromString :: (HasCallStack, MonadIO m) => Text -> m InetAddressMask
- inetAddressMaskToString :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Text
- clearInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m ()
- constructInetAddressMaskAddress :: (IsInetAddressMask o, IsInetAddress a) => a -> IO (GValueConstruct o)
- getInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddress
- setInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o, IsInetAddress a) => o -> a -> m ()
- getInetAddressMaskFamily :: (MonadIO m, IsInetAddressMask o) => o -> m SocketFamily
- constructInetAddressMaskLength :: IsInetAddressMask o => Word32 -> IO (GValueConstruct o)
- getInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> m Word32
- setInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> Word32 -> m ()
Exported types
newtype InetAddressMask Source #
Memory-managed wrapper type.
Instances
GObject InetAddressMask Source # | |
Defined in GI.Gio.Objects.InetAddressMask gobjectType :: InetAddressMask -> IO GType # | |
IsObject InetAddressMask Source # | |
Defined in GI.Gio.Objects.InetAddressMask | |
IsInitable InetAddressMask Source # | |
Defined in GI.Gio.Objects.InetAddressMask | |
IsInetAddressMask InetAddressMask Source # | |
Defined in GI.Gio.Objects.InetAddressMask |
class GObject o => IsInetAddressMask o Source #
Type class for types which can be safely cast to InetAddressMask
, for instance with toInetAddressMask
.
Instances
(GObject a, (UnknownAncestorError InetAddressMask a :: Constraint)) => IsInetAddressMask a Source # | |
Defined in GI.Gio.Objects.InetAddressMask | |
IsInetAddressMask InetAddressMask Source # | |
Defined in GI.Gio.Objects.InetAddressMask |
toInetAddressMask :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddressMask Source #
Cast to InetAddressMask
, for types for which this is known to be safe. For general casts, use castTo
.
noInetAddressMask :: Maybe InetAddressMask Source #
A convenience alias for Nothing
:: Maybe
InetAddressMask
.
Methods
equal
:: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddressMask b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: whether |
Tests if mask
and mask2
are the same mask.
Since: 2.32
getAddress
inetAddressMaskGetAddress Source #
:: (HasCallStack, MonadIO m, IsInetAddressMask a) | |
=> a |
|
-> m InetAddress | Returns: |
Gets mask
's base address
Since: 2.32
getFamily
inetAddressMaskGetFamily Source #
:: (HasCallStack, MonadIO m, IsInetAddressMask a) | |
=> a |
|
-> m SocketFamily | Returns: the |
Gets the SocketFamily
of mask
's address
Since: 2.32
getLength
inetAddressMaskGetLength Source #
:: (HasCallStack, MonadIO m, IsInetAddressMask a) | |
=> a |
|
-> m Word32 | Returns: |
Gets mask
's length
Since: 2.32
matches
inetAddressMaskMatches Source #
:: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddress b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: whether |
Tests if address
falls within the range described by mask
.
Since: 2.32
new
:: (HasCallStack, MonadIO m, IsInetAddress a) | |
=> a |
|
-> Word32 |
|
-> m InetAddressMask | Returns: a new |
Creates a new InetAddressMask
representing all addresses whose
first length
bits match addr
.
Since: 2.32
newFromString
inetAddressMaskNewFromString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m InetAddressMask | Returns: a new |
Parses maskString
as an IP address and (optional) length, and
creates a new InetAddressMask
. The length, if present, is
delimited by a "/". If it is not present, then the length is
assumed to be the full length of the address.
Since: 2.32
toString
inetAddressMaskToString Source #
:: (HasCallStack, MonadIO m, IsInetAddressMask a) | |
=> a |
|
-> m Text | Returns: a string corresponding to |
Converts mask
back to its corresponding string form.
Since: 2.32
Properties
address
No description available in the introspection data.
clearInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m () Source #
Set the value of the “address
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#address
constructInetAddressMaskAddress :: (IsInetAddressMask o, IsInetAddress a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “address
” property. This is rarely needed directly, but it is used by new
.
getInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddress Source #
Get the value of the “address
” property.
When overloading is enabled, this is equivalent to
get
inetAddressMask #address
setInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o, IsInetAddress a) => o -> a -> m () Source #
Set the value of the “address
” property.
When overloading is enabled, this is equivalent to
set
inetAddressMask [ #address:=
value ]
family
No description available in the introspection data.
getInetAddressMaskFamily :: (MonadIO m, IsInetAddressMask o) => o -> m SocketFamily Source #
Get the value of the “family
” property.
When overloading is enabled, this is equivalent to
get
inetAddressMask #family
length
No description available in the introspection data.
constructInetAddressMaskLength :: IsInetAddressMask o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “length
” property. This is rarely needed directly, but it is used by new
.
getInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> m Word32 Source #
Get the value of the “length
” property.
When overloading is enabled, this is equivalent to
get
inetAddressMask #length
setInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> Word32 -> m () Source #
Set the value of the “length
” property.
When overloading is enabled, this is equivalent to
set
inetAddressMask [ #length:=
value ]