Copyright | 2015 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | ex8k.hibino@gmail.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe |
Language | Haskell2010 |
This module defines network-address types of PostgreSQL. http://www.postgresql.org/docs/current/static/datatype-net-types.html
- data NetAddress
- data V4HostAddress = V4HostAddress !Word8 !Word8 !Word8 !Word8
- v4HostAddressOctets :: V4HostAddress -> (Word8, Word8, Word8, Word8)
- data V6HostAddress = V6HostAddress !Word16 !Word16 !Word16 !Word16 !Word16 !Word16 !Word16 !Word16
- v6HostAddressLong :: Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> V6HostAddress
- v6HostAddressWords :: V6HostAddress -> (Word16, Word16, Word16, Word16, Word16, Word16, Word16, Word16)
- v6HostAddress :: [Word16] -> [Word16] -> Maybe V6HostAddress
- v6HostAddressL :: [Word16] -> Maybe V6HostAddress
- v6HostAddressR :: [Word16] -> Maybe V6HostAddress
- newtype Inet = Inet NetAddress
- newtype Cidr = Cidr NetAddress
Documentation
data NetAddress Source #
data V4HostAddress Source #
Host address type along with IPv4 address string.
v4HostAddressOctets :: V4HostAddress -> (Word8, Word8, Word8, Word8) Source #
data V6HostAddress Source #
Host address type along with IPv6 address string.
Each Word16
value is host byte order.
Host byte order is portable in programs on its own host.
Network byte order is only needed, when communicating other hosts.
v6HostAddressLong :: Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> Word16 -> V6HostAddress Source #
v6HostAddressWords :: V6HostAddress -> (Word16, Word16, Word16, Word16, Word16, Word16, Word16, Word16) Source #
v6HostAddress :: [Word16] -> [Word16] -> Maybe V6HostAddress Source #
v6HostAddressL :: [Word16] -> Maybe V6HostAddress Source #
v6HostAddressR :: [Word16] -> Maybe V6HostAddress Source #