My Project
Chargement...
Recherche...
Aucune correspondance
inet.h
Aller à la documentation de ce fichier.
1
5#ifndef ARPA_DEF
6#define ARPA_DEF
7
8static inline uint16_t htons(uint16_t x)
9{
10#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
11 return __builtin_bswap16(x);
12#else
13 return x;
14#endif
15}
16
17static inline uint16_t ntohs(uint16_t x)
18{
19 return htons(x);
20}
21
22static inline uint32_t htonl(uint32_t x)
23{
24#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
25 return __builtin_bswap32(x);
26#else
27 return x;
28#endif
29}
30
31static inline uint32_t ntohl(uint32_t x)
32{
33 return htonl(x);
34}
35#endif // ARPA_DEF
unsigned long uint32_t
Definition types.h:20
unsigned short uint16_t
Definition types.h:16