Go to the source code of this file.
|
| #define | htonl(x) (((x) << 24 & 0xFF000000UL) | ((x) << 8 & 0x00FF0000UL) | ((x) >> 8 & 0x0000FF00UL) | ((x) >> 24 & 0x000000FFUL)) |
| |
| #define | htonll(x) ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32)) |
| | support for 64 bytes
|
| |
| #define | htons(x) (((uint16_t)(x)&0xff00) >> 8) | (((uint16_t)(x)&0X00FF) << 8) |
| |
| #define | ntohl(x) htonl(x) |
| |
| #define | ntohll(x) ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) |
| |
| #define | ntohs(x) htons(x) |
| |
◆ htonl
| #define htonl |
( |
|
x | ) |
(((x) << 24 & 0xFF000000UL) | ((x) << 8 & 0x00FF0000UL) | ((x) >> 8 & 0x0000FF00UL) | ((x) >> 24 & 0x000000FFUL)) |
◆ htonll
| #define htonll |
( |
|
x | ) |
((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32)) |
◆ htons
| #define htons |
( |
|
x | ) |
(((uint16_t)(x)&0xff00) >> 8) | (((uint16_t)(x)&0X00FF) << 8) |
◆ ntohl
| #define ntohl |
( |
|
x | ) |
htonl(x) |
◆ ntohll
| #define ntohll |
( |
|
x | ) |
((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) |
◆ ntohs
| #define ntohs |
( |
|
x | ) |
htons(x) |