diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-11-07 20:52:15 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-11-07 20:52:15 +0000 |
commit | c17fa36d3c5f819591707c49fccd991b737a89eb (patch) | |
tree | 12996edb7c4bbceee09e0069182aa9f4016dfef4 /src/include | |
parent | d3cf6f98c7eb36c54902e1445e1858d6ea777564 (diff) | |
download | postgresql-c17fa36d3c5f819591707c49fccd991b737a89eb.tar.gz postgresql-c17fa36d3c5f819591707c49fccd991b737a89eb.zip |
Add Unix domain socket support, from Goran Thyni, goran@bildbasen.se
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/libpq/pqcomm.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index 65892b8a818..399e3231b65 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.h,v 1.15 1997/09/12 22:26:13 momjian Exp $ + * $Id: pqcomm.h,v 1.16 1997/11/07 20:52:06 momjian Exp $ * * NOTES * Some of this should move to libpq.h @@ -19,6 +19,7 @@ #include <stdio.h> #include <sys/types.h> #include <netinet/in.h> +#include <sys/un.h> /* @@ -27,6 +28,10 @@ #define PATH_SIZE 64 #define ARGV_SIZE 64 +#define UNIXSOCK_PATH(sun,port) \ + sprintf(sun.sun_path,"/tmp/.s.PGSQL.%d",port) + sizeof(sun.sun_family) + 1; + + /* The various kinds of startup messages are for the various kinds of user authentication systems. In the beginning, there was only STARTUP_MSG and all connections were unauthenticated. Now, there are @@ -106,9 +111,10 @@ typedef struct Port int sock; /* file descriptor */ int mask; /* select mask */ int nBytes; /* nBytes read in so far */ - struct sockaddr_in laddr; /* local addr (us) */ - struct sockaddr_in raddr; /* remote addr (them) */ - + /* local addr (us) */ + union { struct sockaddr_in in; struct sockaddr_un un; } laddr; + /* remote addr (them) */ + union { struct sockaddr_in in; struct sockaddr_un un; } raddr; /* * PacketBufId id; *//* id of packet buf currently in use */ |