Apache HTTPD
Public Attributes | List of all members
apr_bucket Struct Reference

#include <apr_buckets.h>

Public Attributes

struct { 
 
   struct apr_bucket *volatile   next 
 
   struct apr_bucket *volatile   prev 
 
link 
 
const apr_bucket_type_ttype
 
apr_size_t length
 
apr_off_t start
 
void * data
 
void(* free )(void *e)
 
apr_bucket_alloc_tlist
 

Detailed Description

apr_bucket structures are allocated on the malloc() heap and their lifetime is controlled by the parent apr_bucket_brigade structure. Buckets can move from one brigade to another e.g. by calling APR_BRIGADE_CONCAT(). In general the data in a bucket has the same lifetime as the bucket and is freed when the bucket is destroyed; if the data is shared by more than one bucket (e.g. after a split) the data is freed when the last bucket goes away.

Definition at line 224 of file apr_buckets.h.

Member Data Documentation

◆ data

void* apr_bucket::data

type-dependent data hangs off this pointer

Definition at line 244 of file apr_buckets.h.

◆ free

void(* apr_bucket::free) (void *e)

Pointer to function used to free the bucket. This function should always be defined and it should be consistent with the memory function used to allocate the bucket. For example, if malloc() is used to allocate the bucket, this pointer should point to free().

Parameters
ePointer to the bucket being freed

Definition at line 252 of file apr_buckets.h.

◆ length

apr_size_t apr_bucket::length

The length of the data in the bucket. This could have been implemented with a function, but this is an optimization, because the most common thing to do will be to get the length. If the length is unknown, the value of this field will be (apr_size_t)(-1).

Definition at line 234 of file apr_buckets.h.

◆ [struct]

struct { ... } apr_bucket::link

Links to the rest of the brigade

◆ list

apr_bucket_alloc_t* apr_bucket::list

The freelist from which this bucket was allocated

Definition at line 254 of file apr_buckets.h.

◆ next

struct apr_bucket* volatile apr_bucket::next

Definition at line 226 of file apr_buckets.h.

◆ prev

struct apr_bucket* volatile apr_bucket::prev

Definition at line 226 of file apr_buckets.h.

◆ start

apr_off_t apr_bucket::start

The start of the data in the bucket relative to the private base pointer. The vast majority of bucket types allow a fixed block of data to be referenced by multiple buckets, each bucket pointing to a different segment of the data. That segment starts at base+start and ends at base+start+length.
If the length == (apr_size_t)(-1), then start == -1.

Definition at line 242 of file apr_buckets.h.

◆ type

const apr_bucket_type_t* apr_bucket::type

The type of bucket.

Definition at line 228 of file apr_buckets.h.


The documentation for this struct was generated from the following file: