30 #define PQ_SMALL_MESSAGE_LIMIT 10000
31 #define PQ_LARGE_MESSAGE_LIMIT (MaxAllocSize - 1)
35 void (*comm_reset) (void);
37 int (*flush_if_writable) (void);
38 bool (*is_send_pending) (void);
39 int (*putmessage) (
char msgtype,
const char *s,
size_t len);
40 void (*putmessage_noblock) (
char msgtype,
const char *s,
size_t len);
45 #define pq_comm_reset() (PqCommMethods->comm_reset())
46 #define pq_flush() (PqCommMethods->flush())
47 #define pq_flush_if_writable() (PqCommMethods->flush_if_writable())
48 #define pq_is_send_pending() (PqCommMethods->is_send_pending())
49 #define pq_putmessage(msgtype, s, len) \
50 (PqCommMethods->putmessage(msgtype, s, len))
51 #define pq_putmessage_noblock(msgtype, s, len) \
52 (PqCommMethods->putmessage_noblock(msgtype, s, len))
63 #define FeBeWaitSetSocketPos 0
64 #define FeBeWaitSetLatchPos 1
65 #define FeBeWaitSetNEvents 3
68 unsigned short portNumber,
const char *unixSocketDir,
118 extern PGDLLIMPORT bool ssl_loaded_verify_locations;
ssize_t secure_open_gssapi(Port *port)
PGDLLIMPORT char * ssl_ca_file
PGDLLIMPORT char * SSLCipherSuites
void secure_destroy(void)
bool check_ssl_key_file_permissions(const char *ssl_key_file, bool isServerStart)
PGDLLIMPORT char * ssl_dh_params_file
PGDLLIMPORT char * SSLECDHCurve
PGDLLIMPORT int ssl_max_protocol_version
PGDLLIMPORT char * ssl_library
int pq_getbyte_if_available(unsigned char *c)
ssize_t secure_raw_read(Port *port, void *ptr, size_t len)
PGDLLIMPORT WaitEventSet * FeBeWaitSet
int secure_initialize(bool isServerStart)
PGDLLIMPORT char * ssl_key_file
int pq_getmessage(StringInfo s, int maxlen)
int pq_getbytes(char *s, size_t len)
Port * pq_init(ClientSocket *client_sock)
ssize_t pq_buffer_remaining_data(void)
int run_ssl_passphrase_command(const char *prompt, bool is_server_start, char *buf, int size)
PGDLLIMPORT char * SSLCipherList
int ListenServerPort(int family, const char *hostName, unsigned short portNumber, const char *unixSocketDir, pgsocket ListenSockets[], int *NumListenSockets, int MaxListen)
ssize_t secure_write(Port *port, void *ptr, size_t len)
int secure_open_server(Port *port)
bool secure_loaded_verify_locations(void)
int AcceptConnection(pgsocket server_fd, ClientSocket *client_sock)
void TouchSocketFiles(void)
PGDLLIMPORT int ssl_min_protocol_version
void secure_close(Port *port)
ssize_t secure_read(Port *port, void *ptr, size_t len)
PGDLLIMPORT char * ssl_crl_dir
PGDLLIMPORT char * ssl_cert_file
const PGDLLIMPORT PQcommMethods * PqCommMethods
int pq_putmessage_v2(char msgtype, const char *s, size_t len)
PGDLLIMPORT char * ssl_crl_file
PGDLLIMPORT bool ssl_passphrase_command_supports_reload
ssize_t secure_raw_write(Port *port, const void *ptr, size_t len)
bool pq_is_reading_msg(void)
void RemoveSocketFiles(void)
bool pq_check_connection(void)
PGDLLIMPORT bool SSLPreferServerCiphers
void pq_startmsgread(void)
PGDLLIMPORT char * ssl_passphrase_command
static pgsocket * ListenSockets
static int NumListenSockets
static pg_noinline void Size size