~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/libpq/ip.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * ip.h
 
4
 *        Definitions for IPv6-aware network access.
 
5
 *
 
6
 * Copyright (c) 2003-2005, PostgreSQL Global Development Group
 
7
 *
 
8
 * $PostgreSQL: pgsql/src/include/libpq/ip.h,v 1.14 2005-01-01 20:44:27 tgl Exp $
 
9
 *
 
10
 *-------------------------------------------------------------------------
 
11
 */
 
12
#ifndef IP_H
 
13
#define IP_H
 
14
 
 
15
#include "getaddrinfo.h"
 
16
#include "libpq/pqcomm.h"
 
17
 
 
18
 
 
19
extern int getaddrinfo_all(const char *hostname, const char *servname,
 
20
                                const struct addrinfo * hintp,
 
21
                                struct addrinfo ** result);
 
22
extern void freeaddrinfo_all(int hint_ai_family, struct addrinfo * ai);
 
23
 
 
24
extern int getnameinfo_all(const struct sockaddr_storage * addr, int salen,
 
25
                                char *node, int nodelen,
 
26
                                char *service, int servicelen,
 
27
                                int flags);
 
28
 
 
29
extern int rangeSockAddr(const struct sockaddr_storage * addr,
 
30
                          const struct sockaddr_storage * netaddr,
 
31
                          const struct sockaddr_storage * netmask);
 
32
 
 
33
extern int SockAddr_cidr_mask(struct sockaddr_storage * mask,
 
34
                                   char *numbits, int family);
 
35
 
 
36
#ifdef HAVE_IPV6
 
37
extern void promote_v4_to_v6_addr(struct sockaddr_storage * addr);
 
38
extern void promote_v4_to_v6_mask(struct sockaddr_storage * addr);
 
39
#endif
 
40
 
 
41
#ifdef  HAVE_UNIX_SOCKETS
 
42
#define IS_AF_UNIX(fam) ((fam) == AF_UNIX)
 
43
#else
 
44
#define IS_AF_UNIX(fam) (0)
 
45
#endif
 
46
 
 
47
#endif   /* IP_H */