Copyright | 2015 Dylan Simon |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Representaion of PostgreSQL's inet/cidr types using Network.Socket. We don't (yet) supply PGColumn (parsing) instances.
Synopsis
- data PGInet
- = PGInet {
- pgInetAddr :: !HostAddress
- pgInetMask :: !Word8
- | PGInet6 {
- pgInetAddr6 :: !HostAddress6
- pgInetMask :: !Word8
- = PGInet {
- sockAddrPGInet :: SockAddr -> Maybe PGInet
- bton32 :: (Word8, Word8, Word8, Word8) -> Word32
Documentation
PGInet | |
| |
PGInet6 | |
|
bton32 :: (Word8, Word8, Word8, Word8) -> Word32 Source #
Convert four bytes to network byte order, using unsafe casting.
byteSwap32
would be better, but I couldn't find a good way to determine host byte order.