inet.h 807 B

123456789101112131415161718192021222324252627282930313233343536
  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. uint32_t htonl(uint32_t);
  9. uint16_t htons(uint16_t);
  10. uint32_t ntohl(uint32_t);
  11. uint16_t ntohs(uint16_t);
  12. in_addr_t inet_addr (const char *);
  13. in_addr_t inet_network (const char *);
  14. char *inet_ntoa (struct in_addr);
  15. int inet_pton (int, const char *__restrict, void *__restrict);
  16. const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
  17. int inet_aton (const char *, struct in_addr *);
  18. struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
  19. in_addr_t inet_lnaof(struct in_addr);
  20. in_addr_t inet_netof(struct in_addr);
  21. #undef INET_ADDRSTRLEN
  22. #undef INET6_ADDRSTRLEN
  23. #define INET_ADDRSTRLEN 16
  24. #define INET6_ADDRSTRLEN 46
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif