PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pqcomm.h File Reference
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
Include dependency graph for pqcomm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sockaddr_storage
 
struct  SockAddr
 
struct  StartupPacket
 
struct  CancelRequestPacket
 

Macros

#define ss_family   ss_stuff.sa.sa_family
 
#define UNIXSOCK_PATH(path, port, sockdir)
 
#define UNIXSOCK_PATH_BUFLEN   sizeof(((struct sockaddr_un *) NULL)->sun_path)
 
#define PG_PROTOCOL_MAJOR(v)   ((v) >> 16)
 
#define PG_PROTOCOL_MINOR(v)   ((v) & 0x0000ffff)
 
#define PG_PROTOCOL(m, n)   (((m) << 16) | (n))
 
#define PG_PROTOCOL_EARLIEST   PG_PROTOCOL(2,0)
 
#define PG_PROTOCOL_LATEST   PG_PROTOCOL(3,0)
 
#define SM_DATABASE   64
 
#define SM_USER   32
 
#define SM_DATABASE_USER   (SM_DATABASE+SM_USER+1) /* +1 for @ */
 
#define SM_OPTIONS   64
 
#define SM_UNUSED   64
 
#define SM_TTY   64
 
#define MAX_STARTUP_PACKET_LENGTH   10000
 
#define AUTH_REQ_OK   0 /* User is authenticated */
 
#define AUTH_REQ_KRB4   1 /* Kerberos V4. Not supported any more. */
 
#define AUTH_REQ_KRB5   2 /* Kerberos V5. Not supported any more. */
 
#define AUTH_REQ_PASSWORD   3 /* Password */
 
#define AUTH_REQ_CRYPT   4 /* crypt password. Not supported any more. */
 
#define AUTH_REQ_MD5   5 /* md5 password */
 
#define AUTH_REQ_SCM_CREDS   6 /* transfer SCM credentials */
 
#define AUTH_REQ_GSS   7 /* GSSAPI without wrap() */
 
#define AUTH_REQ_GSS_CONT   8 /* Continue GSS exchanges */
 
#define AUTH_REQ_SSPI   9 /* SSPI negotiate without wrap() */
 
#define CANCEL_REQUEST_CODE   PG_PROTOCOL(1234,5678)
 
#define NEGOTIATE_SSL_CODE   PG_PROTOCOL(1234,5679)
 

Typedefs

typedef uint32 ProtocolVersion
 
typedef ProtocolVersion MsgType
 
typedef uint32 PacketLen
 
typedef struct StartupPacket StartupPacket
 
typedef uint32 AuthRequest
 
typedef struct CancelRequestPacket CancelRequestPacket
 

Variables

bool Db_user_namespace
 

Macro Definition Documentation

#define AUTH_REQ_CRYPT   4 /* crypt password. Not supported any more. */

Definition at line 169 of file pqcomm.h.

Referenced by pg_fe_sendauth().

#define AUTH_REQ_GSS   7 /* GSSAPI without wrap() */

Definition at line 172 of file pqcomm.h.

Referenced by ClientAuthentication(), and pg_fe_sendauth().

#define AUTH_REQ_GSS_CONT   8 /* Continue GSS exchanges */

Definition at line 173 of file pqcomm.h.

Referenced by pg_fe_sendauth(), and PQconnectPoll().

#define AUTH_REQ_KRB4   1 /* Kerberos V4. Not supported any more. */

Definition at line 166 of file pqcomm.h.

Referenced by pg_fe_sendauth().

#define AUTH_REQ_KRB5   2 /* Kerberos V5. Not supported any more. */

Definition at line 167 of file pqcomm.h.

Referenced by pg_fe_sendauth().

#define AUTH_REQ_MD5   5 /* md5 password */

Definition at line 170 of file pqcomm.h.

Referenced by CheckMD5Auth(), pg_fe_sendauth(), pg_password_sendauth(), and PQconnectPoll().

#define AUTH_REQ_OK   0 /* User is authenticated */

Definition at line 165 of file pqcomm.h.

Referenced by ClientAuthentication(), pg_fe_sendauth(), PQconnectPoll(), and sendAuthRequest().

#define AUTH_REQ_PASSWORD   3 /* Password */

Definition at line 168 of file pqcomm.h.

Referenced by CheckPasswordAuth(), CheckRADIUSAuth(), pg_fe_sendauth(), and pg_password_sendauth().

#define AUTH_REQ_SCM_CREDS   6 /* transfer SCM credentials */

Definition at line 171 of file pqcomm.h.

Referenced by pg_fe_sendauth().

#define AUTH_REQ_SSPI   9 /* SSPI negotiate without wrap() */

Definition at line 174 of file pqcomm.h.

Referenced by ClientAuthentication(), and pg_fe_sendauth().

#define CANCEL_REQUEST_CODE   PG_PROTOCOL(1234,5678)

Definition at line 187 of file pqcomm.h.

Referenced by internal_cancel(), and ProcessStartupPacket().

#define MAX_STARTUP_PACKET_LENGTH   10000

Definition at line 160 of file pqcomm.h.

Referenced by ProcessStartupPacket().

#define NEGOTIATE_SSL_CODE   PG_PROTOCOL(1234,5679)

Definition at line 202 of file pqcomm.h.

Referenced by PQconnectPoll(), and ProcessStartupPacket().

#define PG_PROTOCOL (   m,
 
)    (((m) << 16) | (n))

Definition at line 106 of file pqcomm.h.

Referenced by connectDBStart(), and PQconnectPoll().

#define PG_PROTOCOL_EARLIEST   PG_PROTOCOL(2,0)

Definition at line 110 of file pqcomm.h.

Referenced by ProcessStartupPacket().

#define PG_PROTOCOL_LATEST   PG_PROTOCOL(3,0)

Definition at line 111 of file pqcomm.h.

Referenced by pq_redirect_to_shm_mq(), and ProcessStartupPacket().

#define PG_PROTOCOL_MINOR (   v)    ((v) & 0x0000ffff)

Definition at line 105 of file pqcomm.h.

Referenced by ProcessStartupPacket().

#define SM_DATABASE   64

Definition at line 133 of file pqcomm.h.

Referenced by pqBuildStartupPacket2().

#define SM_DATABASE_USER   (SM_DATABASE+SM_USER+1) /* +1 for @ */

Definition at line 136 of file pqcomm.h.

#define SM_OPTIONS   64

Definition at line 137 of file pqcomm.h.

Referenced by pqBuildStartupPacket2().

#define SM_TTY   64

Definition at line 139 of file pqcomm.h.

Referenced by pqBuildStartupPacket2().

#define SM_UNUSED   64

Definition at line 138 of file pqcomm.h.

#define SM_USER   32

Definition at line 134 of file pqcomm.h.

Referenced by pqBuildStartupPacket2().

#define ss_family   ss_stuff.sa.sa_family

Definition at line 54 of file pqcomm.h.

#define UNIXSOCK_PATH (   path,
  port,
  sockdir 
)
Value:
snprintf(path, sizeof(path), "%s/.s.PGSQL.%d", \
((sockdir) && *(sockdir) != '\0') ? (sockdir) : \
(port))
static const char * sockdir
Definition: pg_regress.c:99
int snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3
static int port
Definition: pg_regress.c:87
#define DEFAULT_PGSOCKET_DIR

Definition at line 70 of file pqcomm.h.

Referenced by connectDBStart(), and StreamServerPort().

#define UNIXSOCK_PATH_BUFLEN   sizeof(((struct sockaddr_un *) NULL)->sun_path)

Definition at line 86 of file pqcomm.h.

Referenced by connectDBStart(), and StreamServerPort().

Typedef Documentation

Definition at line 176 of file pqcomm.h.

Definition at line 115 of file pqcomm.h.

Definition at line 124 of file pqcomm.h.

Definition at line 113 of file pqcomm.h.

Variable Documentation

bool Db_user_namespace

Definition at line 240 of file postmaster.c.

Referenced by CheckMD5Auth(), parse_hba_line(), and ProcessStartupPacket().