Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype IpAddress = IpAddress {}
- newtype IpNetMask = IpNetMask {}
- data IpBlock v = IpBlock {}
- bitPower :: IpNetMask -> Word64
- isCanonical :: IpBlock v -> Bool
- splitBlock :: IpBlock Canonical -> Maybe (IpBlock Canonical, IpBlock Canonical)
- parseIpAddress :: Parser IpAddress
- showIpAddress :: IpAddress -> String
- showsIpAddress :: IpAddress -> String -> String
- tshowIpAddress :: IpAddress -> Text
- tshowIpBlock :: IpBlock v -> Text
- ipAddressToWords :: IpAddress -> (Word8, Word8, Word8, Word8)
- firstIpAddress :: IpBlock v -> IpAddress
- lastIpAddress :: IpBlock v -> IpAddress
- canonicaliseIpBlock :: IpBlock v -> IpBlock Canonical
- collapseIpBlocks :: [IpBlock Canonical] -> [IpBlock Canonical]
- splitIpRange :: Range IpAddress -> (IpBlock Canonical, Maybe (Range IpAddress))
- rangeToBlocksDL :: Range IpAddress -> [IpBlock Canonical] -> [IpBlock Canonical]
- rangeToBlocks :: Range IpAddress -> [IpBlock Canonical]
- blockToRange :: IpBlock Canonical -> Range IpAddress
Documentation
Instances
Bounded IpAddress Source # | |
Enum IpAddress Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 succ :: IpAddress -> IpAddress # pred :: IpAddress -> IpAddress # fromEnum :: IpAddress -> Int # enumFrom :: IpAddress -> [IpAddress] # enumFromThen :: IpAddress -> IpAddress -> [IpAddress] # enumFromTo :: IpAddress -> IpAddress -> [IpAddress] # enumFromThenTo :: IpAddress -> IpAddress -> IpAddress -> [IpAddress] # | |
Eq IpAddress Source # | |
Ord IpAddress Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 | |
Read IpAddress Source # | |
Show IpAddress Source # | |
Generic IpAddress Source # | |
type Rep IpAddress Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 |
Instances
Bounded IpNetMask Source # | |
Enum IpNetMask Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 succ :: IpNetMask -> IpNetMask # pred :: IpNetMask -> IpNetMask # fromEnum :: IpNetMask -> Int # enumFrom :: IpNetMask -> [IpNetMask] # enumFromThen :: IpNetMask -> IpNetMask -> [IpNetMask] # enumFromTo :: IpNetMask -> IpNetMask -> [IpNetMask] # enumFromThenTo :: IpNetMask -> IpNetMask -> IpNetMask -> [IpNetMask] # | |
Eq IpNetMask Source # | |
Ord IpNetMask Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 | |
Show IpNetMask Source # | |
Generic IpNetMask Source # | |
type Rep IpNetMask Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 |
An IP block. The type parameter determines whether or not the value of the type is canonical.
Instances
Eq (IpBlock v) Source # | |
Ord (IpBlock v) Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 | |
Read (IpBlock Unaligned) Source # | |
Read (IpBlock Canonical) Source # | |
Show (IpBlock v) Source # | |
Generic (IpBlock v) Source # | |
type Rep (IpBlock v) Source # | |
Defined in HaskellWorks.Data.Network.Ip.Ipv4 type Rep (IpBlock v) = D1 (MetaData "IpBlock" "HaskellWorks.Data.Network.Ip.Ipv4" "hw-ip-2.0.0.0-6GxjUWGmn6D3Mt1xyOU7IU" False) (C1 (MetaCons "IpBlock" PrefixI True) (S1 (MetaSel (Just "base") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 IpAddress) :*: S1 (MetaSel (Just "mask") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 IpNetMask))) |
isCanonical :: IpBlock v -> Bool Source #
A valid block must have all host-bits set to zero after the mask is applied
showIpAddress :: IpAddress -> String Source #
tshowIpAddress :: IpAddress -> Text Source #
tshowIpBlock :: IpBlock v -> Text Source #
firstIpAddress :: IpBlock v -> IpAddress Source #
lastIpAddress :: IpBlock v -> IpAddress Source #