PostgreSQL Source Code: contrib/pgcrypto/mbuf.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32#ifndef __PX_MBUF_H

33#define __PX_MBUF_H

34

40

42{

43

44

45

46

48

49

50

51

52

56 void (*free) (void *priv);

57};

58

60{

61

62

63

64

66

67

68

69

70

73 void (*free) (void *priv);

74};

75

76

77

78

87

88

89

90

97

99

100

101

102

110

112

113#define GETBYTE(pf, dst) \

114 do { \

115 uint8 __b; \

116 int __res = pullf_read_fixed(pf, 1, &__b); \

117 if (__res < 0) \

118 return __res; \

119 (dst) = __b; \

120 } while (0)

121

122#endif

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)

MBuf * mbuf_create_from_data(uint8 *data, int len)

int mbuf_steal_data(MBuf *mbuf, uint8 **data_p)

MBuf * mbuf_create(int len)

void pushf_free_all(PushFilter *mp)

int pushf_flush(PushFilter *mp)

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)

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