Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 2be6f02d06
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 66 lines (55 sloc) 2.283 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
/* -*-pgsql-c-*- */
/*
*
* $Header: /cvsroot/pgpool/pgpool-II/pool_ip.h,v 1.2 2008/01/29 01:56:36 y-asaba Exp $
*
* This file was imported from PostgreSQL 8.0.8 source code.
* See below for the copyright and description.
*
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
* Portions Copyright (c) 2003-2008 PgPool Global Development Group
* Portions Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
* copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of the
* author not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. The author makes no representations about the
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* pool_ip.h.: Definitions for IPv6-aware network access.
*
*/

#ifndef POOL_IP_H
#define POOL_IP_H

#include "pool_type.h"

extern int getaddrinfo_all(const char *hostname, const char *servname,
const struct addrinfo * hintp,
struct addrinfo ** result);
extern void freeaddrinfo_all(int hint_ai_family, struct addrinfo * ai);

extern int getnameinfo_all(const struct sockaddr_storage * addr, int salen,
char *node, int nodelen,
char *service, int servicelen,
int flags);

extern int rangeSockAddr(const struct sockaddr_storage * addr,
const struct sockaddr_storage * netaddr,
const struct sockaddr_storage * netmask);

extern int SockAddr_cidr_mask(struct sockaddr_storage * mask,
char *numbits, int family);

/* imported from PostgreSQL getaddrinfo.c */
#ifndef HAVE_GAI_STRERROR
extern const char * gai_strerror(int errcode);
#endif /* HAVE_GAI_STRERROR */

#ifdef HAVE_IPV6
extern void promote_v4_to_v6_addr(struct sockaddr_storage * addr);
extern void promote_v4_to_v6_mask(struct sockaddr_storage * addr);
#endif

#define IS_AF_INET(fam) ((fam) == AF_INET)
#define IS_AF_UNIX(fam) ((fam) == AF_UNIX)

#endif /* IP_H */
Something went wrong with that request. Please try again.