codekingpro/portable-devtools
115k
1/*-------------------------------------------------------------------------2 *3 * ip.h4 * Definitions for IPv6-aware network access.5 *6 * These definitions are used by both frontend and backend code.7 *8 * Copyright (c) 2003-2023, PostgreSQL Global Development Group9 *10 * src/include/common/ip.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef IP_H15#define IP_H16 17#include <netdb.h>18#include <sys/socket.h>19 20#include "libpq/pqcomm.h" /* pgrminclude ignore */21 22 23extern int pg_getaddrinfo_all(const char *hostname, const char *servname,24 const struct addrinfo *hintp,25 struct addrinfo **result);26extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai);27 28extern int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,29 char *node, int nodelen,30 char *service, int servicelen,31 int flags);32 33#endif /* IP_H */34 