37 #define STEP (16*1024)
87 mbuf->
buf_end = newbuf + newlen;
118 mbuf =
palloc(
sizeof *mbuf);
135 mbuf =
palloc(
sizeof *mbuf);
169 *data_p = mbuf->
data;
197 if (op->
init != NULL)
199 res = op->
init(&priv, init_arg, src);
363 if (op->
init != NULL)
static void PGresult * res
MBuf * mbuf_create_from_data(uint8 *data, int len)
static int pull_from_mbuf(void *arg, PullFilter *src, int len, uint8 **data_p, uint8 *buf, int buflen)
int pullf_read_fixed(PullFilter *src, int len, uint8 *dst)
int pullf_create(PullFilter **pf_p, const PullFilterOps *op, void *init_arg, PullFilter *src)
int pushf_write(PushFilter *mp, const uint8 *data, int len)
int mbuf_avail(MBuf *mbuf)
int pushf_create(PushFilter **mp_p, const PushFilterOps *op, void *init_arg, PushFilter *next)
int pullf_read_max(PullFilter *pf, int len, uint8 **data_p, uint8 *tmpbuf)
int mbuf_free(MBuf *mbuf)
int pullf_create_mbuf_reader(PullFilter **mp_p, MBuf *src)
int mbuf_append(MBuf *dst, const uint8 *buf, int len)
int pullf_read(PullFilter *pf, int len, uint8 **data_p)
int pushf_create_mbuf_writer(PushFilter **res, MBuf *dst)
static void prepare_room(MBuf *mbuf, int block_len)
static const struct PullFilterOps mbuf_reader
int mbuf_steal_data(MBuf *mbuf, uint8 **data_p)
void pushf_free_all(PushFilter *mp)
int pushf_flush(PushFilter *mp)
static const struct PushFilterOps mbuf_filter
static int wrap_process(PushFilter *mp, const uint8 *data, int len)
static int push_into_mbuf(PushFilter *next, void *arg, const uint8 *data, int len)
int mbuf_size(MBuf *mbuf)
int mbuf_grab(MBuf *mbuf, int len, uint8 **data_p)
void pushf_free(PushFilter *mp)
void pullf_free(PullFilter *pf)
MBuf * mbuf_create(int len)
void pfree(void *pointer)
void * palloc0(Size size)
void * repalloc(void *pointer, Size size)
void px_debug(const char *fmt,...)
void px_memset(void *ptr, int c, size_t len)
#define PXE_PGP_CORRUPT_DATA
int(* init)(void **priv_p, void *init_arg, PullFilter *src)
int(* pull)(void *priv, PullFilter *src, int len, uint8 **data_p, uint8 *buf, int buflen)
int(* flush)(PushFilter *next, void *priv)
int(* init)(PushFilter *next, void *init_arg, void **priv_p)
int(* push)(PushFilter *next, void *priv, const uint8 *src, int len)
static StringInfoData tmpbuf