1 /*-------------------------------------------------------------------------
4 * Definitions for IPv6-aware network access.
6 * These definitions are used by both frontend and backend code.
8 * Copyright (c) 2003-2019, PostgreSQL Global Development Group
10 * src/include/common/ip.h
12 *-------------------------------------------------------------------------
17 #include "getaddrinfo.h" /* pgrminclude ignore */
18 #include "libpq/pqcomm.h" /* pgrminclude ignore */
21 #ifdef HAVE_UNIX_SOCKETS
22 #define IS_AF_UNIX(fam) ((fam) == AF_UNIX)
24 #define IS_AF_UNIX(fam) (0)
27 extern int pg_getaddrinfo_all(const char *hostname
, const char *servname
,
28 const struct addrinfo
*hintp
,
29 struct addrinfo
**result
);
30 extern void pg_freeaddrinfo_all(int hint_ai_family
, struct addrinfo
*ai
);
32 extern int pg_getnameinfo_all(const struct sockaddr_storage
*addr
, int salen
,
33 char *node
, int nodelen
,
34 char *service
, int servicelen
,