Eneboo - Documentación para desarrolladores
src/libpq/include/libpq/ip.h
Ir a la documentación de este archivo.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * ip.h
00004  *        Definitions for IPv6-aware network access.
00005  *
00006  * Copyright (c) 2003-2005, PostgreSQL Global Development Group
00007  *
00008  * $PostgreSQL: pgsql/src/include/libpq/ip.h,v 1.15.2.1 2005/11/22 18:23:28 momjian Exp $
00009  *
00010  *-------------------------------------------------------------------------
00011  */
00012 #ifndef IP_H
00013 #define IP_H
00014 
00015 #include "getaddrinfo.h"
00016 #include "libpq/pqcomm.h"
00017 
00018 
00019 extern int pg_getaddrinfo_all(const char *hostname, const char *servname,
00020                                    const struct addrinfo * hintp,
00021                                    struct addrinfo ** result);
00022 extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo * ai);
00023 
00024 extern int pg_getnameinfo_all(const struct sockaddr_storage * addr, int salen,
00025                                    char *node, int nodelen,
00026                                    char *service, int servicelen,
00027                                    int flags);
00028 
00029 extern int pg_range_sockaddr(const struct sockaddr_storage * addr,
00030                                   const struct sockaddr_storage * netaddr,
00031                                   const struct sockaddr_storage * netmask);
00032 
00033 extern int pg_sockaddr_cidr_mask(struct sockaddr_storage * mask,
00034                                           char *numbits, int family);
00035 
00036 #ifdef HAVE_IPV6
00037 extern void pg_promote_v4_to_v6_addr(struct sockaddr_storage * addr);
00038 extern void pg_promote_v4_to_v6_mask(struct sockaddr_storage * addr);
00039 #endif
00040 
00041 #ifdef  HAVE_UNIX_SOCKETS
00042 #define IS_AF_UNIX(fam) ((fam) == AF_UNIX)
00043 #else
00044 #define IS_AF_UNIX(fam) (0)
00045 #endif
00046 
00047 #endif   /* IP_H */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'