PostgreSQL Source Code: src/include/libpq/pqcomm.h File Reference (original) (raw)

#include <[sys/socket.h](socket%5F8h%5Fsource.html)>
#include <[sys/un.h](un%5F8h%5Fsource.html)>
#include <[netdb.h](netdb%5F8h%5Fsource.html)>
#include <[netinet/in.h](in%5F8h%5Fsource.html)>
#include "[libpq/protocol.h](protocol%5F8h%5Fsource.html)"

Go to the source code of this file.

Data Structures
struct SockAddr
struct AddrInfo
struct CancelRequestPacket
Macros
#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_FULL(v) (PG_PROTOCOL_MAJOR(v) * 10000 + PG_PROTOCOL_MINOR(v))
#define PG_PROTOCOL(m, n) (((m) << 16) | (n))
#define PG_PROTOCOL_EARLIEST PG_PROTOCOL(3,0)
#define PG_PROTOCOL_LATEST PG_PROTOCOL(3,2)
#define MAX_STARTUP_PACKET_LENGTH 10000
#define CANCEL_REQUEST_CODE PG_PROTOCOL(1234,5678)
#define PG_ALPN_PROTOCOL "postgresql"
#define PG_ALPN_PROTOCOL_VECTOR { 10, 'p','o','s','t','g','r','e','s','q','l' }
#define NEGOTIATE_SSL_CODE PG_PROTOCOL(1234,5679)
#define NEGOTIATE_GSS_CODE PG_PROTOCOL(1234,5680)
Typedefs
typedef uint32 ProtocolVersion
typedef ProtocolVersion MsgType
typedef uint32 PacketLen
typedef uint32 AuthRequest
typedef struct CancelRequestPacket CancelRequestPacket

CANCEL_REQUEST_CODE

MAX_STARTUP_PACKET_LENGTH

#define MAX_STARTUP_PACKET_LENGTH 10000

NEGOTIATE_GSS_CODE

NEGOTIATE_SSL_CODE

PG_ALPN_PROTOCOL

#define PG_ALPN_PROTOCOL "postgresql"

PG_ALPN_PROTOCOL_VECTOR

#define PG_ALPN_PROTOCOL_VECTOR { 10, 'p','o','s','t','g','r','e','s','q','l' }

PG_PROTOCOL

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

PG_PROTOCOL_EARLIEST

PG_PROTOCOL_FULL

PG_PROTOCOL_LATEST

PG_PROTOCOL_MAJOR

| #define PG_PROTOCOL_MAJOR | ( | | v | ) | ((v) >> 16) | | --------------------------- | - | | - | - | ----------- |

PG_PROTOCOL_MINOR

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

UNIXSOCK_PATH

Value:

AssertMacro(*(sockdir) != '\0'), \

snprintf(path, sizeof(path), "%s/.s.PGSQL.%d", \

#define AssertMacro(condition)

static const char * sockdir

Definition at line 44 of file pqcomm.h.

UNIXSOCK_PATH_BUFLEN

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

AuthRequest

CancelRequestPacket

MsgType

PacketLen

ProtocolVersion

is_unixsock_path()

static bool is_unixsock_path ( const char * path) inlinestatic