Apache2
apr_buckets.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
21 #ifndef APR_BUCKETS_H
22 #define APR_BUCKETS_H
23 
24 #if defined(APR_BUCKET_DEBUG) && !defined(APR_RING_DEBUG)
25 #define APR_RING_DEBUG
26 #endif
27 
28 #include "apu.h"
29 #include "apr_network_io.h"
30 #include "apr_file_io.h"
31 #include "apr_general.h"
32 #include "apr_mmap.h"
33 #include "apr_errno.h"
34 #include "apr_ring.h"
35 #include "apr.h"
36 #if APR_HAVE_SYS_UIO_H
37 #include <sys/uio.h> /* for struct iovec */
38 #endif
39 #if APR_HAVE_STDARG_H
40 #include <stdarg.h>
41 #endif
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
54 #define APR_BUCKET_BUFF_SIZE 8000
55 
59 #define APR_BUCKETS_STRING -1
60 
62 typedef enum {
66 
119 /*
120  * Forward declaration of the main types.
121  */
122 
126 typedef struct apr_bucket apr_bucket;
129 
131 typedef struct apr_bucket_type_t apr_bucket_type_t;
132 
140  const char *name;
145  int num_func;
156  enum {
169  void (*destroy)(void *data);
170 
181  apr_status_t (*read)(apr_bucket *b, const char **str, apr_size_t *len,
182  apr_read_type_e block);
183 
198 
209 
217 
218 };
219 
229 struct apr_bucket {
249  void *data;
257  void (*free)(void *e);
260 };
261 
271  /*
272  * The apr_bucket_list structure doesn't actually need a name tag
273  * because it has no existence independent of struct apr_bucket_brigade;
274  * the ring macros are designed so that you can leave the name tag
275  * argument empty in this situation but apparently the Windows compiler
276  * doesn't like that.
277  */
278  APR_RING_HEAD(apr_bucket_list, apr_bucket) list;
281 };
282 
283 
288 
289 /*
290  * define APR_BUCKET_DEBUG if you want your brigades to be checked for
291  * validity at every possible instant. this will slow your code down
292  * substantially but is a very useful debugging tool.
293  */
294 #ifdef APR_BUCKET_DEBUG
295 
296 #define APR_BRIGADE_CHECK_CONSISTENCY(b) do { \
297  APR_RING_CHECK_CONSISTENCY(&(b)->list, apr_bucket, link); \
298  assert(b->p != NULL); \
299  assert(b->bucket_alloc != NULL); \
300 } while (0)
301 
302 #define APR_BUCKET_CHECK_CONSISTENCY(e) \
303  APR_RING_CHECK_ELEM_CONSISTENCY((e), apr_bucket, link)
304 
305 #else
312 #define APR_BRIGADE_CHECK_CONSISTENCY(b)
319 #define APR_BUCKET_CHECK_CONSISTENCY(e)
320 #endif
321 
322 
339 #define APR_BRIGADE_SENTINEL(b) APR_RING_SENTINEL(&(b)->list, apr_bucket, link)
340 
346 #define APR_BRIGADE_EMPTY(b) APR_RING_EMPTY(&(b)->list, apr_bucket, link)
347 
353 #define APR_BRIGADE_FIRST(b) APR_RING_FIRST(&(b)->list)
359 #define APR_BRIGADE_LAST(b) APR_RING_LAST(&(b)->list)
360 
366 #define APR_BRIGADE_INSERT_HEAD(b, e) do { \
367  apr_bucket *ap__b = (e); \
368  APR_RING_INSERT_HEAD(&(b)->list, ap__b, apr_bucket, link); \
369  APR_BRIGADE_CHECK_CONSISTENCY((b)); \
370  } while (0)
371 
377 #define APR_BRIGADE_INSERT_TAIL(b, e) do { \
378  apr_bucket *ap__b = (e); \
379  APR_RING_INSERT_TAIL(&(b)->list, ap__b, apr_bucket, link); \
380  APR_BRIGADE_CHECK_CONSISTENCY((b)); \
381  } while (0)
382 
388 #define APR_BRIGADE_CONCAT(a, b) do { \
389  APR_RING_CONCAT(&(a)->list, &(b)->list, apr_bucket, link); \
390  APR_BRIGADE_CHECK_CONSISTENCY((a)); \
391  } while (0)
392 
398 #define APR_BRIGADE_PREPEND(a, b) do { \
399  APR_RING_PREPEND(&(a)->list, &(b)->list, apr_bucket, link); \
400  APR_BRIGADE_CHECK_CONSISTENCY((a)); \
401  } while (0)
402 
408 #define APR_BUCKET_INSERT_BEFORE(a, b) do { \
409  apr_bucket *ap__a = (a), *ap__b = (b); \
410  APR_RING_INSERT_BEFORE(ap__a, ap__b, link); \
411  APR_BUCKET_CHECK_CONSISTENCY(ap__a); \
412  } while (0)
413 
419 #define APR_BUCKET_INSERT_AFTER(a, b) do { \
420  apr_bucket *ap__a = (a), *ap__b = (b); \
421  APR_RING_INSERT_AFTER(ap__a, ap__b, link); \
422  APR_BUCKET_CHECK_CONSISTENCY(ap__a); \
423  } while (0)
424 
430 #define APR_BUCKET_NEXT(e) APR_RING_NEXT((e), link)
436 #define APR_BUCKET_PREV(e) APR_RING_PREV((e), link)
437 
442 #define APR_BUCKET_REMOVE(e) APR_RING_REMOVE((e), link)
443 
448 #define APR_BUCKET_INIT(e) APR_RING_ELEM_INIT((e), link)
449 
456 #define APR_BUCKET_IS_METADATA(e) ((e)->type->is_metadata)
457 
463 #define APR_BUCKET_IS_FLUSH(e) ((e)->type == &apr_bucket_type_flush)
469 #define APR_BUCKET_IS_EOS(e) ((e)->type == &apr_bucket_type_eos)
475 #define APR_BUCKET_IS_FILE(e) ((e)->type == &apr_bucket_type_file)
481 #define APR_BUCKET_IS_PIPE(e) ((e)->type == &apr_bucket_type_pipe)
487 #define APR_BUCKET_IS_SOCKET(e) ((e)->type == &apr_bucket_type_socket)
493 #define APR_BUCKET_IS_HEAP(e) ((e)->type == &apr_bucket_type_heap)
499 #define APR_BUCKET_IS_TRANSIENT(e) ((e)->type == &apr_bucket_type_transient)
505 #define APR_BUCKET_IS_IMMORTAL(e) ((e)->type == &apr_bucket_type_immortal)
506 #if APR_HAS_MMAP
512 #define APR_BUCKET_IS_MMAP(e) ((e)->type == &apr_bucket_type_mmap)
513 #endif
519 #define APR_BUCKET_IS_POOL(e) ((e)->type == &apr_bucket_type_pool)
520 
521 /*
522  * General-purpose reference counting for the various bucket types.
523  *
524  * Any bucket type that keeps track of the resources it uses (i.e.
525  * most of them except for IMMORTAL, TRANSIENT, and EOS) needs to
526  * attach a reference count to the resource so that it can be freed
527  * when the last bucket that uses it goes away. Resource-sharing may
528  * occur because of bucket splits or buckets that refer to globally
529  * cached data. */
530 
541  int refcount;
542 };
543 
544 /* ***** Reference-counted bucket types ***** */
545 
547 typedef struct apr_bucket_heap apr_bucket_heap;
557  char *base;
561  void (*free_func)(void *data);
562 };
563 
565 typedef struct apr_bucket_pool apr_bucket_pool;
587  const char *base;
599 };
600 
601 #if APR_HAS_MMAP
603 typedef struct apr_bucket_mmap apr_bucket_mmap;
612 };
613 #endif
614 
616 typedef struct apr_bucket_file apr_bucket_file;
628 #if APR_HAS_MMAP
631  int can_mmap;
632 #endif /* APR_HAS_MMAP */
635 };
636 
647 #if APR_HAS_MMAP
649 #endif
651 };
652 
658 #define APR_BUCKET_ALLOC_SIZE APR_ALIGN_DEFAULT(2*sizeof(apr_bucket_structs))
659 
660 /* ***** Bucket Brigade Functions ***** */
669  apr_bucket_alloc_t *list)
670  __attribute__((nonnull(1,2)));
671 
678  __attribute__((nonnull(1)));
679 
692  __attribute__((nonnull(1)));
693 
710  apr_bucket *e,
712  __attribute__((nonnull(1,2)));
713 
726  apr_bucket *e)
727  __attribute__((nonnull(1,2)));
728 
742  apr_off_t point,
743  apr_bucket **after_point)
744  __attribute__((nonnull(1,3)));
745 
755  int read_all,
756  apr_off_t *length)
757  __attribute__((nonnull(1,3)));
758 
767  char *c,
768  apr_size_t *len)
769  __attribute__((nonnull(1,2,3)));
770 
779  char **c,
780  apr_size_t *len,
781  apr_pool_t *pool)
782  __attribute__((nonnull(1,2,3,4)));
783 
793  apr_bucket_brigade *bbIn,
794  apr_read_type_e block,
795  apr_off_t maxbytes)
796  __attribute__((nonnull(1,2)));
797 
823  apr_bucket_brigade *bbIn,
824  apr_read_type_e block,
825  const char *boundary,
826  apr_size_t boundary_len,
827  apr_off_t maxbytes)
828  __attribute__((nonnull(1,2)));
829 
840  struct iovec *vec, int *nvec)
841  __attribute__((nonnull(1,2,3)));
842 
852  apr_brigade_flush flush,
853  void *ctx,
854  va_list va)
855  __attribute__((nonnull(1)));
856 
881  apr_brigade_flush flush, void *ctx,
882  const char *str, apr_size_t nbyte)
883  __attribute__((nonnull(1,4)));
884 
895  apr_brigade_flush flush,
896  void *ctx,
897  const struct iovec *vec,
898  apr_size_t nvec)
899  __attribute__((nonnull(1,4)));
900 
910  apr_brigade_flush flush, void *ctx,
911  const char *str)
912  __attribute__((nonnull(1,4)));
913 
923  apr_brigade_flush flush, void *ctx,
924  const char c)
925  __attribute__((nonnull(1)));
926 
936  apr_brigade_flush flush,
937  void *ctx, ...)
938 #if defined(__GNUC__) && __GNUC__ >= 4
939  __attribute__((sentinel))
940 #endif
941  __attribute__((nonnull(1)))
942  ;
943 
955  apr_brigade_flush flush,
956  void *ctx,
957  const char *fmt, ...)
958  __attribute__((format(printf,4,5)))
959  __attribute__((nonnull(1)));
960 
972  apr_brigade_flush flush,
973  void *ctx,
974  const char *fmt, va_list va)
975  __attribute__((nonnull(1,4)));
976 
990  apr_file_t *f,
991  apr_off_t start,
992  apr_off_t len,
993  apr_pool_t *p)
994  __attribute__((nonnull(1,2,5)));
995 
996 
997 
998 /* ***** Bucket freelist functions ***** */
1013 
1023  apr_allocator_t *allocator)
1024  __attribute__((nonnull(1)));
1025 
1031  __attribute__((nonnull(1)));
1032 
1042  apr_size_t size)
1043  __attribute__((nonnull(1)));
1044 
1051  apr_bucket_alloc_t *list)
1052  __attribute__((nonnull(2)));
1053 
1059  __attribute__((nonnull(1)));
1060 
1061 
1062 /* ***** Bucket Functions ***** */
1069 #define apr_bucket_destroy(e) do { \
1070  apr_bucket *apr__d = (e); \
1071  apr__d->type->destroy(apr__d->data); \
1072  apr__d->free(apr__d); \
1073  } while (0)
1074 
1086 #define apr_bucket_delete(e) do { \
1087  apr_bucket *apr__b = (e); \
1088  APR_BUCKET_REMOVE(apr__b); \
1089  apr_bucket_destroy(apr__b); \
1090  } while (0)
1091 
1159 #define apr_bucket_read(e,str,len,block) (e)->type->read(e, str, len, block)
1160 
1167 #define apr_bucket_setaside(e,p) (e)->type->setaside(e,p)
1168 
1179 #define apr_bucket_split(e,point) (e)->type->split(e, point)
1180 
1186 #define apr_bucket_copy(e,c) (e)->type->copy(e, c)
1187 
1188 /* Bucket type handling */
1189 
1200  apr_pool_t *pool);
1201 
1210  apr_pool_t *pool);
1211 
1220  apr_size_t point);
1221 
1230  apr_bucket **c);
1231 
1242 
1249 /* There is no apr_bucket_read_notimpl, because it is a required function
1250  */
1251 
1252 
1253 /* All of the bucket types implemented by the core */
1274 #if APR_HAS_MMAP
1279 #endif
1306 
1307 
1308 /* ***** Simple buckets ***** */
1309 
1322  apr_size_t point);
1323 
1335  apr_bucket **b);
1336 
1337 
1338 /* ***** Shared, reference-counted buckets ***** */
1339 
1355  apr_off_t start,
1356  apr_size_t length);
1357 
1367 
1380  apr_size_t point);
1381 
1392  apr_bucket **b);
1393 
1394 
1395 /* ***** Functions to Create Buckets of varying types ***** */
1396 /*
1397  * Each bucket type foo has two initialization functions:
1398  * apr_bucket_foo_make which sets up some already-allocated memory as a
1399  * bucket of type foo; and apr_bucket_foo_create which allocates memory
1400  * for the bucket, calls apr_bucket_make_foo, and initializes the
1401  * bucket's list pointers. The apr_bucket_foo_make functions are used
1402  * inside the bucket code to change the type of buckets in place;
1403  * other code should call apr_bucket_foo_create. All the initialization
1404  * functions change nothing if they fail.
1405  */
1406 
1414 
1423  __attribute__((nonnull(1)));
1424 
1433  __attribute__((nonnull(1)));
1434 
1443  __attribute__((nonnull(1)));
1444 
1453  apr_size_t nbyte,
1454  apr_bucket_alloc_t *list)
1455  __attribute__((nonnull(1,3)));
1456 
1465  const char *buf,
1466  apr_size_t nbyte)
1467  __attribute__((nonnull(1,2)));
1468 
1477  apr_size_t nbyte,
1478  apr_bucket_alloc_t *list)
1479  __attribute__((nonnull(1,3)));
1480 
1489  const char *buf,
1490  apr_size_t nbyte)
1491  __attribute__((nonnull(1,2)));
1492 
1508  apr_size_t nbyte,
1509  void (*free_func)(void *data),
1510  apr_bucket_alloc_t *list)
1511  __attribute__((nonnull(1,4)));
1522  apr_size_t nbyte,
1523  void (*free_func)(void *data))
1524  __attribute__((nonnull(1,2)));
1525 
1536  apr_size_t length,
1537  apr_pool_t *pool,
1538  apr_bucket_alloc_t *list)
1539  __attribute__((nonnull(1,3,4)));
1540 
1550  apr_size_t length,
1551  apr_pool_t *pool)
1552  __attribute__((nonnull(1,2,4)));
1553 
1554 #if APR_HAS_MMAP
1565  apr_off_t start,
1566  apr_size_t length,
1567  apr_bucket_alloc_t *list)
1568  __attribute__((nonnull(1,4)));
1569 
1580  apr_off_t start,
1581  apr_size_t length)
1582  __attribute__((nonnull(1,2)));
1583 #endif
1584 
1592  apr_bucket_alloc_t *list)
1593  __attribute__((nonnull(1,2)));
1601  apr_socket_t *thissock)
1602  __attribute__((nonnull(1,2)));
1603 
1611  apr_bucket_alloc_t *list)
1612  __attribute__((nonnull(1,2)));
1613 
1621  apr_file_t *thispipe)
1622  __attribute__((nonnull(1,2)));
1623 
1641  apr_off_t offset,
1642  apr_size_t len,
1643  apr_pool_t *p,
1644  apr_bucket_alloc_t *list)
1645  __attribute__((nonnull(1,4,5)));
1646 
1658  apr_off_t offset,
1659  apr_size_t len, apr_pool_t *p)
1660  __attribute__((nonnull(1,2,5)));
1661 
1669  int enabled)
1670  __attribute__((nonnull(1)));
1671 
1683  apr_size_t size);
1684 
1686 #ifdef __cplusplus
1687 }
1688 #endif
1689 
1690 #endif /* !APR_BUCKETS_H */
APR Platform Definitions.
APR Error Codes.
APR File I/O Handling.
APR Miscellaneous library routines.
APR MMAP routines.
APR Network library.
APR Rings.
void apr_bucket_destroy_noop(void *data)
apr_bucket_alloc_t * apr_bucket_alloc_create_ex(apr_allocator_t *allocator) __attribute__((nonnull(1)))
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_brigade_split_boundary(apr_bucket_brigade *bbOut, apr_bucket_brigade *bbIn, apr_read_type_e block, const char *boundary, apr_size_t boundary_len, apr_off_t maxbytes) __attribute__((nonnull(1
apr_status_t apr_bucket_simple_copy(apr_bucket *a, apr_bucket **b)
apr_status_t apr_bucket * apr_brigade_insert_file(apr_bucket_brigade *bb, apr_file_t *f, apr_off_t start, apr_off_t len, apr_pool_t *p) __attribute__((nonnull(1
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_pool_create(const char *buf, apr_size_t length, apr_pool_t *pool, apr_bucket_alloc_t *list) __attribute__((nonnull(1
apr_size_t apr_bucket_alloc_aligned_floor(apr_bucket_alloc_t *list, apr_size_t size) __attribute__((nonnull(1)))
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_status_t apr_bucket_file_enable_mmap(apr_bucket *b, int enabled) __attribute__((nonnull(1)))
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_file_make(apr_bucket *b, apr_file_t *fd, apr_off_t offset, apr_size_t len, apr_pool_t *p) __attribute__((nonnull(1
void apr_bucket_alloc_destroy(apr_bucket_alloc_t *list) __attribute__((nonnull(1)))
apr_status_t apr_bucket apr_bucket_alloc_t * apr_bucket_alloc_create(apr_pool_t *p)
apr_status_t apr_bucket_shared_copy(apr_bucket *a, apr_bucket **b)
apr_status_t apr_bucket_split_notimpl(apr_bucket *data, apr_size_t point)
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_socket_create(apr_socket_t *thissock, apr_bucket_alloc_t *list) __attribute__((nonnull(1
int apr_bucket_shared_destroy(void *data)
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pipe
apr_bucket * apr_bucket_shared_make(apr_bucket *b, void *data, apr_off_t start, apr_size_t length)
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_pipe_make(apr_bucket *b, apr_file_t *thispipe) __attribute__((nonnull(1
apr_bucket * apr_bucket_flush_create(apr_bucket_alloc_t *list) __attribute__((nonnull(1)))
apr_status_t apr_brigade_printf(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char *fmt,...) __attribute__((format(printf
apr_status_t apr_bucket_copy_notimpl(apr_bucket *e, apr_bucket **c)
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_brigade_vputstrs(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, va_list va) __attribute__((nonnull(1)))
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_file
apr_status_t apr_brigade_write(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char *str, apr_size_t nbyte) __attribute__((nonnull(1
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_mmap_make(apr_bucket *b, apr_mmap_t *mm, apr_off_t start, apr_size_t length) __attribute__((nonnull(1
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_heap
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_heap_create(const char *buf, apr_size_t nbyte, void(*free_func)(void *data), apr_bucket_alloc_t *list) __attribute__((nonnull(1
apr_read_type_e
Definition: apr_buckets.h:62
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_brigade_partition(apr_bucket_brigade *b, apr_off_t point, apr_bucket **after_point) __attribute__((nonnull(1
apr_bucket_brigade * apr_brigade_split_ex(apr_bucket_brigade *b, apr_bucket *e, apr_bucket_brigade *a) __attribute__((nonnull(1
apr_bucket_brigade apr_status_t apr_brigade_destroy(apr_bucket_brigade *b) __attribute__((nonnull(1)))
apr_status_t apr_status_t apr_brigade_writev(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const struct iovec *vec, apr_size_t nvec) __attribute__((nonnull(1
apr_status_t apr_status_t apr_status_t apr_brigade_puts(apr_bucket_brigade *bb, apr_brigade_flush flush, void *ctx, const char *str) __attribute__((nonnull(1
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_pool
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_eos
apr_status_t apr_bucket_shared_split(apr_bucket *b, apr_size_t point)
apr_bucket * apr_bucket_immortal_create(const char *buf, apr_size_t nbyte, apr_bucket_alloc_t *list) __attribute__((nonnull(1
void apr_bucket_free(void *block) __attribute__((nonnull(1)))
apr_bucket * apr_bucket_flush_make(apr_bucket *b) __attribute__((nonnull(1)))
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_file_create(apr_file_t *fd, apr_off_t offset, apr_size_t len, apr_pool_t *p, apr_bucket_alloc_t *list) __attribute__((nonnull(1
void * apr_bucket_alloc(apr_size_t size, apr_bucket_alloc_t *list) __attribute__((nonnull(2)))
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_status_t apr_brigade_flatten(apr_bucket_brigade *bb, char *c, apr_size_t *len) __attribute__((nonnull(1
struct apr_bucket_alloc_t apr_bucket_alloc_t
Definition: apr_buckets.h:128
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_pool_make(apr_bucket *b, const char *buf, apr_size_t length, apr_pool_t *pool) __attribute__((nonnull(1
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_socket_make(apr_bucket *b, apr_socket_t *thissock) __attribute__((nonnull(1
apr_status_t apr_status_t apr_status_t apr_status_t apr_brigade_putc(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char c) __attribute__((nonnull(1)))
apr_status_t apr_bucket_simple_split(apr_bucket *b, apr_size_t point)
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_flush
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_brigade_length(apr_bucket_brigade *bb, int read_all, apr_off_t *length) __attribute__((nonnull(1
apr_status_t apr_bucket_file_set_buf_size(apr_bucket *b, apr_size_t size)
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_mmap
apr_bucket * apr_bucket_eos_create(apr_bucket_alloc_t *list)
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_brigade_split_line(apr_bucket_brigade *bbOut, apr_bucket_brigade *bbIn, apr_read_type_e block, apr_off_t maxbytes) __attribute__((nonnull(1
apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_transient_make(apr_bucket *b, const char *buf, apr_size_t nbyte) __attribute__((nonnull(1
apr_status_t apr_brigade_putstrs(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx,...) __attribute__((nonnull(1)))
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_heap_make(apr_bucket *b, const char *buf, apr_size_t nbyte, void(*free_func)(void *data)) __attribute__((nonnull(1
apr_status_t apr_brigade_vprintf(apr_bucket_brigade *b, apr_brigade_flush flush, void *ctx, const char *fmt, va_list va) __attribute__((nonnull(1
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_mmap_create(apr_mmap_t *mm, apr_off_t start, apr_size_t length, apr_bucket_alloc_t *list) __attribute__((nonnull(1
apr_bucket * apr_bucket_eos_make(apr_bucket *b) __attribute__((nonnull(1)))
apr_bucket_brigade * apr_brigade_create(apr_pool_t *p, apr_bucket_alloc_t *list) __attribute__((nonnull(1
apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket apr_bucket * apr_bucket_pipe_create(apr_file_t *thispipe, apr_bucket_alloc_t *list) __attribute__((nonnull(1
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_socket
apr_status_t __attribute__((nonnull(1)))
apr_bucket apr_bucket * apr_bucket_immortal_make(apr_bucket *b, const char *buf, apr_size_t nbyte) __attribute__((nonnull(1
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_transient
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_status_t apr_brigade_to_iovec(apr_bucket_brigade *b, struct iovec *vec, int *nvec) __attribute__((nonnull(1
apr_status_t apr_bucket_setaside_notimpl(apr_bucket *data, apr_pool_t *pool)
apr_bucket_brigade apr_bucket_brigade apr_status_t apr_status_t apr_status_t apr_status_t apr_brigade_pflatten(apr_bucket_brigade *bb, char **c, apr_size_t *len, apr_pool_t *pool) __attribute__((nonnull(1
apr_bucket_brigade apr_bucket_brigade * apr_brigade_split(apr_bucket_brigade *b, apr_bucket *e) __attribute__((nonnull(1
APR_DECLARE_DATA const apr_bucket_type_t apr_bucket_type_immortal
apr_status_t apr_bucket_setaside_noop(apr_bucket *data, apr_pool_t *pool)
apr_status_t apr_brigade_cleanup(void *data) __attribute__((nonnull(1)))
apr_status_t(* apr_brigade_flush)(apr_bucket_brigade *bb, void *ctx)
Definition: apr_buckets.h:287
apr_bucket apr_bucket apr_bucket * apr_bucket_transient_create(const char *buf, apr_size_t nbyte, apr_bucket_alloc_t *list) __attribute__((nonnull(1
@ APR_BLOCK_READ
Definition: apr_buckets.h:63
@ APR_NONBLOCK_READ
Definition: apr_buckets.h:64
dav_buffer apr_size_t size
Definition: mod_dav.h:461
dav_buffer const char * str
Definition: mod_dav.h:465
apr_bucket_brigade * bb
Definition: mod_dav.h:555
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:557
struct apr_allocator_t apr_allocator_t
Definition: apr_allocator.h:41
int apr_status_t
Definition: apr_errno.h:44
off_t apr_off_t
Definition: apr.h:396
size_t apr_size_t
Definition: apr.h:394
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
#define APR_DECLARE_DATA
Definition: macros.h:17
#define APR_DECLARE(x)
Definition: macros.h:6
#define APR_DECLARE_NONSTD(x)
Definition: macros.h:7
Definition: apr_buckets.h:263
APR_RING_HEAD(apr_bucket_list, apr_bucket) list
apr_pool_t * p
Definition: apr_buckets.h:269
apr_bucket_alloc_t * bucket_alloc
Definition: apr_buckets.h:280
Definition: apr_buckets.h:620
apr_pool_t * readpool
Definition: apr_buckets.h:627
int can_mmap
Definition: apr_buckets.h:631
apr_size_t read_size
Definition: apr_buckets.h:634
apr_file_t * fd
Definition: apr_buckets.h:624
apr_bucket_refcount refcount
Definition: apr_buckets.h:622
Definition: apr_buckets.h:551
apr_bucket_refcount refcount
Definition: apr_buckets.h:553
char * base
Definition: apr_buckets.h:557
void(* free_func)(void *data)
Definition: apr_buckets.h:561
apr_size_t alloc_len
Definition: apr_buckets.h:559
Definition: apr_buckets.h:607
apr_mmap_t * mmap
Definition: apr_buckets.h:611
apr_bucket_refcount refcount
Definition: apr_buckets.h:609
Definition: apr_buckets.h:569
apr_bucket_heap heap
Definition: apr_buckets.h:581
apr_bucket_alloc_t * list
Definition: apr_buckets.h:598
const char * base
Definition: apr_buckets.h:587
apr_pool_t * pool
Definition: apr_buckets.h:594
Definition: apr_buckets.h:539
int refcount
Definition: apr_buckets.h:541
Definition: apr_buckets.h:136
apr_status_t(* split)(apr_bucket *e, apr_size_t point)
Definition: apr_buckets.h:208
apr_status_t(* copy)(apr_bucket *e, apr_bucket **c)
Definition: apr_buckets.h:216
apr_status_t(* read)(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block)
Definition: apr_buckets.h:181
@ APR_BUCKET_DATA
Definition: apr_buckets.h:158
@ APR_BUCKET_METADATA
Definition: apr_buckets.h:160
const char * name
Definition: apr_buckets.h:140
int num_func
Definition: apr_buckets.h:145
apr_status_t(* setaside)(apr_bucket *e, apr_pool_t *pool)
Definition: apr_buckets.h:197
enum apr_bucket_type_t::@13 is_metadata
void(* destroy)(void *data)
Definition: apr_buckets.h:169
Definition: apr_buckets.h:229
apr_size_t length
Definition: apr_buckets.h:239
void(* free)(void *e)
Definition: apr_buckets.h:257
apr_off_t start
Definition: apr_buckets.h:247
apr_bucket_alloc_t * list
Definition: apr_buckets.h:259
void * data
Definition: apr_buckets.h:249
APR_RING_ENTRY(apr_bucket) link
const apr_bucket_type_t * type
Definition: apr_buckets.h:233
Definition: apr_arch_file_io.h:107
Definition: apr_mmap.h:62
Definition: apr_arch_networkio.h:37
apr_pool_t * p
Definition: apr_buckets.h:643
apr_bucket_heap heap
Definition: apr_buckets.h:645
apr_bucket_mmap mmap
Definition: apr_buckets.h:648
apr_bucket b
Definition: apr_buckets.h:644
apr_bucket_file file
Definition: apr_buckets.h:650
apr_bucket_pool pool
Definition: apr_buckets.h:646