inet.h 999 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. in_addr_t inet_network (const char *);
  22. char *inet_ntoa (struct in_addr);
  23. int inet_pton (int, const char *__restrict, void *__restrict);
  24. const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
  25. int inet_aton (const char *, struct in_addr *);
  26. struct in_addr inet_makeaddr(int, int);
  27. in_addr_t inet_lnaof(struct in_addr);
  28. in_addr_t inet_netof(struct in_addr);
  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