亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? apr_buckets.h

?? Apache_2.0.59-Openssl_0.9 配置tomcat. Apache_2.0.59-Openssl_0.9 配置tomcat.
?? H
?? 第 1 頁 / 共 4 頁
字號:
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
 * applicable.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * @file apr_buckets.h
 * @brief APR-UTIL Buckets/Bucket Brigades
 */

#ifndef APR_BUCKETS_H
#define APR_BUCKETS_H

#if defined(APR_BUCKET_DEBUG) && !defined(APR_RING_DEBUG)
#define APR_RING_DEBUG
#endif

#include "apu.h"
#include "apr_network_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_mmap.h"
#include "apr_errno.h"
#include "apr_ring.h"
#include "apr.h"
#if APR_HAVE_SYS_UIO_H
#include <sys/uio.h>	/* for struct iovec */
#endif
#if APR_HAVE_STDARG_H
#include <stdarg.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup APR_Util_Bucket_Brigades Bucket Brigades
 * @ingroup APR_Util
 * @{ 
 */

/** default bucket buffer size - 8KB minus room for memory allocator headers */
#define APR_BUCKET_BUFF_SIZE 8000

/** Determines how a bucket or brigade should be read */
typedef enum {
    APR_BLOCK_READ,   /**< block until data becomes available */
    APR_NONBLOCK_READ /**< return immediately if no data is available */
} apr_read_type_e;

/**
 * The one-sentence buzzword-laden overview: Bucket brigades represent
 * a complex data stream that can be passed through a layered IO
 * system without unnecessary copying. A longer overview follows...
 *
 * A bucket brigade is a doubly linked list (ring) of buckets, so we
 * aren't limited to inserting at the front and removing at the end.
 * Buckets are only passed around as members of a brigade, although
 * singleton buckets can occur for short periods of time.
 *
 * Buckets are data stores of various types. They can refer to data in
 * memory, or part of a file or mmap area, or the output of a process,
 * etc. Buckets also have some type-dependent accessor functions:
 * read, split, copy, setaside, and destroy.
 *
 * read returns the address and size of the data in the bucket. If the
 * data isn't in memory then it is read in and the bucket changes type
 * so that it can refer to the new location of the data. If all the
 * data doesn't fit in the bucket then a new bucket is inserted into
 * the brigade to hold the rest of it.
 *
 * split divides the data in a bucket into two regions. After a split
 * the original bucket refers to the first part of the data and a new
 * bucket inserted into the brigade after the original bucket refers
 * to the second part of the data. Reference counts are maintained as
 * necessary.
 *
 * setaside ensures that the data in the bucket has a long enough
 * lifetime. Sometimes it is convenient to create a bucket referring
 * to data on the stack in the expectation that it will be consumed
 * (output to the network) before the stack is unwound. If that
 * expectation turns out not to be valid, the setaside function is
 * called to move the data somewhere safer.
 *
 * copy makes a duplicate of the bucket structure as long as it's
 * possible to have multiple references to a single copy of the
 * data itself.  Not all bucket types can be copied.
 *
 * destroy maintains the reference counts on the resources used by a
 * bucket and frees them if necessary.
 *
 * Note: all of the above functions have wrapper macros (apr_bucket_read(),
 * apr_bucket_destroy(), etc), and those macros should be used rather
 * than using the function pointers directly.
 *
 * To write a bucket brigade, they are first made into an iovec, so that we
 * don't write too little data at one time.  Currently we ignore compacting the
 * buckets into as few buckets as possible, but if we really want good
 * performance, then we need to compact the buckets before we convert to an
 * iovec, or possibly while we are converting to an iovec.
 */

/*
 * Forward declaration of the main types.
 */

/** @see apr_bucket_brigade */
typedef struct apr_bucket_brigade apr_bucket_brigade;
/** @see apr_bucket */
typedef struct apr_bucket apr_bucket;
/** @see apr_bucket_alloc_t */
typedef struct apr_bucket_alloc_t apr_bucket_alloc_t;

/** @see apr_bucket_type_t */
typedef struct apr_bucket_type_t apr_bucket_type_t;

/**
 * Basic bucket type
 */
struct apr_bucket_type_t {
    /**
     * The name of the bucket type
     */
    const char *name;
    /** 
     * The number of functions this bucket understands.  Can not be less than
     * five.
     */
    int num_func;
    /**
     * Whether the bucket contains metadata (ie, information that
     * describes the regular contents of the brigade).  The metadata
     * is not returned by apr_bucket_read() and is not indicated by
     * the ->length of the apr_bucket itself.  In other words, an
     * empty bucket is safe to arbitrarily remove if and only if it
     * contains no metadata.  In this sense, "data" is just raw bytes
     * that are the "content" of the brigade and "metadata" describes
     * that data but is not a proper part of it.
     */
    enum {
        /** This bucket type represents actual data to send to the client. */
        APR_BUCKET_DATA = 0,
        /** This bucket type represents metadata. */
        APR_BUCKET_METADATA = 1
    } is_metadata;
    /**
     * Free the private data and any resources used by the bucket (if they
     *  aren't shared with another bucket).  This function is required to be
     *  implemented for all bucket types, though it might be a no-op on some
     *  of them (namely ones that never allocate any private data structures).
     * @param data The private data pointer from the bucket to be destroyed
     */
    void (*destroy)(void *data);

    /**
     * Read the data from the bucket. This is required to be implemented
     *  for all bucket types.
     * @param b The bucket to read from
     * @param str A place to store the data read.  Allocation should only be
     *            done if absolutely necessary. 
     * @param len The amount of data read.
     * @param block Should this read function block if there is more data that
     *              cannot be read immediately.
     */
    apr_status_t (*read)(apr_bucket *b, const char **str, apr_size_t *len, 
                         apr_read_type_e block);
    
    /**
     * Make it possible to set aside the data for at least as long as the
     *  given pool. Buckets containing data that could potentially die before
     *  this pool (e.g. the data resides on the stack, in a child pool of
     *  the given pool, or in a disjoint pool) must somehow copy, shift, or
     *  transform the data to have the proper lifetime.
     * @param e The bucket to convert
     * @remark Some bucket types contain data that will always outlive the
     *         bucket itself. For example no data (EOS and FLUSH), or the data
     *         resides in global, constant memory (IMMORTAL), or the data is on
     *      the heap (HEAP). For these buckets, apr_bucket_setaside_noop can
     *      be used.
     */
    apr_status_t (*setaside)(apr_bucket *e, apr_pool_t *pool);

    /**
     * Split one bucket in two at the specified position by duplicating
     *  the bucket structure (not the data) and modifying any necessary
     *  start/end/offset information.  If it's not possible to do this
     *  for the bucket type (perhaps the length of the data is indeterminate,
     *  as with pipe and socket buckets), then APR_ENOTIMPL is returned.
     * @param e The bucket to split
     * @param point The offset of the first byte in the new bucket
     */
    apr_status_t (*split)(apr_bucket *e, apr_size_t point);

    /**
     * Copy the bucket structure (not the data), assuming that this is
     *  possible for the bucket type. If it's not, APR_ENOTIMPL is returned.
     * @param e The bucket to copy
     * @param c Returns a pointer to the new bucket
     */
    apr_status_t (*copy)(apr_bucket *e, apr_bucket **c);

};

/**
 * 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.
 */
struct apr_bucket {
    /** Links to the rest of the brigade */
    APR_RING_ENTRY(apr_bucket) link;
    /** The type of bucket.  */
    const apr_bucket_type_t *type;
    /** 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).
     */
    apr_size_t length;
    /** 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.
     */
    apr_off_t start;
    /** type-dependent data hangs off this pointer */
    void *data;	
    /**
     * 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().
     * @param e Pointer to the bucket being freed
     */
    void (*free)(void *e);
    /** The freelist from which this bucket was allocated */
    apr_bucket_alloc_t *list;
};

/** A list of buckets */
struct apr_bucket_brigade {
    /** The pool to associate the brigade with.  The data is not allocated out
     *  of the pool, but a cleanup is registered with this pool.  If the 
     *  brigade is destroyed by some mechanism other than pool destruction,
     *  the destroying function is responsible for killing the cleanup.
     */
    apr_pool_t *p;
    /** The buckets in the brigade are on this list. */
    /*
     * The apr_bucket_list structure doesn't actually need a name tag
     * because it has no existence independent of struct apr_bucket_brigade;
     * the ring macros are designed so that you can leave the name tag
     * argument empty in this situation but apparently the Windows compiler
     * doesn't like that.
     */
    APR_RING_HEAD(apr_bucket_list, apr_bucket) list;
    /** The freelist from which this bucket was allocated */
    apr_bucket_alloc_t *bucket_alloc;
};


/**
 * Function called when a brigade should be flushed
 */
typedef apr_status_t (*apr_brigade_flush)(apr_bucket_brigade *bb, void *ctx);

/*
 * define APR_BUCKET_DEBUG if you want your brigades to be checked for
 * validity at every possible instant.  this will slow your code down
 * substantially but is a very useful debugging tool.
 */
#ifdef APR_BUCKET_DEBUG

#define APR_BRIGADE_CHECK_CONSISTENCY(b)				\
        APR_RING_CHECK_CONSISTENCY(&(b)->list, apr_bucket, link)

#define APR_BUCKET_CHECK_CONSISTENCY(e)					\
        APR_RING_CHECK_ELEM_CONSISTENCY((e), apr_bucket, link)

#else
/**
 * checks the ring pointers in a bucket brigade for consistency.  an
 * abort() will be triggered if any inconsistencies are found.
 *   note: this is a no-op unless APR_BUCKET_DEBUG is defined.
 * @param b The brigade
 */
#define APR_BRIGADE_CHECK_CONSISTENCY(b)
/**
 * checks the brigade a bucket is in for ring consistency.  an
 * abort() will be triggered if any inconsistencies are found.
 *   note: this is a no-op unless APR_BUCKET_DEBUG is defined.
 * @param e The bucket
 */
#define APR_BUCKET_CHECK_CONSISTENCY(e)
#endif


/**
 * Wrappers around the RING macros to reduce the verbosity of the code
 * that handles bucket brigades.
 */
/**
 * The magic pointer value that indicates the head of the brigade
 * @remark This is used to find the beginning and end of the brigade, eg:
 * <pre>
 *      while (e != APR_BRIGADE_SENTINEL(b)) {
 *          ...
 *          e = APR_BUCKET_NEXT(e);
 *      }
 * </pre>
 * @param  b The brigade
 * @return The magic pointer value
 */
#define APR_BRIGADE_SENTINEL(b)	APR_RING_SENTINEL(&(b)->list, apr_bucket, link)

/**
 * Determine if the bucket brigade is empty
 * @param b The brigade to check
 * @return true or false
 */
#define APR_BRIGADE_EMPTY(b)	APR_RING_EMPTY(&(b)->list, apr_bucket, link)

/**
 * Return the first bucket in a brigade
 * @param b The brigade to query
 * @return The first bucket in the brigade
 */
#define APR_BRIGADE_FIRST(b)	APR_RING_FIRST(&(b)->list)
/**
 * Return the last bucket in a brigade
 * @param b The brigade to query
 * @return The last bucket in the brigade
 */
#define APR_BRIGADE_LAST(b)	APR_RING_LAST(&(b)->list)

/**
 * Iterate through a bucket brigade
 * @param e The current bucket
 * @param b The brigade to iterate over
 * @remark This is the same as either:
 * <pre>
 *	e = APR_BRIGADE_FIRST(b);
 * 	while (e != APR_BRIGADE_SENTINEL(b)) {
 *	    ...
 * 	    e = APR_BUCKET_NEXT(e);
 * 	}
 *  OR
 * 	for (e = APR_BRIGADE_FIRST(b);
 *           e != APR_BRIGADE_SENTINEL(b);
 *           e = APR_BUCKET_NEXT(e)) {
 *	    ...
 * 	}
 * </pre>
 * @warning Be aware that you cannot change the value of e within
 * the foreach loop, nor can you destroy the bucket it points to.
 * Modifying the prev and next pointers of the bucket is dangerous
 * but can be done if you're careful.  If you change e's value or

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷丁香久久五月婷婷| 国产精品网站在线观看| 日本成人在线不卡视频| 久久九九99视频| 国产福利一区在线| 国产精品国产a级| 色婷婷av久久久久久久| 性感美女极品91精品| 7777精品久久久大香线蕉| 精品一区二区三区免费观看| 久久久久亚洲综合| 一本到三区不卡视频| 日韩在线一区二区三区| 精品剧情在线观看| 成人福利视频在线看| 国产精品一二三四| 久久久国产精品不卡| 91国产福利在线| 奇米777欧美一区二区| 国产精品污www在线观看| 欧美性生活影院| 国内精品第一页| 依依成人精品视频| 欧美成va人片在线观看| 北条麻妃一区二区三区| 亚洲成人自拍偷拍| 欧美国产精品一区二区三区| 欧美在线不卡一区| 国产在线观看免费一区| 亚洲黄色片在线观看| 精品国产免费一区二区三区四区| 成人a免费在线看| 日韩1区2区3区| 中文字幕 久热精品 视频在线| 欧美性感一区二区三区| 国产福利不卡视频| 婷婷开心久久网| 亚洲三级电影全部在线观看高清| 91精品国产手机| 在线视频欧美精品| 懂色av一区二区三区免费看| 日本中文字幕一区二区有限公司| 国产精品日产欧美久久久久| 欧美成人伊人久久综合网| 色狠狠桃花综合| 国产jizzjizz一区二区| 免费高清在线一区| 亚洲成人在线网站| 亚洲欧美视频在线观看视频| 国产清纯白嫩初高生在线观看91 | 国产女人18水真多18精品一级做| 在线亚洲一区观看| av一区二区不卡| 国产伦精品一区二区三区视频青涩| 亚洲一区二区美女| 亚洲乱码国产乱码精品精可以看| 国产亚洲婷婷免费| 亚洲精品一区二区三区影院| 欧美猛男超大videosgay| 91蜜桃在线免费视频| 国产精品77777| 国产一区二区在线观看免费| 午夜av一区二区三区| 亚洲永久精品国产| 亚洲另类中文字| 综合网在线视频| 国产精品灌醉下药二区| 国产精品天干天干在观线| 久久精品人人做人人综合| 精品免费99久久| 精品国产精品网麻豆系列| 日韩欧美色电影| 精品国产不卡一区二区三区| 欧美大胆人体bbbb| 欧美va亚洲va| 精品久久久久久久久久久久久久久久久| 欧美日韩免费观看一区三区| 欧美日韩一区二区三区在线| 欧美影片第一页| 欧美精选在线播放| 久久精品一区二区三区不卡| 欧美精品一区在线观看| 久久久久久久电影| 欧美国产日韩亚洲一区| 自拍偷自拍亚洲精品播放| 亚洲人成7777| 午夜国产不卡在线观看视频| 水蜜桃久久夜色精品一区的特点| 三级影片在线观看欧美日韩一区二区| 调教+趴+乳夹+国产+精品| 日韩精品一区第一页| 久久99精品一区二区三区三区| 国产综合久久久久久久久久久久| 国产精品99久久久久久似苏梦涵 | 欧美三级在线视频| 91精品国产麻豆国产自产在线| 日韩欧美www| 国产精品婷婷午夜在线观看| 亚洲男人都懂的| 三级不卡在线观看| 国产精品一区专区| 色婷婷av一区二区三区大白胸| 宅男在线国产精品| 久久男人中文字幕资源站| 国产精品青草久久| 日韩成人免费在线| 国产精品一二三四| 欧美专区在线观看一区| 精品久久人人做人人爱| 亚洲欧美欧美一区二区三区| 午夜久久久久久电影| 成人永久免费视频| 欧美群妇大交群的观看方式| 久久亚洲精精品中文字幕早川悠里| 欧美国产日韩亚洲一区| 日日欢夜夜爽一区| av一区二区三区在线| 日韩一区二区电影网| 国产精品国产自产拍在线| 青青草国产成人99久久| 91丝袜呻吟高潮美腿白嫩在线观看| 91麻豆精品国产91久久久| 自拍偷拍亚洲欧美日韩| 激情综合色丁香一区二区| 欧美最猛性xxxxx直播| 国产日韩精品一区二区三区在线| 亚洲第一精品在线| jlzzjlzz亚洲日本少妇| 精品国内二区三区| 午夜成人免费视频| 91国模大尺度私拍在线视频| 日本一区二区三区四区在线视频| 亚洲成人资源在线| 91在线码无精品| 国产欧美日韩另类一区| 日本美女视频一区二区| 欧美性大战久久久久久久| 亚洲国产精品t66y| 国产一区二区精品久久99| 91精品中文字幕一区二区三区| 综合久久久久综合| 成人av先锋影音| 国产欧美视频一区二区| 日韩av中文字幕一区二区| 欧美性受xxxx黑人xyx| 亚洲视频 欧洲视频| 国产精品88av| 久久久久久久久伊人| 久久99精品国产麻豆不卡| 911精品国产一区二区在线| 一区二区三区不卡在线观看 | 精品少妇一区二区三区视频免付费| 亚洲精品高清视频在线观看| 成人aa视频在线观看| 久久综合丝袜日本网| 麻豆视频一区二区| 日韩午夜小视频| 老司机免费视频一区二区 | 国产电影一区在线| 欧美精品一区二区在线播放 | 国产欧美一区在线| 国产麻豆91精品| 2021中文字幕一区亚洲| 久草在线在线精品观看| 精品免费99久久| 韩国av一区二区| 国产欧美日韩在线观看| 国产成人午夜高潮毛片| 久久久亚洲午夜电影| 懂色av一区二区在线播放| 国产女人aaa级久久久级| 国产成人自拍网| 中日韩免费视频中文字幕| 99久久99久久免费精品蜜臀| 中文字幕一区二区三区在线不卡| bt7086福利一区国产| 亚洲人快播电影网| 欧美午夜一区二区三区免费大片| 亚洲综合精品自拍| 欧美日韩国产123区| 男人的天堂亚洲一区| 26uuu精品一区二区在线观看| 国产真实乱子伦精品视频| 国产欧美中文在线| 91久久精品一区二区三| 亚洲国产精品久久艾草纯爱| 3d动漫精品啪啪一区二区竹菊| 裸体健美xxxx欧美裸体表演| 精品国产区一区| voyeur盗摄精品| 亚洲综合图片区| 欧美一区二区在线看| 国内精品久久久久影院一蜜桃| 国产日韩在线不卡| 一本大道久久a久久综合| 免费成人美女在线观看| 欧美国产一区二区| 欧美日韩国产一级| 国产一区二区三区四区五区入口 | 亚洲女同ⅹxx女同tv|