ip.h 942 B

12345678910111213141516171819202122232425262728293031
  1. /*-------------------------------------------------------------------------
  2. *
  3. * ip.h
  4. * Definitions for IPv6-aware network access.
  5. *
  6. * These definitions are used by both frontend and backend code.
  7. *
  8. * Copyright (c) 2003-2022, PostgreSQL Global Development Group
  9. *
  10. * src/include/common/ip.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef IP_H
  15. #define IP_H
  16. #include "getaddrinfo.h" /* pgrminclude ignore */
  17. #include "libpq/pqcomm.h" /* pgrminclude ignore */
  18. extern int pg_getaddrinfo_all(const char *hostname, const char *servname,
  19. const struct addrinfo *hintp,
  20. struct addrinfo **result);
  21. extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai);
  22. extern int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,
  23. char *node, int nodelen,
  24. char *service, int servicelen,
  25. int flags);
  26. #endif /* IP_H */