Go to the documentation of this file.
46 # define htons(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
50 # define ntohs(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
54 # define htonl(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
55 ((((unsigned long)(n) & 0xFF00)) << 8) | \
56 ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
57 ((((unsigned long)(n) & 0xFF000000)) >> 24))
61 # define ntohl(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
62 ((((unsigned long)(n) & 0xFF00)) << 8) | \
63 ((((unsigned long)(n) & 0xFF0000)) >> 8) | \
64 ((((unsigned long)(n) & 0xFF000000)) >> 24))
67 #endif //ENDIAN_CONV_H