Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data IPv6Addr = IPv6Addr !Text
- maybeIPv6Addr :: Text -> Maybe IPv6Addr
- maybePureIPv6Addr :: Text -> Maybe IPv6Addr
- maybeFullIPv6Addr :: Text -> Maybe IPv6Addr
- sameIPv6Addr :: Text -> Text -> Bool
- fromIPv6Addr :: IPv6Addr -> Text
- toIPv6 :: IPv6Addr -> IPv6
- toHostName :: IPv6Addr -> HostName
- toIP6ARPA :: IPv6Addr -> Text
- toUNC :: IPv6Addr -> Text
- getIPv6AddrOf :: String -> IO (Maybe IPv6Addr)
- randIPv6Addr :: IO IPv6Addr
- randIPv6AddrWithPrefix :: Maybe Text -> IO (Maybe IPv6Addr)
Documentation
sameIPv6Addr :: Text -> Text -> Bool Source #
Returns True
if arguments are two textual representations of a same IPv6 address.
Conversions
toIP6ARPA :: IPv6Addr -> Text Source #
Returns the reverse lookup domain name corresponding of the given IPv6 address (RFC 3596 Section 2.5).
toIP6ARPA (IPv6Addr "4321:0:1:2:3:4:567:89ab") == "b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.ARPA."
toUNC :: IPv6Addr -> Text Source #
Returns the Windows UNC path name of the given IPv6 Address.
toUNC (IPv6Addr "2001:0DB8:002a:1005:230:48ff:fe73:989d") == "2001-db8-2a-1005-230-48ff-fe73-989d.ipv6-literal.net"
Utils
randIPv6AddrWithPrefix :: Maybe Text -> IO (Maybe IPv6Addr) Source #
Returns a random IPv6Addr
, optionally with the given prefix.
randIPv6AddrWithPrefix (Just "4321:0:1:2:3:4")