inet.h 816 B

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