1 /*-------------------------------------------------------------------------
4 * POSTGRES LIBPQ buffer structure definitions.
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
12 *-------------------------------------------------------------------------
17 #include <sys/types.h>
18 #include <netinet/in.h>
20 #include "lib/stringinfo.h"
21 #include "libpq/libpq-be.h"
25 * Information (pointer to array of this structure) required
26 * for the PQfn() call. (This probably ought to go somewhere else...)
35 int *ptr
; /* can't use void (dec compiler barfs) */
45 * prototypes for functions in pqcomm.c
47 extern int StreamServerPort(int family
, char *hostName
,
48 unsigned short portNumber
, char *unixSocketName
, int ListenSocket
[],
50 extern int StreamConnection(int server_fd
, Port
*port
);
51 extern void StreamClose(int sock
);
52 extern void TouchSocketFile(void);
53 extern void pq_init(void);
54 extern void pq_comm_reset(void);
55 extern int pq_getbytes(char *s
, size_t len
);
56 extern int pq_getstring(StringInfo s
);
57 extern int pq_getmessage(StringInfo s
, int maxlen
);
58 extern int pq_getbyte(void);
59 extern int pq_peekbyte(void);
60 extern int pq_putbytes(const char *s
, size_t len
);
61 extern int pq_flush(void);
62 extern int pq_putmessage(char msgtype
, const char *s
, size_t len
);
63 extern void pq_startcopyout(void);
64 extern void pq_endcopyout(bool errorAbort
);
67 * prototypes for functions in be-secure.c
69 extern int secure_initialize(void);
70 extern bool secure_loaded_verify_locations(void);
71 extern void secure_destroy(void);
72 extern int secure_open_server(Port
*port
);
73 extern void secure_close(Port
*port
);
74 extern ssize_t
secure_read(Port
*port
, void *ptr
, size_t len
);
75 extern ssize_t
secure_write(Port
*port
, void *ptr
, size_t len
);