Loading...
Searching...
No Matches

libc header for endian conversion More...

Detailed Description

libc header for endian conversion

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@pos.nosp@m.teo..nosp@m.net

Definition in file endian.h.

#include <stdint.h>
+ Include dependency graph for endian.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LITTLE_ENDIAN   magic-number
 A numeric constant representing little endian byte order.
 
#define BIG_ENDIAN   magic-number
 A numeric constant representing big endian byte order.
 
#define PDP_ENDIAN   magic-number
 A numeric constant representing PDP endian byte order.
 
#define BYTE_ORDER   <LITTLE_ENDIAN or BIG_ENDIAN>
 The byte order of this machines indicated by the constant BIG_ENDIAN or LITTLE_ENDIAN.
 

Functions

uint16_t htobe16 (uint16_t host_16bits)
 host to big endian, 16 bit
 
uint16_t htole16 (uint16_t host_16bits)
 host to little endian, 16 bit
 
uint16_t be16toh (uint16_t big_endian_16bits)
 big endian to host, 16 bit
 
uint16_t le16toh (uint16_t little_endian_16bits)
 little endian to host, 16 bit
 
uint32_t htobe32 (uint32_t host_32bits)
 host to big endian, 32 bit
 
uint32_t htole32 (uint32_t host_32bits)
 host to little endian, 32 bit
 
uint32_t be32toh (uint32_t big_endian_32bits)
 big endian to host, 32 bit
 
uint32_t le32toh (uint32_t little_endian_32bits)
 little endian to host, 32 bit
 
uint64_t htobe64 (uint64_t host_64bits)
 host to big endian, 64 bit
 
uint64_t htole64 (uint64_t host_64bits)
 host to little endian, 64 bit
 
uint64_t be64toh (uint64_t big_endian_64bits)
 big endian to host, 64 bit
 
uint64_t le64toh (uint64_t little_endian_64bits)
 little endian to host, 64 bit