inet.h 747 B

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