inet.h 878 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _ARPA_INET_H
  2. #define _ARPA_INET_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #include <netinet/in.h>
  8. #include <inttypes.h>
  9. #define __NEED_socklen_t
  10. #define __NEED_in_addr_t
  11. #define __NEED_in_port_t
  12. #define __NEED_uint16_t
  13. #define __NEED_uint32_t
  14. #define __NEED_struct_in_addr
  15. #include <bits/alltypes.h>
  16. uint32_t htonl(uint32_t);
  17. uint16_t htons(uint16_t);
  18. uint32_t ntohl(uint32_t);
  19. uint16_t ntohs(uint16_t);
  20. in_addr_t inet_addr (const char *);
  21. char *inet_ntoa (struct in_addr);
  22. int inet_pton (int, const char *__restrict, void *__restrict);
  23. const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
  24. int inet_aton (const char *, struct in_addr *); /* nonstandard but widely used */
  25. #undef INET_ADDRSTRLEN
  26. #undef INET6_ADDRSTRLEN
  27. #define INET_ADDRSTRLEN 16
  28. #define INET6_ADDRSTRLEN 46
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif