hsdns-1.4.3: Asynchronous DNS Resolver

Portabilityportable
Stabilityprovisional
Maintainersimons@cryp.to

ADNS.Endian

Description

Determine the machine's endian.

Synopsis

Documentation

data Endian Source

Signify the system's native byte order according to significance of bytes from low addresses to high addresses.

Constructors

LittleEndian

byte order: 1234

BigEndian

byte order: 4321

PDPEndian

byte order: 3412

Instances

endian :: EndianSource

The endian of this machine, determined at run-time.

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.