hsdns-1.3: Asynchronous DNS ResolverSource codeContentsIndex
ADNS.Endian
Portabilityportable
Stabilityprovisional
Maintainersimons@cryp.to
Description
Determine the machine's endian.
Synopsis
data Endian
= LittleEndian
| BigEndian
| PDPEndian
endian :: Endian
readWord32 :: Word32 -> (Word8, Word8, Word8, Word)
readWord16 :: Word16 -> (Word8, Word8)
Documentation
data Endian Source
Signify the system's native byte order according to significance of bytes from low addresses to high addresses.
Constructors
LittleEndianbyte order: 1234
BigEndianbyte order: 4321
PDPEndianbyte order: 3412
show/hide Instances
endian :: EndianSource
readWord32 :: Word32 -> (Word8, Word8, Word8, Word)Source
Parse a host-ordered 32-bit word into a network-ordered tuple of 8-bit words.
readWord16 :: Word16 -> (Word8, Word8)Source
Parse a host-ordered 16-bit word into a network-ordered tuple of 8-bit words.
Produced by Haddock version 2.3.0