hsdns-1.0: Asynchronous DNS ResolverContentsIndex
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
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 :: Endian
The endian of this machine, determined at run-time.
readWord32 :: Word32 -> (Word8, Word8, Word8, Word)
Parse a host-ordered 32-bit word into a network-ordered tuple of 8-bit words.
readWord16 :: Word16 -> (Word8, Word8)
Parse a host-ordered 16-bit word into a network-ordered tuple of 8-bit words.
Produced by Haddock version 0.8