Apache HTTPD
Classes | Macros | Functions | Variables
core_filters.c File Reference

Core input/output network filters. More...

#include "apr.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "apr_fnmatch.h"
#include "apr_hash.h"
#include "apr_thread_proc.h"
#include "apr_version.h"
#include "apr_want.h"
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include "http_vhost.h"
#include "http_main.h"
#include "http_log.h"
#include "util_md5.h"
#include "http_connection.h"
#include "apr_buckets.h"
#include "util_filter.h"
#include "util_ebcdic.h"
#include "mpm_common.h"
#include "scoreboard.h"
#include "mod_core.h"
#include "ap_listen.h"
#include "mod_so.h"

Go to the source code of this file.

Classes

struct  core_output_filter_ctx
 

Macros

#define APR_WANT_IOVEC
 
#define APR_WANT_STRFUNC
 
#define APR_WANT_MEMFUNC
 
#define AP_MIN_SENDFILE_BYTES   (256)
 
#define BRIGADE_NORMALIZE(b)
 
#define APLOG_MODULE_INDEX   AP_CORE_MODULE_INDEX
 
#define THRESHOLD_MIN_WRITE   4096
 
#define NVEC_MIN   16
 
#define NVEC_MAX   APR_MAX_IOVEC_SIZE
 

Functions

apr_status_t ap_core_input_filter (ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
 
static void setaside_remaining_output (ap_filter_t *f, core_output_filter_ctx_t *ctx, apr_bucket_brigade *bb, conn_rec *c)
 
static apr_status_t send_brigade_nonblocking (apr_socket_t *s, apr_bucket_brigade *bb, core_output_filter_ctx_t *ctx, conn_rec *c)
 
static apr_status_t writev_nonblocking (apr_socket_t *s, apr_bucket_brigade *bb, core_output_filter_ctx_t *ctx, apr_size_t bytes_to_write, apr_size_t nvec, conn_rec *c)
 
static int should_send_brigade (apr_bucket_brigade *bb, conn_rec *c, int *flush)
 
apr_status_t ap_core_output_filter (ap_filter_t *f, apr_bucket_brigade *new_bb)
 
static APR_INLINE int is_in_memory_bucket (apr_bucket *b)
 
static APR_INLINE void sock_nopush (apr_socket_t *s, int to)
 

Variables

apr_OFN_ap_logio_add_bytes_out_tap__logio_add_bytes_out
 

Detailed Description

Core input/output network filters.

Definition in file core_filters.c.

Macro Definition Documentation

◆ AP_MIN_SENDFILE_BYTES

#define AP_MIN_SENDFILE_BYTES   (256)

Definition at line 56 of file core_filters.c.

◆ APLOG_MODULE_INDEX

#define APLOG_MODULE_INDEX   AP_CORE_MODULE_INDEX

Definition at line 79 of file core_filters.c.

◆ APR_WANT_IOVEC

#define APR_WANT_IOVEC

Definition at line 30 of file core_filters.c.

◆ APR_WANT_MEMFUNC

#define APR_WANT_MEMFUNC

Definition at line 32 of file core_filters.c.

◆ APR_WANT_STRFUNC

#define APR_WANT_STRFUNC

Definition at line 31 of file core_filters.c.

◆ BRIGADE_NORMALIZE

#define BRIGADE_NORMALIZE (   b)
Value:
do { \
do { \
e = d; \
} \
else { \
} \
} while (!APR_BRIGADE_EMPTY(b) && (e != APR_BRIGADE_SENTINEL(b))); \
} while (0)
apr_size_t const unsigned char unsigned int unsigned int d
Definition apr_siphash.h:72
#define APR_BUCKET_IS_METADATA(e)
#define APR_BUCKET_NEXT(e)
apr_bucket * e
#define APR_BRIGADE_EMPTY(b)
#define APR_BRIGADE_SENTINEL(b)
#define APR_BRIGADE_FIRST(b)
apr_size_t size
apr_pool_t * b
Definition apr_pools.h:529
apr_size_t length

Remove all zero length buckets from the brigade.

Definition at line 61 of file core_filters.c.

◆ NVEC_MAX

#define NVEC_MAX   APR_MAX_IOVEC_SIZE

Definition at line 602 of file core_filters.c.

◆ NVEC_MIN

#define NVEC_MIN   16

Definition at line 598 of file core_filters.c.

◆ THRESHOLD_MIN_WRITE

#define THRESHOLD_MIN_WRITE   4096

Definition at line 353 of file core_filters.c.

Function Documentation

◆ is_in_memory_bucket()

static APR_INLINE int is_in_memory_bucket ( apr_bucket b)
static

Definition at line 605 of file core_filters.c.

◆ send_brigade_nonblocking()

static apr_status_t send_brigade_nonblocking ( apr_socket_t s,
apr_bucket_brigade bb,
core_output_filter_ctx_t ctx,
conn_rec c 
)
static

Definition at line 649 of file core_filters.c.

◆ setaside_remaining_output()

static void setaside_remaining_output ( ap_filter_t f,
core_output_filter_ctx_t ctx,
apr_bucket_brigade bb,
conn_rec c 
)
static

Definition at line 557 of file core_filters.c.

◆ should_send_brigade()

static int should_send_brigade ( apr_bucket_brigade bb,
conn_rec c,
int flush 
)
static

Definition at line 360 of file core_filters.c.

◆ sock_nopush()

static APR_INLINE void sock_nopush ( apr_socket_t s,
int  to 
)
static

Definition at line 637 of file core_filters.c.

◆ writev_nonblocking()

static apr_status_t writev_nonblocking ( apr_socket_t s,
apr_bucket_brigade bb,
core_output_filter_ctx_t ctx,
apr_size_t  bytes_to_write,
apr_size_t  nvec,
conn_rec c 
)
static

Definition at line 784 of file core_filters.c.

Variable Documentation

◆ ap__logio_add_bytes_out

apr_OFN_ap_logio_add_bytes_out_t* ap__logio_add_bytes_out
extern

Definition at line 5055 of file core.c.