#include <_endian.h>
#include <stdint.h>
Go to the source code of this file.
◆ __BIG_ENDIAN
| #define __BIG_ENDIAN 4321 |
◆ __bswap16
| #define __bswap16 |
( |
|
x | ) |
((uint16_t)((((uint16_t)(x)&0xff00) >> 8) | (((uint16_t)(x)&0x00ff) << 8))) |
◆ __bswap32
Value:((uint32_t)((((uint32_t)(x)&0xff000000) >> 24) | (((uint32_t)(x)&0x00ff0000) >> 8) | \
(((uint32_t)(x)&0x0000ff00) << 8) | (((uint32_t)(x)&0x000000ff) << 24)))
Definition at line 19 of file endian.h.
◆ __bswap64
Value:((uint64_t)((((uint64_t)(x)&0xff00000000000000ULL) >> 56) | \
(((uint64_t)(x)&0x00ff000000000000ULL) >> 40) | \
(((uint64_t)(x)&0x0000ff0000000000ULL) >> 24) | \
(((uint64_t)(x)&0x000000ff00000000ULL) >> 8) | \
(((uint64_t)(x)&0x00000000ff000000ULL) << 8) | \
(((uint64_t)(x)&0x0000000000ff0000ULL) << 24) | \
(((uint64_t)(x)&0x000000000000ff00ULL) << 40) | \
(((uint64_t)(x)&0x00000000000000ffULL) << 56)))
Definition at line 23 of file endian.h.
◆ __LITTLE_ENDIAN
| #define __LITTLE_ENDIAN 1234 |
◆ __PDP_ENDIAN
| #define __PDP_ENDIAN 3412 |
◆ be16toh
| #define be16toh |
( |
|
x | ) |
(uint16_t)(x) |
◆ be32toh
| #define be32toh |
( |
|
x | ) |
(uint32_t)(x) |
◆ be64toh
| #define be64toh |
( |
|
x | ) |
(uint64_t)(x) |
◆ betoh16
| #define betoh16 |
( |
|
x | ) |
(uint16_t)(x) |
◆ betoh32
| #define betoh32 |
( |
|
x | ) |
(uint32_t)(x) |
◆ betoh64
| #define betoh64 |
( |
|
x | ) |
(uint64_t)(x) |
◆ BIG_ENDIAN
◆ BYTE_ORDER
| #define BYTE_ORDER __BYTE_ORDER |
◆ htobe16
| #define htobe16 |
( |
|
x | ) |
(uint16_t)(x) |
◆ htobe32
| #define htobe32 |
( |
|
x | ) |
(uint32_t)(x) |
◆ htobe64
| #define htobe64 |
( |
|
x | ) |
(uint64_t)(x) |
◆ htole16
◆ htole32
◆ htole64
◆ htonl
| #define htonl |
( |
|
x | ) |
((uint32_t)(x)) |
◆ HTONL
◆ htonll
| #define htonll |
( |
|
x | ) |
((uint64_t)(x)) |
◆ HTONLL
◆ htons
| #define htons |
( |
|
x | ) |
((uint16_t)(x)) |
◆ HTONS
◆ le16toh
◆ le32toh
◆ le64toh
◆ letoh16
◆ letoh32
◆ letoh64
◆ LITTLE_ENDIAN
◆ ntohl
| #define ntohl |
( |
|
x | ) |
((uint32_t)(x)) |
◆ NTOHL
◆ ntohll
| #define ntohll |
( |
|
x | ) |
((uint64_t)(x)) |
◆ NTOHLL
◆ ntohs
| #define ntohs |
( |
|
x | ) |
((uint16_t)(x)) |
◆ NTOHS
◆ PDP_ENDIAN