1
0

inet.h 968 B

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