1
0
mirror of https://github.com/apache/httpd.git synced 2025-07-29 09:01:18 +03:00

Doxygen fixup / cleanup

submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ian Holsman
2005-08-28 23:03:59 +00:00
parent 3e168404bc
commit 8c1e315d3f
106 changed files with 1369 additions and 539 deletions

View File

@ -2,6 +2,8 @@
Changes with Apache 2.3.0 Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported] [Remove entries to the current 2.0 and 2.2 section below, when backported]
*) Doxygen fixup [Neale Ranns neale ranns.org, Ian Holsman]
*) prefork and worker MPMs: Support a graceful-stop procedure: *) prefork and worker MPMs: Support a graceful-stop procedure:
Server will wait until existing requests are finished or until Server will wait until existing requests are finished or until
"GracefulShutdownTimeout" number of seconds before exiting. "GracefulShutdownTimeout" number of seconds before exiting.

View File

@ -1,12 +1,19 @@
PROJECT_NAME=Apache PROJECT_NAME=Apache2
#INPUT=srclib/apr # make the generated documentation searchable
SEARCHENGINE=YES
INPUT=. INPUT=.
RECURSIVE=YES RECURSIVE=YES
FILE_PATTERNS=*.h FILE_PATTERNS=*.h
OUTPUT_DIRECTORY=docs/dox OUTPUT_DIRECTORY=docs/dox
#EXTRACT_STATIC=YES
EXTRACT_ALL=YES
# add documentation for functions that are declared internal use only
INTERNAL_DOCS=YES
ENABLE_PREPROCESSING=YES ENABLE_PREPROCESSING=YES
MACRO_EXPANSION=YES MACRO_EXPANSION=YES
QUIET=YES QUIET=YES
@ -16,8 +23,11 @@ EXPAND_ONLY_PREDEF=YES
PREDEFINED="APR_DECLARE(x)=x" \ PREDEFINED="APR_DECLARE(x)=x" \
"APR_DECLARE_NONSTD(x)=x" \ "APR_DECLARE_NONSTD(x)=x" \
"AP_DECLARE_HOOK(ret,name,args)=ret name args;" \ "AP_DECLARE_HOOK(ret,name,args)=ret name args;" \
"APR_DECLARE_OPTIONAL_FN(ret,name,args)=ret name args;" \
"AP_DECLARE(x)=x" \ "AP_DECLARE(x)=x" \
"AP_DECLARE_NONSTD(x)=x" \ "AP_DECLARE_NONSTD(x)=x" \
AP_CORE_DECLARE(x)=x \
"AP_CORE_DECLARE_NONSTD(x)=x" \
"APR_HAS_THREADS" \ "APR_HAS_THREADS" \
"APR_HAS_MMAP" \ "APR_HAS_MMAP" \
APR_HAS_INLINE \ APR_HAS_INLINE \
@ -49,4 +59,7 @@ OPTIMIZE_OUTPUT_FOR_C=YES
FULL_PATH_NAMES=YES FULL_PATH_NAMES=YES
# some autoconf guru needs to make configure set this correctly... # some autoconf guru needs to make configure set this correctly...
STRIP_FROM_PATH=/var/www/lxr/source #STRIP_FROM_PATH=/var/www/lxr/source
#GENERATE_TAGFILE=docs/dox/httpd.tag
#TAGFILES=../apr/docs/dox/apr.tag=/apr ../apr-util/docs/dox/apu.tag=/apr-util

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_compat.h
* @brief Redefine Apache 1.3 symbols
*/
#ifndef AP_COMPAT_H #ifndef AP_COMPAT_H
#define AP_COMPAT_H #define AP_COMPAT_H

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_config.h
* @brief Symbol export macros and hook functions
*/
#ifndef AP_CONFIG_H #ifndef AP_CONFIG_H
#define AP_CONFIG_H #define AP_CONFIG_H
@ -21,13 +26,11 @@
#include "apr_hooks.h" #include "apr_hooks.h"
#include "apr_optional_hooks.h" #include "apr_optional_hooks.h"
/**
* @file ap_config.h
* @brief Symbol export macros and hook functions
*/
/* Although this file doesn't declare any hooks, declare the hook group here */ /* Although this file doesn't declare any hooks, declare the hook group here */
/** @defgroup hooks Apache Hooks */ /**
* @defgroup hooks Apache Hooks
* @ingroup APACHE_CORE
*/
#ifdef DOXYGEN #ifdef DOXYGEN
/* define these just so doxygen documents them */ /* define these just so doxygen documents them */

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_config_layout.h
* @brief Apache Config Layout
*/
#ifndef AP_CONFIG_LAYOUT_H #ifndef AP_CONFIG_LAYOUT_H
#define AP_CONFIG_LAYOUT_H #define AP_CONFIG_LAYOUT_H

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_listen.h
* @brief Apache Listeners Library
*
* @defgroup APACHE_CORE_LISTEN Apache Listeners Library
* @ingroup APACHE_CORE
* @{
*/
#ifndef AP_LISTEN_H #ifndef AP_LISTEN_H
#define AP_LISTEN_H #define AP_LISTEN_H
@ -21,15 +30,13 @@
#include "httpd.h" #include "httpd.h"
#include "http_config.h" #include "http_config.h"
/**
* @package Apache Listeners Library
*/
typedef struct ap_listen_rec ap_listen_rec; typedef struct ap_listen_rec ap_listen_rec;
typedef apr_status_t (*accept_function)(void **csd, ap_listen_rec *lr, apr_pool_t *ptrans); typedef apr_status_t (*accept_function)(void **csd, ap_listen_rec *lr, apr_pool_t *ptrans);
/** /**
* Apache's listeners record. These are used in the Multi-Processing Modules * @brief Apache's listeners record.
*
* These are used in the Multi-Processing Modules
* to setup all of the sockets for the MPM to listen to and accept on. * to setup all of the sockets for the MPM to listen to and accept on.
*/ */
struct ap_listen_rec { struct ap_listen_rec {
@ -109,3 +116,4 @@ AP_INIT_TAKE1("ReceiveBufferSize", ap_set_receive_buffer_size, NULL, \
RSRC_CONF, "Receive buffer size in bytes") RSRC_CONF, "Receive buffer size in bytes")
#endif #endif
/** @} */

View File

@ -14,13 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_mpm.h
* @brief Module Magic Number
*
* @defgroup APACHE_CORE_MMN Module Magic Number
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_AP_MMN_H #ifndef APACHE_AP_MMN_H
#define APACHE_AP_MMN_H #define APACHE_AP_MMN_H
/**
* @package Module Magic Number
*/
/* /*
* MODULE_MAGIC_NUMBER_MAJOR * MODULE_MAGIC_NUMBER_MAJOR
* Major API changes that could cause compatibility problems for older modules * Major API changes that could cause compatibility problems for older modules
@ -137,3 +142,4 @@
#define MODULE_MAGIC_AT_LEAST old_broken_macro_we_hope_you_are_not_using #define MODULE_MAGIC_AT_LEAST old_broken_macro_we_hope_you_are_not_using
#endif /* !APACHE_AP_MMN_H */ #endif /* !APACHE_AP_MMN_H */
/** @} */

View File

@ -14,15 +14,20 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_mmn.h
* @brief Apache Multi-Processing Module library
*
* @defgroup APACHE_CORE_MPM Multi-Processing Module library
* @ingroup APACHE_CORE
* @{
*/
#ifndef AP_MPM_H #ifndef AP_MPM_H
#define AP_MPM_H #define AP_MPM_H
#include "apr_thread_proc.h" #include "apr_thread_proc.h"
/**
* @package Multi-Processing Module library
*/
/* /*
The MPM, "multi-processing model" provides an abstraction of the The MPM, "multi-processing model" provides an abstraction of the
interface with the OS for distributing incoming connections to interface with the OS for distributing incoming connections to
@ -175,3 +180,4 @@ AP_DECLARE_HOOK(int,fatal_exception,(ap_exception_info_t *ei))
#endif /*AP_ENABLE_EXCEPTION_HOOK*/ #endif /*AP_ENABLE_EXCEPTION_HOOK*/
#endif #endif
/** @} */

View File

@ -14,15 +14,20 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_provider.h
* @brief Apache Provider API
*
* @defgroup APACHE_CORE_PROVIDER Provider API
* @ingroup APACHE_CORE
* @{
*/
#ifndef AP_PROVIDER_H #ifndef AP_PROVIDER_H
#define AP_PROVIDER_H #define AP_PROVIDER_H
#include "ap_config.h" #include "ap_config.h"
/**
* @package Provider API
*/
/** /**
* This function is used to register a provider with the global * This function is used to register a provider with the global
* provider pool. * provider pool.
@ -52,3 +57,4 @@ AP_DECLARE(void *) ap_lookup_provider(const char *provider_group,
const char *provider_version); const char *provider_version);
#endif #endif
/** @} */

View File

@ -47,6 +47,11 @@ POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
*/ */
/**
* @file ap_regex.h
* @brief Apache Regex defines
*/
#ifndef AP_REGEX_H #ifndef AP_REGEX_H
#define AP_REGEX_H #define AP_REGEX_H

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_regkey.h
* @brief APR-style Win32 Registry Manipulation
*/
#ifndef AP_REGKEY_H #ifndef AP_REGKEY_H
#define AP_REGKEY_H #define AP_REGKEY_H
@ -33,11 +38,6 @@ typedef struct ap_regkey_t ap_regkey_t;
*/ */
AP_DECLARE(const ap_regkey_t *) ap_regkey_const(int i); AP_DECLARE(const ap_regkey_t *) ap_regkey_const(int i);
/**
* @file ap_regkey.h
* @brief APR-style Win32 Registry Manipulation
*/
/** /**
* Win32 Only: Constants for ap_regkey_open() * Win32 Only: Constants for ap_regkey_open()
*/ */

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ap_release.h
* @brief Version Release defines
*/
#ifndef AP_RELEASE_H #ifndef AP_RELEASE_H
#define AP_RELEASE_H #define AP_RELEASE_H

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_config.h
* @brief Apache Configuration
*
* @defgroup APACHE_CORE_CONFIG Configuration
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_CONFIG_H #ifndef APACHE_HTTP_CONFIG_H
#define APACHE_HTTP_CONFIG_H #define APACHE_HTTP_CONFIG_H
@ -24,11 +33,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @file http_config.h
* @brief Apache Configuration
*/
/* /*
* The central data structures around here... * The central data structures around here...
*/ */
@ -694,7 +698,7 @@ AP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree,
ap_conf_vector_t *section_vector); ap_conf_vector_t *section_vector);
/** /**
* @defgroup ap_check_cmd_context ap_check_cmd_context * @defgroup ap_check_cmd_context Check command context
* @{ * @{
*/ */
/** /**
@ -721,7 +725,7 @@ AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd,
#ifdef CORE_PRIVATE #ifdef CORE_PRIVATE
/** /**
* This structure is used to assign symbol names to module pointers * @brief This structure is used to assign symbol names to module pointers
*/ */
typedef struct { typedef struct {
const char *name; const char *name;
@ -1049,3 +1053,4 @@ AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))
#endif #endif
#endif /* !APACHE_HTTP_CONFIG_H */ #endif /* !APACHE_HTTP_CONFIG_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_connection.h
* @brief Apache connection library
*
* @defgroup APACHE_CORE_CONNECTION Connection Library
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_CONNECTION_H #ifndef APACHE_HTTP_CONNECTION_H
#define APACHE_HTTP_CONNECTION_H #define APACHE_HTTP_CONNECTION_H
@ -24,10 +33,11 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
* @package Apache connection library * @file http_connection.h
* @brief Apache connection library
*/ */
#ifdef CORE_PRIVATE #ifdef CORE_PRIVATE
/** /**
* This is the protocol module driver. This calls all of the * This is the protocol module driver. This calls all of the
@ -36,10 +46,13 @@ extern "C" {
* @param csd The mechanism on which this connection is to be read. * @param csd The mechanism on which this connection is to be read.
* Most times this will be a socket, but it is up to the module * Most times this will be a socket, but it is up to the module
* that accepts the request to determine the exact type. * that accepts the request to determine the exact type.
* @deffunc void ap_process_connection(conn_rec *c, void *csd)
*/ */
AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd); AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd);
/**
* Flushes all remain data in the client send buffer
* @param c The connection to flush
*/
AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c); AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c);
/** /**
@ -70,10 +83,12 @@ AP_DECLARE(void) ap_lingering_close(conn_rec *c);
* if it encounters a fatal error condition. * if it encounters a fatal error condition.
* *
* @param p The pool from which to allocate the connection record * @param p The pool from which to allocate the connection record
* @param server The server record to create the connection too.
* @param csd The socket that has been accepted * @param csd The socket that has been accepted
* @param conn_id A unique identifier for this connection. The ID only * @param conn_id A unique identifier for this connection. The ID only
* needs to be unique at that time, not forever. * needs to be unique at that time, not forever.
* @param sbh A handle to scoreboard information for this connection. * @param sbh A handle to scoreboard information for this connection.
* @param alloc The bucket allocator to use for all bucket/brigade creations
* @return An allocated connection record or NULL. * @return An allocated connection record or NULL.
*/ */
AP_DECLARE_HOOK(conn_rec *, create_connection, AP_DECLARE_HOOK(conn_rec *, create_connection,
@ -89,7 +104,6 @@ AP_DECLARE_HOOK(conn_rec *, create_connection,
* Most times this will be a socket, but it is up to the module * Most times this will be a socket, but it is up to the module
* that accepts the request to determine the exact type. * that accepts the request to determine the exact type.
* @return OK or DECLINED * @return OK or DECLINED
* @deffunc int ap_run_pre_connection(conn_rec *c, void *csd)
*/ */
AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd)) AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd))
@ -100,12 +114,10 @@ AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd))
* to handle the request is the last module run. * to handle the request is the last module run.
* @param c The connection on which the request has been received. * @param c The connection on which the request has been received.
* @return OK or DECLINED * @return OK or DECLINED
* @deffunc int ap_run_process_connection(conn_rec *c)
*/ */
AP_DECLARE_HOOK(int,process_connection,(conn_rec *c)) AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
/* End Of Connection (EOC) bucket */ /** End Of Connection (EOC) bucket */
AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc; AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc;
/** /**
@ -119,7 +131,6 @@ AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc;
* Make the bucket passed in an End Of Connection (EOC) bucket * Make the bucket passed in an End Of Connection (EOC) bucket
* @param b The bucket to make into an EOC bucket * @param b The bucket to make into an EOC bucket
* @return The new bucket, or NULL if allocation failed * @return The new bucket, or NULL if allocation failed
* @deffunc apr_bucket *ap_bucket_eoc_make(apr_bucket *b)
*/ */
AP_DECLARE(apr_bucket *) ap_bucket_eoc_make(apr_bucket *b); AP_DECLARE(apr_bucket *) ap_bucket_eoc_make(apr_bucket *b);
@ -128,7 +139,6 @@ AP_DECLARE(apr_bucket *) ap_bucket_eoc_make(apr_bucket *b);
* that the connection will be closed. * that the connection will be closed.
* @param list The freelist from which this bucket should be allocated * @param list The freelist from which this bucket should be allocated
* @return The new bucket, or NULL if allocation failed * @return The new bucket, or NULL if allocation failed
* @deffunc apr_bucket *ap_bucket_eoc_create(apr_bucket_alloc_t *list)
*/ */
AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list); AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list);
@ -137,3 +147,4 @@ AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list);
#endif #endif
#endif /* !APACHE_HTTP_REQUEST_H */ #endif /* !APACHE_HTTP_REQUEST_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_core.h
* @brief CORE HTTP Daemon
*
* @defgroup APACHE_CORE_HTTPD Core HTTP Daemon
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_CORE_H #ifndef APACHE_HTTP_CORE_H
#define APACHE_HTTP_CORE_H #define APACHE_HTTP_CORE_H
@ -32,10 +41,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package CORE HTTP Daemon
*/
/* **************************************************************** /* ****************************************************************
* *
* The most basic server code is encapsulated in a single module * The most basic server code is encapsulated in a single module
@ -48,61 +53,88 @@ extern "C" {
* of one of them (allow_options). * of one of them (allow_options).
*/ */
#define OPT_NONE 0 /**
#define OPT_INDEXES 1 * @defgroup APACHE_CORE_HTTPD_ACESSORS Acessors
#define OPT_INCLUDES 2 *
#define OPT_SYM_LINKS 4 * @brief File/Directory Accessor directives
#define OPT_EXECCGI 8 *
#define OPT_UNSET 16 * @{
#define OPT_INCNOEXEC 32 */
#define OPT_SYM_OWNER 64
#define OPT_MULTI 128
#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI)
/* options for get_remote_host() */ /** No directives */
/* REMOTE_HOST returns the hostname, or NULL if the hostname #define OPT_NONE 0
/** Indexes directive */
#define OPT_INDEXES 1
/** Includes directive */
#define OPT_INCLUDES 2
/** FollowSymLinks directive */
#define OPT_SYM_LINKS 4
/** ExecCGI directive */
#define OPT_EXECCGI 8
/** directive unset */
#define OPT_UNSET 16
/** IncludesNOEXEC directive */
#define OPT_INCNOEXEC 32
/** SymLinksIfOwnerMatch directive */
#define OPT_SYM_OWNER 64
/** MultiViews directive */
#define OPT_MULTI 128
/** All directives */
#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI)
/** @} */
/**
* @defgroup get_remote_host Remote Host Resolution
* @ingroup APACHE_CORE_HTTPD
* @{
*/
/** REMOTE_HOST returns the hostname, or NULL if the hostname
* lookup fails. It will force a DNS lookup according to the * lookup fails. It will force a DNS lookup according to the
* HostnameLookups setting. * HostnameLookups setting.
*/ */
#define REMOTE_HOST (0) #define REMOTE_HOST (0)
/* REMOTE_NAME returns the hostname, or the dotted quad if the /** REMOTE_NAME returns the hostname, or the dotted quad if the
* hostname lookup fails. It will force a DNS lookup according * hostname lookup fails. It will force a DNS lookup according
* to the HostnameLookups setting. * to the HostnameLookups setting.
*/ */
#define REMOTE_NAME (1) #define REMOTE_NAME (1)
/* REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is /** REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is
* never forced. * never forced.
*/ */
#define REMOTE_NOLOOKUP (2) #define REMOTE_NOLOOKUP (2)
/* REMOTE_DOUBLE_REV will always force a DNS lookup, and also force /** REMOTE_DOUBLE_REV will always force a DNS lookup, and also force
* a double reverse lookup, regardless of the HostnameLookups * a double reverse lookup, regardless of the HostnameLookups
* setting. The result is the (double reverse checked) hostname, * setting. The result is the (double reverse checked) hostname,
* or NULL if any of the lookups fail. * or NULL if any of the lookups fail.
*/ */
#define REMOTE_DOUBLE_REV (3) #define REMOTE_DOUBLE_REV (3)
/** @} // get_remote_host */
/** all of the requirements must be met */
#define SATISFY_ALL 0 #define SATISFY_ALL 0
/** any of the requirements must be met */
#define SATISFY_ANY 1 #define SATISFY_ANY 1
/** There are no applicable satisfy lines */
#define SATISFY_NOSPEC 2 #define SATISFY_NOSPEC 2
/* Make sure we don't write less than 8000 bytes at any one time. /** Make sure we don't write less than 8000 bytes at any one time.
*/ */
#define AP_MIN_BYTES_TO_WRITE 8000 #define AP_MIN_BYTES_TO_WRITE 8000
/* default maximum of internal redirects */ /** default maximum of internal redirects */
# define AP_DEFAULT_MAX_INTERNAL_REDIRECTS 10 # define AP_DEFAULT_MAX_INTERNAL_REDIRECTS 10
/* default maximum subrequest nesting level */ /** default maximum subrequest nesting level */
# define AP_DEFAULT_MAX_SUBREQ_DEPTH 10 # define AP_DEFAULT_MAX_SUBREQ_DEPTH 10
/** /**
* Retrieve the value of Options for this request * Retrieve the value of Options for this request
* @param r The current request * @param r The current request
* @return the Options bitmask * @return the Options bitmask
* @deffunc int ap_allow_options(request_rec *r)
*/ */
AP_DECLARE(int) ap_allow_options(request_rec *r); AP_DECLARE(int) ap_allow_options(request_rec *r);
@ -110,7 +142,6 @@ AP_DECLARE(int) ap_allow_options(request_rec *r);
* Retrieve the value of the AllowOverride for this request * Retrieve the value of the AllowOverride for this request
* @param r The current request * @param r The current request
* @return the overrides bitmask * @return the overrides bitmask
* @deffunc int ap_allow_overrides(request_rec *r)
*/ */
AP_DECLARE(int) ap_allow_overrides(request_rec *r); AP_DECLARE(int) ap_allow_overrides(request_rec *r);
@ -118,7 +149,6 @@ AP_DECLARE(int) ap_allow_overrides(request_rec *r);
* Retrieve the value of the DefaultType directive, or text/plain if not set * Retrieve the value of the DefaultType directive, or text/plain if not set
* @param r The current request * @param r The current request
* @return The default type * @return The default type
* @deffunc const char *ap_default_type(request_rec *r)
*/ */
AP_DECLARE(const char *) ap_default_type(request_rec *r); AP_DECLARE(const char *) ap_default_type(request_rec *r);
@ -128,12 +158,12 @@ AP_DECLARE(const char *) ap_default_type(request_rec *r);
* @warning Don't use this! If your request went through a Userdir, or * @warning Don't use this! If your request went through a Userdir, or
* something like that, it'll screw you. But it's back-compatible... * something like that, it'll screw you. But it's back-compatible...
* @return The document root * @return The document root
* @deffunc const char *ap_document_root(request_rec *r)
*/ */
AP_DECLARE(const char *) ap_document_root(request_rec *r); AP_DECLARE(const char *) ap_document_root(request_rec *r);
/** /**
* Lookup the remote client's DNS name or IP address * Lookup the remote client's DNS name or IP address
* @ingroup get_remote_host
* @param conn The current connection * @param conn The current connection
* @param dir_config The directory config vector from the request * @param dir_config The directory config vector from the request
* @param type The type of lookup to perform. One of: * @param type The type of lookup to perform. One of:
@ -154,7 +184,6 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r);
* @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address
* string is returned * string is returned
* @return The remote hostname * @return The remote hostname
* @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip)
*/ */
AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip); AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
@ -163,7 +192,6 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, in
* determined * determined
* @param r The current request * @param r The current request
* @return The user logged in to the client machine * @return The user logged in to the client machine
* @deffunc const char *ap_get_remote_logname(request_rec *r)
*/ */
AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r); AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r);
@ -176,7 +204,6 @@ AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r);
* @param uri The path to the requested file * @param uri The path to the requested file
* @param r The current request * @param r The current request
* @return A fully qualified URL * @return A fully qualified URL
* @deffunc char *ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r)
*/ */
AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r); AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r);
@ -184,15 +211,13 @@ AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec
* Get the current server name from the request * Get the current server name from the request
* @param r The current request * @param r The current request
* @return the server name * @return the server name
* @deffunc const char *ap_get_server_name(request_rec *r)
*/ */
AP_DECLARE(const char *) ap_get_server_name(request_rec *r); AP_DECLARE(const char *) ap_get_server_name(request_rec *r);
/** /**
* Get the current server port * Get the current server port
* @param The current request * @param r The current request
* @return The server's port * @return The server's port
* @deffunc apr_port_t ap_get_server_port(const request_rec *r)
*/ */
AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r); AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r);
@ -200,7 +225,6 @@ AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r);
* Return the limit on bytes in request msg body * Return the limit on bytes in request msg body
* @param r The current request * @param r The current request
* @return the maximum number of bytes in the request msg body * @return the maximum number of bytes in the request msg body
* @deffunc apr_off_t ap_get_limit_req_body(const request_rec *r)
*/ */
AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r); AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r);
@ -208,7 +232,6 @@ AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r);
* Return the limit on bytes in XML request msg body * Return the limit on bytes in XML request msg body
* @param r The current request * @param r The current request
* @return the maximum number of bytes in XML request msg body * @return the maximum number of bytes in XML request msg body
* @deffunc size_t ap_get_limit_xml_body(const request_rec *r)
*/ */
AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r); AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r);
@ -225,7 +248,6 @@ AP_DECLARE(void) ap_custom_response(request_rec *r, int status, const char *stri
* Check if the current request is beyond the configured max. number of redirects or subrequests * Check if the current request is beyond the configured max. number of redirects or subrequests
* @param r The current request * @param r The current request
* @return true (is exceeded) or false * @return true (is exceeded) or false
* @deffunc int ap_is_recursion_limit_exceeded(const request_rec *r)
*/ */
AP_DECLARE(int) ap_is_recursion_limit_exceeded(const request_rec *r); AP_DECLARE(int) ap_is_recursion_limit_exceeded(const request_rec *r);
@ -233,7 +255,6 @@ AP_DECLARE(int) ap_is_recursion_limit_exceeded(const request_rec *r);
* Check for a definition from the server command line * Check for a definition from the server command line
* @param name The define to check for * @param name The define to check for
* @return 1 if defined, 0 otherwise * @return 1 if defined, 0 otherwise
* @deffunc int ap_exists_config_define(const char *name)
*/ */
AP_DECLARE(int) ap_exists_config_define(const char *name); AP_DECLARE(int) ap_exists_config_define(const char *name);
/* FIXME! See STATUS about how */ /* FIXME! See STATUS about how */
@ -245,9 +266,13 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r);
* to maintain common state for all of them in the core, and make it * to maintain common state for all of them in the core, and make it
* available to the other modules through interfaces. * available to the other modules through interfaces.
*/ */
/** @see require_line */
typedef struct require_line require_line; typedef struct require_line require_line;
/** A structure to keep track of authorization requirements */ /**
* @brief A structure to keep track of authorization requirements
*/
struct require_line { struct require_line {
/** Where the require line is in the config file. */ /** Where the require line is in the config file. */
apr_int64_t method_mask; apr_int64_t method_mask;
@ -259,7 +284,6 @@ struct require_line {
* Return the type of authorization required for this request * Return the type of authorization required for this request
* @param r The current request * @param r The current request
* @return The authorization required * @return The authorization required
* @deffunc const char *ap_auth_type(request_rec *r)
*/ */
AP_DECLARE(const char *) ap_auth_type(request_rec *r); AP_DECLARE(const char *) ap_auth_type(request_rec *r);
@ -267,7 +291,6 @@ AP_DECLARE(const char *) ap_auth_type(request_rec *r);
* Return the current Authorization realm * Return the current Authorization realm
* @param r The current request * @param r The current request
* @return The current authorization realm * @return The current authorization realm
* @deffunc const char *ap_auth_name(request_rec *r)
*/ */
AP_DECLARE(const char *) ap_auth_name(request_rec *r); AP_DECLARE(const char *) ap_auth_name(request_rec *r);
@ -280,7 +303,6 @@ AP_DECLARE(const char *) ap_auth_name(request_rec *r);
* SATISFY_ALL -- all of the requirements must be met. * SATISFY_ALL -- all of the requirements must be met.
* SATISFY_NOSPEC -- There are no applicable satisfy lines * SATISFY_NOSPEC -- There are no applicable satisfy lines
* </pre> * </pre>
* @deffunc int ap_satisfies(request_rec *r)
*/ */
AP_DECLARE(int) ap_satisfies(request_rec *r); AP_DECLARE(int) ap_satisfies(request_rec *r);
@ -288,35 +310,34 @@ AP_DECLARE(int) ap_satisfies(request_rec *r);
* Retrieve information about all of the requires directives for this request * Retrieve information about all of the requires directives for this request
* @param r The current request * @param r The current request
* @return An array of all requires directives for this request * @return An array of all requires directives for this request
* @deffunc const apr_array_header_t *ap_requires(request_rec *r)
*/ */
AP_DECLARE(const apr_array_header_t *) ap_requires(request_rec *r); AP_DECLARE(const apr_array_header_t *) ap_requires(request_rec *r);
#ifdef CORE_PRIVATE #ifdef CORE_PRIVATE
/* /**
* Core is also unlike other modules in being implemented in more than * Core is also unlike other modules in being implemented in more than
* one file... so, data structures are declared here, even though most of * one file... so, data structures are declared here, even though most of
* the code that cares really is in http_core.c. Also, another accessor. * the code that cares really is in http_core.c. Also, another accessor.
*/ */
AP_DECLARE_DATA extern module core_module; AP_DECLARE_DATA extern module core_module;
/* Per-request configuration */ /**
* @brief Per-request configuration
*/
typedef struct { typedef struct {
/* bucket brigade used by getline for look-ahead and /** bucket brigade used by getline for look-ahead and
* ap_get_client_block for holding left-over request body */ * ap_get_client_block for holding left-over request body */
struct apr_bucket_brigade *bb; struct apr_bucket_brigade *bb;
/* an array of per-request working data elements, accessed /** an array of per-request working data elements, accessed
* by ID using ap_get_request_note() * by ID using ap_get_request_note()
* (Use ap_register_request_note() during initialization * (Use ap_register_request_note() during initialization
* to add elements) * to add elements)
*/ */
void **notes; void **notes;
/* There is a script processor installed on the output filter chain, /** There is a script processor installed on the output filter chain,
* so it needs the default_handler to deliver a (script) file into * so it needs the default_handler to deliver a (script) file into
* the chain so it can process it. Normally, default_handler only * the chain so it can process it. Normally, default_handler only
* serves files on a GET request (assuming the file is actual content), * serves files on a GET request (assuming the file is actual content),
@ -326,13 +347,13 @@ typedef struct {
*/ */
int deliver_script; int deliver_script;
/* Custom response strings registered via ap_custom_response(), /** Custom response strings registered via ap_custom_response(),
* or NULL; check per-dir config if nothing found here * or NULL; check per-dir config if nothing found here
*/ */
char **response_code_strings; /* from ap_custom_response(), not from char **response_code_strings; /* from ap_custom_response(), not from
* ErrorDocument * ErrorDocument
*/ */
/* Should addition of charset= be suppressed for this request? /** Should addition of charset= be suppressed for this request?
*/ */
int suppress_charset; int suppress_charset;
} core_request_config; } core_request_config;
@ -371,7 +392,6 @@ AP_DECLARE(apr_size_t) ap_register_request_note(void);
*/ */
AP_DECLARE(void **) ap_get_request_note(request_rec *r, apr_size_t note_num); AP_DECLARE(void **) ap_get_request_note(request_rec *r, apr_size_t note_num);
/* Per-directory configuration */
typedef unsigned char allow_options_t; typedef unsigned char allow_options_t;
typedef unsigned char overrides_t; typedef unsigned char overrides_t;
@ -392,6 +412,9 @@ typedef unsigned long etag_components_t;
#define ETAG_BACKWARD (ETAG_MTIME | ETAG_INODE | ETAG_SIZE) #define ETAG_BACKWARD (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
#define ETAG_ALL (ETAG_MTIME | ETAG_INODE | ETAG_SIZE) #define ETAG_ALL (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
/**
* @brief Server Signature Enumeration
*/
typedef enum { typedef enum {
srv_sig_unset, srv_sig_unset,
srv_sig_off, srv_sig_off,
@ -399,13 +422,16 @@ typedef enum {
srv_sig_withmail srv_sig_withmail
} server_signature_e; } server_signature_e;
/**
* @brief Per-directory configuration
*/
typedef struct { typedef struct {
/* path of the directory/regex/etc. see also d_is_fnmatch/absolute below */ /** path of the directory/regex/etc. see also d_is_fnmatch/absolute below */
char *d; char *d;
/* the number of slashes in d */ /** the number of slashes in d */
unsigned d_components; unsigned d_components;
/* If (opts & OPT_UNSET) then no absolute assignment to options has /** If (opts & OPT_UNSET) then no absolute assignment to options has
* been made. * been made.
* invariant: (opts_add & opts_remove) == 0 * invariant: (opts_add & opts_remove) == 0
* Which said another way means that the last relative (options + or -) * Which said another way means that the last relative (options + or -)
@ -659,3 +685,4 @@ APR_DECLARE_OPTIONAL_FN(const char *, ap_ident_lookup,
#endif #endif
#endif /* !APACHE_HTTP_CORE_H */ #endif /* !APACHE_HTTP_CORE_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_log.h
* @brief Apache Logging library
*
* @defgroup APACHE_CORE_LOG Logging library
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_LOG_H #ifndef APACHE_HTTP_LOG_H
#define APACHE_HTTP_LOG_H #define APACHE_HTTP_LOG_H
@ -23,10 +32,6 @@ extern "C" {
#include "apr_thread_proc.h" #include "apr_thread_proc.h"
/**
* @package Apache logging library
*/
#ifdef HAVE_SYSLOG #ifdef HAVE_SYSLOG
#include <syslog.h> #include <syslog.h>
@ -110,7 +115,7 @@ AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
* @param plog The pool to allocate the logs from * @param plog The pool to allocate the logs from
* @param ptemp Pool used for temporary allocations * @param ptemp Pool used for temporary allocations
* @param s_main The main server * @param s_main The main server
* @tip ap_open_logs isn't expected to be used by modules, it is * @note ap_open_logs isn't expected to be used by modules, it is
* an internal core function * an internal core function
*/ */
int ap_open_logs(apr_pool_t *pconf, apr_pool_t *plog, int ap_open_logs(apr_pool_t *pconf, apr_pool_t *plog,
@ -123,7 +128,7 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *plog,
* processes. * processes.
* @param p Not used * @param p Not used
* @param s Not used * @param s Not used
* @tip ap_logs_child_init is not for use by modules; it is an * @note ap_logs_child_init is not for use by modules; it is an
* internal core function * internal core function
*/ */
void ap_logs_child_init(apr_pool_t *p, server_rec *s); void ap_logs_child_init(apr_pool_t *p, server_rec *s);
@ -151,8 +156,8 @@ void ap_logs_child_init(apr_pool_t *p, server_rec *s);
* @param s The server on which we are logging * @param s The server on which we are logging
* @param fmt The format string * @param fmt The format string
* @param ... The arguments to use to fill out fmt. * @param ... The arguments to use to fill out fmt.
* @tip Use APLOG_MARK to fill out file and line * @note Use APLOG_MARK to fill out file and line
* @tip If a request_rec is available, use that with ap_log_rerror() * @note If a request_rec is available, use that with ap_log_rerror()
* in preference to calling this function. Otherwise, if a conn_rec is * in preference to calling this function. Otherwise, if a conn_rec is
* available, use that with ap_log_cerror() in preference to calling * available, use that with ap_log_cerror() in preference to calling
* this function. * this function.
@ -162,7 +167,6 @@ void ap_logs_child_init(apr_pool_t *p, server_rec *s);
* denial-of-service attack and other messy behavior. Instead, use a * denial-of-service attack and other messy behavior. Instead, use a
* simple format string like "%s", followed by the string containing the * simple format string like "%s", followed by the string containing the
* untrusted data. * untrusted data.
* @deffunc void ap_log_error(const char *file, int line, int level, apr_status_t status, const server_rec *s, const char *fmt, ...)
*/ */
AP_DECLARE(void) ap_log_error(const char *file, int line, int level, AP_DECLARE(void) ap_log_error(const char *file, int line, int level,
apr_status_t status, const server_rec *s, apr_status_t status, const server_rec *s,
@ -180,14 +184,13 @@ AP_DECLARE(void) ap_log_error(const char *file, int line, int level,
* @param p The pool which we are logging for * @param p The pool which we are logging for
* @param fmt The format string * @param fmt The format string
* @param ... The arguments to use to fill out fmt. * @param ... The arguments to use to fill out fmt.
* @tip Use APLOG_MARK to fill out file and line * @note Use APLOG_MARK to fill out file and line
* @warning It is VERY IMPORTANT that you not include any raw data from * @warning It is VERY IMPORTANT that you not include any raw data from
* the network, such as the request-URI or request header fields, within * the network, such as the request-URI or request header fields, within
* the format string. Doing so makes the server vulnerable to a * the format string. Doing so makes the server vulnerable to a
* denial-of-service attack and other messy behavior. Instead, use a * denial-of-service attack and other messy behavior. Instead, use a
* simple format string like "%s", followed by the string containing the * simple format string like "%s", followed by the string containing the
* untrusted data. * untrusted data.
* @deffunc void ap_log_perror(const char *file, int line, int level, apr_status_t status, apr_pool_t *p, const char *fmt, ...)
*/ */
AP_DECLARE(void) ap_log_perror(const char *file, int line, int level, AP_DECLARE(void) ap_log_perror(const char *file, int line, int level,
apr_status_t status, apr_pool_t *p, apr_status_t status, apr_pool_t *p,
@ -205,14 +208,13 @@ AP_DECLARE(void) ap_log_perror(const char *file, int line, int level,
* @param r The request which we are logging for * @param r The request which we are logging for
* @param fmt The format string * @param fmt The format string
* @param ... The arguments to use to fill out fmt. * @param ... The arguments to use to fill out fmt.
* @tip Use APLOG_MARK to fill out file and line * @note Use APLOG_MARK to fill out file and line
* @warning It is VERY IMPORTANT that you not include any raw data from * @warning It is VERY IMPORTANT that you not include any raw data from
* the network, such as the request-URI or request header fields, within * the network, such as the request-URI or request header fields, within
* the format string. Doing so makes the server vulnerable to a * the format string. Doing so makes the server vulnerable to a
* denial-of-service attack and other messy behavior. Instead, use a * denial-of-service attack and other messy behavior. Instead, use a
* simple format string like "%s", followed by the string containing the * simple format string like "%s", followed by the string containing the
* untrusted data. * untrusted data.
* @deffunc void ap_log_rerror(const char *file, int line, int level, apr_status_t status, const request_rec *r, const char *fmt, ...)
*/ */
AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level, AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level,
apr_status_t status, const request_rec *r, apr_status_t status, const request_rec *r,
@ -230,8 +232,8 @@ AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level,
* @param c The connection which we are logging for * @param c The connection which we are logging for
* @param fmt The format string * @param fmt The format string
* @param ... The arguments to use to fill out fmt. * @param ... The arguments to use to fill out fmt.
* @tip Use APLOG_MARK to fill out file and line * @note Use APLOG_MARK to fill out file and line
* @tip If a request_rec is available, use that with ap_log_rerror() * @note If a request_rec is available, use that with ap_log_rerror()
* in preference to calling this function. * in preference to calling this function.
* @warning It is VERY IMPORTANT that you not include any raw data from * @warning It is VERY IMPORTANT that you not include any raw data from
* the network, such as the request-URI or request header fields, within * the network, such as the request-URI or request header fields, within
@ -239,7 +241,6 @@ AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level,
* denial-of-service attack and other messy behavior. Instead, use a * denial-of-service attack and other messy behavior. Instead, use a
* simple format string like "%s", followed by the string containing the * simple format string like "%s", followed by the string containing the
* untrusted data. * untrusted data.
* @deffunc void ap_log_cerror(const char *file, int line, int level, apr_status_t status, const conn_rec *c, const char *fmt, ...)
*/ */
AP_DECLARE(void) ap_log_cerror(const char *file, int line, int level, AP_DECLARE(void) ap_log_cerror(const char *file, int line, int level,
apr_status_t status, const conn_rec *c, apr_status_t status, const conn_rec *c,
@ -249,7 +250,6 @@ AP_DECLARE(void) ap_log_cerror(const char *file, int line, int level,
/** /**
* Convert stderr to the error log * Convert stderr to the error log
* @param s The current server * @param s The current server
* @deffunc void ap_error_log2stderr(server_rec *s)
*/ */
AP_DECLARE(void) ap_error_log2stderr(server_rec *s); AP_DECLARE(void) ap_error_log2stderr(server_rec *s);
@ -268,11 +268,14 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *fname);
*/ */
AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const char *filename, pid_t *mypid); AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const char *filename, pid_t *mypid);
/** @see piped_log */
typedef struct piped_log piped_log; typedef struct piped_log piped_log;
/** /**
* The piped logging structure. Piped logs are used to move functionality * @brief The piped logging structure.
* out of the main server. For example, log rotation is done with piped logs. *
* Piped logs are used to move functionality out of the main server.
* For example, log rotation is done with piped logs.
*/ */
struct piped_log { struct piped_log {
/** The pool to use for the piped log */ /** The pool to use for the piped log */
@ -294,14 +297,12 @@ struct piped_log {
* @param p The pool to allocate out of * @param p The pool to allocate out of
* @param program The program to run in the logging process * @param program The program to run in the logging process
* @return The piped log structure * @return The piped log structure
* @deffunc piped_log *ap_open_piped_log(apr_pool_t *p, const char *program)
*/ */
AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program); AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program);
/** /**
* Close the piped log and kill the logging process * Close the piped log and kill the logging process
* @param pl The piped log structure * @param pl The piped log structure
* @deffunc void ap_close_piped_log(piped_log *pl)
*/ */
AP_DECLARE(void) ap_close_piped_log(piped_log *pl); AP_DECLARE(void) ap_close_piped_log(piped_log *pl);
@ -309,7 +310,6 @@ AP_DECLARE(void) ap_close_piped_log(piped_log *pl);
* A macro to access the read side of the piped log pipe * A macro to access the read side of the piped log pipe
* @param pl The piped log structure * @param pl The piped log structure
* @return The native file descriptor * @return The native file descriptor
* @deffunc ap_piped_log_read_fd(pl)
*/ */
#define ap_piped_log_read_fd(pl) ((pl)->fds[0]) #define ap_piped_log_read_fd(pl) ((pl)->fds[0])
@ -317,10 +317,21 @@ AP_DECLARE(void) ap_close_piped_log(piped_log *pl);
* A macro to access the write side of the piped log pipe * A macro to access the write side of the piped log pipe
* @param pl The piped log structure * @param pl The piped log structure
* @return The native file descriptor * @return The native file descriptor
* @deffunc ap_piped_log_read_fd(pl)
*/ */
#define ap_piped_log_write_fd(pl) ((pl)->fds[1]) #define ap_piped_log_write_fd(pl) ((pl)->fds[1])
/**
* hook method to log error messages
* @ingroup hooks
* @param file The file in which this function is called
* @param line The line number on which this function is called
* @param level The level of this error message
* @param status The status code from the previous command
* @param s The server which we are logging for
* @param r The request which we are logging for
* @param pool Memory pool to allocate from
* @param errstr message to log
*/
AP_DECLARE_HOOK(void, error_log, (const char *file, int line, int level, AP_DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
apr_status_t status, const server_rec *s, apr_status_t status, const server_rec *s,
const request_rec *r, apr_pool_t *pool, const request_rec *r, apr_pool_t *pool,
@ -331,3 +342,4 @@ AP_DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
#endif #endif
#endif /* !APACHE_HTTP_LOG_H */ #endif /* !APACHE_HTTP_LOG_H */
/** @} */

View File

@ -14,12 +14,21 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_main.h
* @brief Command line options
*
* @defgroup APACHE_CORE_MAIN Command line options
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_MAIN_H #ifndef APACHE_HTTP_MAIN_H
#define APACHE_HTTP_MAIN_H #define APACHE_HTTP_MAIN_H
#include "apr_optional.h" #include "apr_optional.h"
/* AP_SERVER_BASEARGS is the command argument list parsed by http_main.c /** AP_SERVER_BASEARGS is the command argument list parsed by http_main.c
* in apr_getopt() format. Use this for default'ing args that the MPM * in apr_getopt() format. Use this for default'ing args that the MPM
* can safely ignore and pass on from its rewrite_args() handler. * can safely ignore and pass on from its rewrite_args() handler.
*/ */
@ -29,10 +38,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Command line options
*/
/** The name of the Apache executable */ /** The name of the Apache executable */
AP_DECLARE_DATA extern const char *ap_server_argv0; AP_DECLARE_DATA extern const char *ap_server_argv0;
/** The global server's ServerRoot */ /** The global server's ServerRoot */
@ -49,6 +54,13 @@ AP_DECLARE_DATA extern apr_array_header_t *ap_server_post_read_config;
* effect the server based on command line options */ * effect the server based on command line options */
AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines; AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines;
/**
* An optional function to send signal to server on presence of '-k'
* command line argument.
* Called if MPM defines AP_MPM_WANT_SIGNAL_SERVER
* @param status The exit status after sending signal
* @param pool Memory pool to allocate from
*/
APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *, apr_pool_t *)); APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *, apr_pool_t *));
#ifdef __cplusplus #ifdef __cplusplus
@ -56,3 +68,4 @@ APR_DECLARE_OPTIONAL_FN(int, ap_signal_server, (int *, apr_pool_t *));
#endif #endif
#endif /* !APACHE_HTTP_MAIN_H */ #endif /* !APACHE_HTTP_MAIN_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_protocol.h
* @brief HTTP protocol handling
*
* @defgroup APACHE_CORE_PROTO HTTP Protocol Handling
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_PROTOCOL_H #ifndef APACHE_HTTP_PROTOCOL_H
#define APACHE_HTTP_PROTOCOL_H #define APACHE_HTTP_PROTOCOL_H
@ -28,10 +37,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package HTTP protocol handling
*/
/** /**
* This hook allows modules to insert filters for the current error response * This hook allows modules to insert filters for the current error response
* @param r the current request * @param r the current request
@ -39,7 +44,7 @@ extern "C" {
*/ */
AP_DECLARE_HOOK(void,insert_error_filter,(request_rec *r)) AP_DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
/* This is an optimization. We keep a record of the filter_rec that /** This is an optimization. We keep a record of the filter_rec that
* stores the old_write filter, so that we can avoid strcmp's later. * stores the old_write filter, so that we can avoid strcmp's later.
*/ */
AP_DECLARE_DATA extern ap_filter_rec_t *ap_old_write_func; AP_DECLARE_DATA extern ap_filter_rec_t *ap_old_write_func;
@ -77,7 +82,6 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r,
* Called at completion of sending the response. It sends the terminating * Called at completion of sending the response. It sends the terminating
* protocol information. * protocol information.
* @param r The current request * @param r The current request
* @deffunc void ap_finalize_request_protocol(request_rec *r)
*/ */
AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r); AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r);
@ -89,7 +93,6 @@ AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r);
* to handle some other error. In that case, we print the default * to handle some other error. In that case, we print the default
* report for the first thing that went wrong, and more briefly report * report for the first thing that went wrong, and more briefly report
* on the problem with the ErrorDocument. * on the problem with the ErrorDocument.
* @deffunc void ap_send_error_response(request_rec *r, int recursive_error)
*/ */
AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error); AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);
@ -104,7 +107,6 @@ AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);
* Set the content length for this request * Set the content length for this request
* @param r The current request * @param r The current request
* @param length The new content length * @param length The new content length
* @deffunc void ap_set_content_length(request_rec *r, apr_off_t length)
*/ */
AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t length); AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t length);
@ -112,7 +114,6 @@ AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t length);
* Set the keepalive status for this request * Set the keepalive status for this request
* @param r The current request * @param r The current request
* @return 1 if keepalive can be set, 0 otherwise * @return 1 if keepalive can be set, 0 otherwise
* @deffunc int ap_set_keepalive(request_rec *r)
*/ */
AP_DECLARE(int) ap_set_keepalive(request_rec *r); AP_DECLARE(int) ap_set_keepalive(request_rec *r);
@ -122,7 +123,6 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r);
* @param r The current request * @param r The current request
* @param mtime The last modified time * @param mtime The last modified time
* @return the latest rational time. * @return the latest rational time.
* @deffunc apr_time_t ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
*/ */
AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime); AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
@ -134,8 +134,8 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);
* - then, if there are no parameters on type, add the default charset * - then, if there are no parameters on type, add the default charset
* - return type * - return type
* @param r The current request * @param r The current request
* @param type The content type
* @return The content-type * @return The content-type
* @deffunc const char *ap_make_content_type(request_rec *r, const char *type);
*/ */
AP_DECLARE(const char *) ap_make_content_type(request_rec *r, AP_DECLARE(const char *) ap_make_content_type(request_rec *r,
const char *type); const char *type);
@ -143,8 +143,7 @@ AP_DECLARE(const char *) ap_make_content_type(request_rec *r,
#ifdef CORE_PRIVATE #ifdef CORE_PRIVATE
/** /**
* Precompile metadata structures used by ap_make_content_type() * Precompile metadata structures used by ap_make_content_type()
* @param r The pool to use for allocations * @param pool The pool to use for allocations
* @deffunc void ap_setup_make_content_type(apr_pool_t *pool)
*/ */
AP_DECLARE(void) ap_setup_make_content_type(apr_pool_t *pool); AP_DECLARE(void) ap_setup_make_content_type(apr_pool_t *pool);
#endif /* CORE_PRIVATE */ #endif /* CORE_PRIVATE */
@ -156,21 +155,18 @@ AP_DECLARE(void) ap_setup_make_content_type(apr_pool_t *pool);
* @param force_weak Force the entity tag to be weak - it could be modified * @param force_weak Force the entity tag to be weak - it could be modified
* again in as short an interval. * again in as short an interval.
* @return The entity tag * @return The entity tag
* @deffunc char *ap_make_etag(request_rec *r, int force_weak)
*/ */
AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak); AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak);
/** /**
* Set the E-tag outgoing header * Set the E-tag outgoing header
* @param The current request * @param r The current request
* @deffunc void ap_set_etag(request_rec *r)
*/ */
AP_DECLARE(void) ap_set_etag(request_rec *r); AP_DECLARE(void) ap_set_etag(request_rec *r);
/** /**
* Set the last modified time for the file being sent * Set the last modified time for the file being sent
* @param r The current request * @param r The current request
* @deffunc void ap_set_last_modified(request_rec *r)
*/ */
AP_DECLARE(void) ap_set_last_modified(request_rec *r); AP_DECLARE(void) ap_set_last_modified(request_rec *r);
@ -181,7 +177,6 @@ AP_DECLARE(void) ap_set_last_modified(request_rec *r);
* @param r The current request * @param r The current request
* @return OK if the response fulfills the condition GET rules, some * @return OK if the response fulfills the condition GET rules, some
* other status code otherwise * other status code otherwise
* @deffunc int ap_meets_conditions(request_rec *r)
*/ */
AP_DECLARE(int) ap_meets_conditions(request_rec *r); AP_DECLARE(int) ap_meets_conditions(request_rec *r);
@ -204,7 +199,6 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r);
* @param offset Offset into the file to start sending. * @param offset Offset into the file to start sending.
* @param length Amount of data to send * @param length Amount of data to send
* @param nbytes Amount of data actually sent * @param nbytes Amount of data actually sent
* @deffunc apr_status_t ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, apr_size_t length, apr_size_t *nbytes);
*/ */
AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset, AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t offset,
apr_size_t length, apr_size_t *nbytes); apr_size_t length, apr_size_t *nbytes);
@ -217,7 +211,6 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of
* @param offset The offset into the MMAP to start sending * @param offset The offset into the MMAP to start sending
* @param length The amount of data to send * @param length The amount of data to send
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc size_t ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, size_t length)
*/ */
AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset, AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
size_t length); size_t length);
@ -241,7 +234,7 @@ AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname);
*/ */
AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p); AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p);
/* /**
* This is a convenience macro to ease with checking a mask * This is a convenience macro to ease with checking a mask
* against a method name. * against a method name.
*/ */
@ -256,9 +249,16 @@ AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p);
* allocated. * allocated.
* @param nelts Number of preallocated extension slots * @param nelts Number of preallocated extension slots
* @return Pointer to the newly created structure. * @return Pointer to the newly created structure.
* @deffunc ap_method_list_t ap_make_method_list(apr_pool_t *p, int nelts)
*/ */
AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts); AP_DECLARE(ap_method_list_t *) ap_make_method_list(apr_pool_t *p, int nelts);
/**
* Copy a method list
*
* @param dest List to copy to
* @param src List to copy from
*/
AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest, AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
ap_method_list_t *src); ap_method_list_t *src);
@ -269,7 +269,6 @@ AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
* @param method String containing the name of the method to check. * @param method String containing the name of the method to check.
* @param l Pointer to a method list, such as cmd->methods_limited. * @param l Pointer to a method list, such as cmd->methods_limited.
* @return 1 if method is in the list, otherwise 0 * @return 1 if method is in the list, otherwise 0
* @deffunc int ap_method_in_list(const char *method, ap_method_list_t *l)
*/ */
AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method); AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
@ -280,7 +279,6 @@ AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method);
* @param method String containing the name of the method to check. * @param method String containing the name of the method to check.
* @param l Pointer to a method list, such as cmd->methods_limited. * @param l Pointer to a method list, such as cmd->methods_limited.
* @return None. * @return None.
* @deffunc void ap_method_in_list(ap_method_list_t *l, const char *method)
*/ */
AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method); AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
@ -290,7 +288,6 @@ AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method);
* @param l Pointer to a method list, such as cmd->methods_limited. * @param l Pointer to a method list, such as cmd->methods_limited.
* @param method String containing the name of the method to remove. * @param method String containing the name of the method to remove.
* @return None. * @return None.
* @deffunc void ap_method_list_remove(ap_method_list_t *l, const char *method)
*/ */
AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l, AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
const char *method); const char *method);
@ -300,7 +297,6 @@ AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
* *
* @param l Pointer to a method list, such as cmd->methods_limited. * @param l Pointer to a method list, such as cmd->methods_limited.
* @return None. * @return None.
* @deffunc void ap_clear_method_list(ap_method_list_t *l)
*/ */
AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l); AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
@ -308,7 +304,6 @@ AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l);
* Set the content type for this request (r->content_type). * Set the content type for this request (r->content_type).
* @param r The current request * @param r The current request
* @param ct The new content type * @param ct The new content type
* @deffunc void ap_set_content_type(request_rec *r, const char* ct)
* @warning This function must be called to set r->content_type in order * @warning This function must be called to set r->content_type in order
* for the AddOutputFilterByType directive to work correctly. * for the AddOutputFilterByType directive to work correctly.
*/ */
@ -323,7 +318,6 @@ AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct);
* @param c the character to output * @param c the character to output
* @param r the current request * @param r the current request
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_rputc(int c, request_rec *r)
*/ */
AP_DECLARE(int) ap_rputc(int c, request_rec *r); AP_DECLARE(int) ap_rputc(int c, request_rec *r);
@ -332,7 +326,6 @@ AP_DECLARE(int) ap_rputc(int c, request_rec *r);
* @param str The string to output * @param str The string to output
* @param r The current request * @param r The current request
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_rputs(const char *str, request_rec *r)
*/ */
AP_DECLARE(int) ap_rputs(const char *str, request_rec *r); AP_DECLARE(int) ap_rputs(const char *str, request_rec *r);
@ -342,7 +335,6 @@ AP_DECLARE(int) ap_rputs(const char *str, request_rec *r);
* @param nbyte The number of bytes to send from the buffer * @param nbyte The number of bytes to send from the buffer
* @param r The current request * @param r The current request
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_rwrite(const void *buf, int nbyte, request_rec *r)
*/ */
AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r); AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
@ -351,7 +343,6 @@ AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
* @param r The current request * @param r The current request
* @param ... The strings to write * @param ... The strings to write
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_rvputs(request_rec *r, ...)
*/ */
AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...); AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);
@ -361,7 +352,6 @@ AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...);
* @param fmt The format string * @param fmt The format string
* @param vlist The arguments to use to fill out the format string * @param vlist The arguments to use to fill out the format string
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_vrprintf(request_rec *r, const char *fmt, va_list vlist)
*/ */
AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist); AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
@ -371,15 +361,14 @@ AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
* @param fmt The format string * @param fmt The format string
* @param ... The arguments to use to fill out the format string * @param ... The arguments to use to fill out the format string
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_rprintf(request_rec *r, const char *fmt, ...)
*/ */
AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...) AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
__attribute__((format(printf,2,3))); __attribute__((format(printf,2,3)));
/** /**
* Flush all of the data for the current request to the client * Flush all of the data for the current request to the client
* @param r The current request * @param r The current request
* @return The number of bytes sent * @return The number of bytes sent
* @deffunc int ap_rflush(request_rec *r)
*/ */
AP_DECLARE(int) ap_rflush(request_rec *r); AP_DECLARE(int) ap_rflush(request_rec *r);
@ -388,7 +377,6 @@ AP_DECLARE(int) ap_rflush(request_rec *r);
* (only use outside protocol.c is in getting them configured). * (only use outside protocol.c is in getting them configured).
* @param status HTTP status code * @param status HTTP status code
* @return The index of the response * @return The index of the response
* @deffunc int ap_index_of_response(int status)
*/ */
AP_DECLARE(int) ap_index_of_response(int status); AP_DECLARE(int) ap_index_of_response(int status);
@ -398,7 +386,6 @@ AP_DECLARE(int) ap_index_of_response(int status);
* passed, "500 Internal Server Error" will be returned. * passed, "500 Internal Server Error" will be returned.
* @param status The HTTP status code * @param status The HTTP status code
* @return The Status-Line * @return The Status-Line
* @deffunc const char *ap_get_status_line(int status)
*/ */
AP_DECLARE(const char *) ap_get_status_line(int status); AP_DECLARE(const char *) ap_get_status_line(int status);
@ -414,7 +401,6 @@ AP_DECLARE(const char *) ap_get_status_line(int status);
* REQUEST_CHUNKED_DECHUNK If chunked, remove the chunks for me. * REQUEST_CHUNKED_DECHUNK If chunked, remove the chunks for me.
* </pre> * </pre>
* @return either OK or an error code * @return either OK or an error code
* @deffunc int ap_setup_client_block(request_rec *r, int read_policy)
*/ */
AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy); AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
@ -425,7 +411,6 @@ AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy);
* @warning Never call this function more than once. * @warning Never call this function more than once.
* @param r The current request * @param r The current request
* @return 0 if there is no message to read, 1 otherwise * @return 0 if there is no message to read, 1 otherwise
* @deffunc int ap_should_client_block(request_rec *r)
*/ */
AP_DECLARE(int) ap_should_client_block(request_rec *r); AP_DECLARE(int) ap_should_client_block(request_rec *r);
@ -437,7 +422,6 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r);
* @param bufsiz The size of the buffer * @param bufsiz The size of the buffer
* @return Number of bytes inserted into the buffer. When done reading, 0 * @return Number of bytes inserted into the buffer. When done reading, 0
* if EOF, or -1 if there was an error * if EOF, or -1 if there was an error
* @deffunc long ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz)
*/ */
AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz); AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);
@ -450,17 +434,14 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bu
* as the next request on a persistent connection. * as the next request on a persistent connection.
* @param r The current request * @param r The current request
* @return error status if request is malformed, OK otherwise * @return error status if request is malformed, OK otherwise
* @deffunc int ap_discard_request_body(request_rec *r)
*/ */
AP_DECLARE(int) ap_discard_request_body(request_rec *r); AP_DECLARE(int) ap_discard_request_body(request_rec *r);
/** /**
* Setup the output headers so that the client knows how to authenticate * Setup the output headers so that the client knows how to authenticate
* itself the next time, if an authentication request failed. This function * itself the next time, if an authentication request failed. This function
* works for both basic and digest authentication * works for both basic and digest authentication
* @param r The current request * @param r The current request
* @deffunc void ap_note_auth_failure(request_rec *r)
*/ */
AP_DECLARE(void) ap_note_auth_failure(request_rec *r); AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
@ -469,7 +450,6 @@ AP_DECLARE(void) ap_note_auth_failure(request_rec *r);
* itself the next time, if an authentication request failed. This function * itself the next time, if an authentication request failed. This function
* works only for basic authentication * works only for basic authentication
* @param r The current request * @param r The current request
* @deffunc void ap_note_basic_auth_failure(request_rec *r)
*/ */
AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r); AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
@ -478,7 +458,6 @@ AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r);
* itself the next time, if an authentication request failed. This function * itself the next time, if an authentication request failed. This function
* works only for digest authentication * works only for digest authentication
* @param r The current request * @param r The current request
* @deffunc void ap_note_digest_auth_failure(request_rec *r)
*/ */
AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r); AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
@ -493,20 +472,17 @@ AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r);
* seemed to be in use, or DECLINED if there was authentication but * seemed to be in use, or DECLINED if there was authentication but
* it wasn't Basic (in which case, the caller should presumably * it wasn't Basic (in which case, the caller should presumably
* decline as well). * decline as well).
* @deffunc int ap_get_basic_auth_pw(request_rec *r, const char **pw)
*/ */
AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw); AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
/** /**
* parse_uri: break apart the uri * parse_uri: break apart the uri
* @warning Side Effects: <pre> * @warning Side Effects:
* - sets r->args to rest after '?' (or NULL if no '?') * @li sets r->args to rest after '?' (or NULL if no '?')
* - sets r->uri to request uri (without r->args part) * @li sets r->uri to request uri (without r->args part)
* - sets r->hostname (if not set already) from request (scheme://host:port) * @li sets r->hostname (if not set already) from request (scheme://host:port)
* </pre>
* @param r The current request * @param r The current request
* @param uri The uri to break apart * @param uri The uri to break apart
* @deffunc void ap_parse_uri(request_rec *r, const char *uri)
*/ */
AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri); AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
@ -519,7 +495,6 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
* @return The length of the line, if successful * @return The length of the line, if successful
* n, if the line is too big to fit in the buffer * n, if the line is too big to fit in the buffer
* -1 for miscellaneous errors * -1 for miscellaneous errors
* @deffunc int ap_method_number_of(const char *method)
*/ */
AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold); AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
@ -554,6 +529,8 @@ AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
#define ap_rgetline(s, n, read, r, fold, bb) \ #define ap_rgetline(s, n, read, r, fold, bb) \
ap_rgetline_core((s), (n), (read), (r), (fold), (bb)) ap_rgetline_core((s), (n), (read), (r), (fold), (bb))
#endif #endif
/** @see ap_rgetline */
AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n, AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
apr_size_t *read, apr_size_t *read,
request_rec *r, int fold, request_rec *r, int fold,
@ -588,7 +565,6 @@ AP_DECLARE(const char *) ap_method_name_of(apr_pool_t *p, int methnum);
* modules to make decisions based upon the input header fields * modules to make decisions based upon the input header fields
* @param r The current request * @param r The current request
* @return OK or DECLINED * @return OK or DECLINED
* @deffunc ap_run_post_read_request(request_rec *r)
*/ */
AP_DECLARE_HOOK(int,post_read_request,(request_rec *r)) AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
@ -597,7 +573,6 @@ AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
* over and above the normal server things. * over and above the normal server things.
* @param r The current request * @param r The current request
* @return OK, DECLINED, or HTTP_... * @return OK, DECLINED, or HTTP_...
* @deffunc int ap_run_log_transaction(request_rec *r)
*/ */
AP_DECLARE_HOOK(int,log_transaction,(request_rec *r)) AP_DECLARE_HOOK(int,log_transaction,(request_rec *r))
@ -606,7 +581,6 @@ AP_DECLARE_HOOK(int,log_transaction,(request_rec *r))
* allows Apache modules to easily extend the schemes that Apache understands * allows Apache modules to easily extend the schemes that Apache understands
* @param r The current request * @param r The current request
* @return The http scheme from the request * @return The http scheme from the request
* @deffunc const char *ap_run_http_scheme(const request_rec *r)
*/ */
AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r)) AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))
@ -614,14 +588,16 @@ AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))
* Return the default port from the current request * Return the default port from the current request
* @param r The current request * @param r The current request
* @return The current port * @return The current port
* @deffunc apr_port_t ap_run_default_port(const request_rec *r)
*/ */
AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *r)) AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *r))
/** @see ap_bucket_type_error */
typedef struct ap_bucket_error ap_bucket_error; typedef struct ap_bucket_error ap_bucket_error;
/** /**
* A bucket referring to an HTTP error * @struct ap_bucket_error
* @brief A bucket referring to an HTTP error
*
* This bucket can be passed down the filter stack to indicate that an * This bucket can be passed down the filter stack to indicate that an
* HTTP error occurred while running a filter. In order for this bucket * HTTP error occurred while running a filter. In order for this bucket
* to be used successfully, it MUST be sent as the first bucket in the * to be used successfully, it MUST be sent as the first bucket in the
@ -636,6 +612,7 @@ struct ap_bucket_error {
const char *data; const char *data;
}; };
/** @see ap_bucket_type_error */
AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error; AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;
/** /**
@ -652,7 +629,6 @@ AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_error;
* @param buf An optional error string to put in the bucket. * @param buf An optional error string to put in the bucket.
* @param p A pool to allocate out of. * @param p A pool to allocate out of.
* @return The new bucket, or NULL if allocation failed * @return The new bucket, or NULL if allocation failed
* @deffunc apr_bucket *ap_bucket_error_make(apr_bucket *b, int error, const char *buf, apr_pool_t *p)
*/ */
AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error, AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
const char *buf, apr_pool_t *p); const char *buf, apr_pool_t *p);
@ -664,7 +640,6 @@ AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
* @param p A pool to allocate the error string out of. * @param p A pool to allocate the error string out of.
* @param list The bucket allocator from which to allocate the bucket * @param list The bucket allocator from which to allocate the bucket
* @return The new bucket, or NULL if allocation failed * @return The new bucket, or NULL if allocation failed
* @deffunc apr_bucket *ap_bucket_error_create(int error, const char *buf, apr_pool_t *p, apr_bucket_alloc_t *list)
*/ */
AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf, AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf,
apr_pool_t *p, apr_pool_t *p,
@ -676,11 +651,18 @@ AP_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *,
apr_bucket_brigade *); apr_bucket_brigade *);
AP_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade *b); AP_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade *b);
/* /**
* Setting up the protocol fields for subsidiary requests... * Sett up the protocol fields for subsidiary requests
* Also, a wrapup function to keep the internal accounting straight. * @param rnew New Sub Request
* @param r current request
*/ */
AP_DECLARE(void) ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r); AP_DECLARE(void) ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r);
/**
* A wrapup function to keep the internal accounting straight.
* Indicates that there is no more content coming.
* @param sub_r Subrequest that is now compete
*/
AP_DECLARE(void) ap_finalize_sub_req_protocol(request_rec *sub_r); AP_DECLARE(void) ap_finalize_sub_req_protocol(request_rec *sub_r);
#ifdef __cplusplus #ifdef __cplusplus
@ -688,3 +670,4 @@ AP_DECLARE(void) ap_finalize_sub_req_protocol(request_rec *sub_r);
#endif #endif
#endif /* !APACHE_HTTP_PROTOCOL_H */ #endif /* !APACHE_HTTP_PROTOCOL_H */
/** @} */

View File

@ -14,25 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef APACHE_HTTP_REQUEST_H
#define APACHE_HTTP_REQUEST_H
#include "apr_hooks.h"
#include "util_filter.h"
#ifdef __cplusplus
extern "C" {
#endif
#define AP_SUBREQ_NO_ARGS 0
#define AP_SUBREQ_MERGE_ARGS 1
/** /**
* @file http_request.h * @file http_request.h
* @brief Apache Request library * @brief Apache Request library
*/ *
* request.c is the code which handles the main line of request
/* http_request.c is the code which handles the main line of request
* processing, once a request has been read in (finding the right per- * processing, once a request has been read in (finding the right per-
* directory configuration, building it if necessary, and calling all * directory configuration, building it if necessary, and calling all
* the module dispatch functions in the right order). * the module dispatch functions in the right order).
@ -52,6 +38,19 @@ extern "C" {
* about which was allocated in its apr_pool_t elsewhere before doing this. * about which was allocated in its apr_pool_t elsewhere before doing this.
*/ */
#ifndef APACHE_HTTP_REQUEST_H
#define APACHE_HTTP_REQUEST_H
#include "apr_hooks.h"
#include "util_filter.h"
#ifdef __cplusplus
extern "C" {
#endif
#define AP_SUBREQ_NO_ARGS 0
#define AP_SUBREQ_MERGE_ARGS 1
/** /**
* An internal handler used by the ap_process_request, all subrequest mechanisms * An internal handler used by the ap_process_request, all subrequest mechanisms
* and the redirect mechanism. * and the redirect mechanism.
@ -68,7 +67,6 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r);
* @param next_filter The first filter the sub_request should use. If this is * @param next_filter The first filter the sub_request should use. If this is
* NULL, it defaults to the first filter for the main request * NULL, it defaults to the first filter for the main request
* @return The new request record * @return The new request record
* @deffunc request_rec * ap_sub_req_lookup_uri(const char *new_uri, const request_rec *r)
*/ */
AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_uri, AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_uri,
const request_rec *r, const request_rec *r,
@ -82,7 +80,6 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_uri,
* @param next_filter The first filter the sub_request should use. If this is * @param next_filter The first filter the sub_request should use. If this is
* NULL, it defaults to the first filter for the main request * NULL, it defaults to the first filter for the main request
* @return The new request record * @return The new request record
* @deffunc request_rec * ap_sub_req_lookup_file(const char *new_file, const request_rec *r)
*/ */
AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
const request_rec *r, const request_rec *r,
@ -100,8 +97,7 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
* @param next_filter The first filter the sub_request should use. If this is * @param next_filter The first filter the sub_request should use. If this is
* NULL, it defaults to the first filter for the main request * NULL, it defaults to the first filter for the main request
* @return The new request record * @return The new request record
* @deffunc request_rec * ap_sub_req_lookup_dirent(apr_finfo_t *finfo, int subtype, const request_rec *r) * @note The apr_dir_read flags value APR_FINFO_MIN|APR_FINFO_NAME flag is the
* @tip The apr_dir_read flags value APR_FINFO_MIN|APR_FINFO_NAME flag is the
* minimum recommended query if the results will be passed to apr_dir_read. * minimum recommended query if the results will be passed to apr_dir_read.
* The file info passed must include the name, and must have the same relative * The file info passed must include the name, and must have the same relative
* directory as the current request. * directory as the current request.
@ -119,7 +115,6 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(const apr_finfo_t *finfo,
* @param next_filter The first filter the sub_request should use. If this is * @param next_filter The first filter the sub_request should use. If this is
* NULL, it defaults to the first filter for the main request * NULL, it defaults to the first filter for the main request
* @return The new request record * @return The new request record
* @deffunc request_rec * ap_sub_req_method_uri(const char *method, const char *new_uri, const request_rec *r)
*/ */
AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method, AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
const char *new_uri, const char *new_uri,
@ -130,7 +125,7 @@ AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
* has to be inserted at the end of a sub-requests filter stack. * has to be inserted at the end of a sub-requests filter stack.
* @param f The current filter * @param f The current filter
* @param bb The brigade to filter * @param bb The brigade to filter
* @deffunc apr_status_t ap_sub_req_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) * @return status code
*/ */
AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f, AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f,
apr_bucket_brigade *bb); apr_bucket_brigade *bb);
@ -139,14 +134,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f,
* Run the handler for the subrequest * Run the handler for the subrequest
* @param r The subrequest to run * @param r The subrequest to run
* @return The return code for the subrequest * @return The return code for the subrequest
* @deffunc int ap_run_sub_req(request_rec *r)
*/ */
AP_DECLARE(int) ap_run_sub_req(request_rec *r); AP_DECLARE(int) ap_run_sub_req(request_rec *r);
/** /**
* Free the memory associated with a subrequest * Free the memory associated with a subrequest
* @param r The subrequest to finish * @param r The subrequest to finish
* @deffunc void ap_destroy_sub_req(request_rec *r)
*/ */
AP_DECLARE(void) ap_destroy_sub_req(request_rec *r); AP_DECLARE(void) ap_destroy_sub_req(request_rec *r);
@ -160,7 +153,6 @@ AP_DECLARE(void) ap_destroy_sub_req(request_rec *r);
* Redirect the current request to some other uri * Redirect the current request to some other uri
* @param new_uri The URI to replace the current request with * @param new_uri The URI to replace the current request with
* @param r The current request * @param r The current request
* @deffunc void ap_internal_redirect(const char *new_uri, request_rec *r)
*/ */
AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r); AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r);
@ -170,7 +162,6 @@ AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r);
* an internal redirect. * an internal redirect.
* @param new_uri The URI to replace the current request with. * @param new_uri The URI to replace the current request with.
* @param r The current request * @param r The current request
* @deffunc void ap_internal_redirect_handler(const char *new_uri, request_rec *r)
*/ */
AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r); AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *r);
@ -178,8 +169,7 @@ AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *
* Redirect the current request to a sub_req, merging the pools * Redirect the current request to a sub_req, merging the pools
* @param sub_req A subrequest created from this request * @param sub_req A subrequest created from this request
* @param r The current request * @param r The current request
* @deffunc void ap_internal_fast_redirect(request_rec *sub_req, request_rec *r) * @note the sub_req's pool will be merged into r's pool, be very careful
* @tip the sub_req's pool will be merged into r's pool, be very careful
* not to destroy this subrequest, it will be destroyed with the main request! * not to destroy this subrequest, it will be destroyed with the main request!
*/ */
AP_DECLARE(void) ap_internal_fast_redirect(request_rec *sub_req, request_rec *r); AP_DECLARE(void) ap_internal_fast_redirect(request_rec *sub_req, request_rec *r);
@ -189,7 +179,6 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *sub_req, request_rec *r)
* is required for the current request * is required for the current request
* @param r The current request * @param r The current request
* @return 1 if authentication is required, 0 otherwise * @return 1 if authentication is required, 0 otherwise
* @deffunc int ap_some_auth_required(request_rec *r)
*/ */
AP_DECLARE(int) ap_some_auth_required(request_rec *r); AP_DECLARE(int) ap_some_auth_required(request_rec *r);
@ -197,7 +186,6 @@ AP_DECLARE(int) ap_some_auth_required(request_rec *r);
* Determine if the current request is the main request or a subrequest * Determine if the current request is the main request or a subrequest
* @param r The current request * @param r The current request
* @return 1 if this is the main request, 0 otherwise * @return 1 if this is the main request, 0 otherwise
* @deffunc int ap_is_initial_req(request_rec *r)
*/ */
AP_DECLARE(int) ap_is_initial_req(request_rec *r); AP_DECLARE(int) ap_is_initial_req(request_rec *r);
@ -205,8 +193,7 @@ AP_DECLARE(int) ap_is_initial_req(request_rec *r);
* Function to set the r->mtime field to the specified value if it's later * Function to set the r->mtime field to the specified value if it's later
* than what's already there. * than what's already there.
* @param r The current request * @param r The current request
* @param dependency_time Time to set the mtime to * @param dependency_mtime Time to set the mtime to
* @deffunc void ap_update_mtime(request_rec *r, apr_time_t dependency_mtime)
*/ */
AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime); AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime);
@ -224,7 +211,6 @@ AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime);
* @param ... A NULL-terminated list of strings, each identifying a * @param ... A NULL-terminated list of strings, each identifying a
* method name to add. * method name to add.
* @return None. * @return None.
* @deffunc void ap_allow_methods(request_rec *r, int reset, ...)
*/ */
AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...); AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...);
@ -243,7 +229,6 @@ AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...);
* defined in httpd.h, terminated with a value of -1 * defined in httpd.h, terminated with a value of -1
* (e.g., "M_GET, M_POST, M_OPTIONS, -1") * (e.g., "M_GET, M_POST, M_OPTIONS, -1")
* @return None. * @return None.
* @deffunc void ap_allow_standard_methods(request_rec *r, int reset, ...)
*/ */
AP_DECLARE(void) ap_allow_standard_methods(request_rec *r, int reset, ...); AP_DECLARE(void) ap_allow_standard_methods(request_rec *r, int reset, ...);
@ -251,13 +236,16 @@ AP_DECLARE(void) ap_allow_standard_methods(request_rec *r, int reset, ...);
#define REPLACE_ALLOW 1 #define REPLACE_ALLOW 1
#ifdef CORE_PRIVATE #ifdef CORE_PRIVATE
/* Function called by main.c to handle first-level request */ /**
* Function called by main.c to handle first-level request
* @param r The current request
*/
void ap_process_request(request_rec *); void ap_process_request(request_rec *);
/** /**
* Kill the current request * Kill the current request
* @param type Why the request is dieing * @param type Why the request is dieing
* @param r The current request * @param r The current request
* @deffunc void ap_die(int type, request_rec *r)
*/ */
AP_DECLARE(void) ap_die(int type, request_rec *r); AP_DECLARE(void) ap_die(int type, request_rec *r);
#endif #endif
@ -284,7 +272,7 @@ AP_DECLARE_HOOK(int,translate_name,(request_rec *r))
/** /**
* This hook allow modules to set the per_dir_config based on their own * This hook allow modules to set the per_dir_config based on their own
* context (such as <Proxy > sections) and responds to contextless requests * context (such as "<Proxy>" sections) and responds to contextless requests
* such as TRACE that need no security or filesystem mapping. * such as TRACE that need no security or filesystem mapping.
* based on the filesystem. * based on the filesystem.
* @param r The current request * @param r The current request

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file http_vhost.h
* @brief Virtual Host package
*
* @defgroup APACHE_CORE_VHOST Virtual Host Package
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_HTTP_VHOST_H #ifndef APACHE_HTTP_VHOST_H
#define APACHE_HTTP_VHOST_H #define APACHE_HTTP_VHOST_H
@ -21,10 +30,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Virtual Host package
*/
/** /**
* called before any config is read * called before any config is read
* @param p Pool to allocate out of * @param p Pool to allocate out of
@ -36,19 +41,23 @@ AP_DECLARE(void) ap_init_vhost_config(apr_pool_t *p);
* the run-time vhost lookups * the run-time vhost lookups
* @param p The pool to allocate out of * @param p The pool to allocate out of
* @param main_server The start of the virtual host list * @param main_server The start of the virtual host list
* @deffunc ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server)
*/ */
AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server); AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server);
/** /**
* handle addresses in <VirtualHost> statement * handle addresses in "<VirtualHost>" statement
* @param p The pool to allocate out of * @param p The pool to allocate out of
* @param hostname The hostname in the VirtualHost statement * @param hostname The hostname in the VirtualHost statement
* @param s The list of Virtual Hosts. * @param s The list of Virtual Hosts.
*/ */
const char *ap_parse_vhost_addrs(apr_pool_t *p, const char *hostname, server_rec *s); const char *ap_parse_vhost_addrs(apr_pool_t *p, const char *hostname, server_rec *s);
/* handle NameVirtualHost directive */ /**
* handle NameVirtualHost directive
* @param cmd Command Parameters structure
* @param dummy NOT USED
* @param arg a host of the form "<address>[:port]"
*/
const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy,
const char *arg); const char *arg);
@ -97,7 +106,6 @@ AP_DECLARE(void) ap_update_vhost_from_headers(request_rec *r);
* @param port The port from the headers * @param port The port from the headers
* @return return 1 if the host:port matches any of the aliases of r->server, * @return return 1 if the host:port matches any of the aliases of r->server,
* return 0 otherwise * return 0 otherwise
* @deffunc int ap_matches_request_vhost(request_rec *r, const char *host, apr_port_t port)
*/ */
AP_DECLARE(int) ap_matches_request_vhost(request_rec *r, const char *host, AP_DECLARE(int) ap_matches_request_vhost(request_rec *r, const char *host,
apr_port_t port); apr_port_t port);
@ -107,3 +115,4 @@ AP_DECLARE(int) ap_matches_request_vhost(request_rec *r, const char *host,
#endif #endif
#endif /* !APACHE_HTTP_VHOST_H */ #endif /* !APACHE_HTTP_VHOST_H */
/** @} */

View File

@ -14,14 +14,27 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef APACHE_HTTPD_H
#define APACHE_HTTPD_H
/** /**
* @file httpd.h * @file httpd.h
* @brief HTTP Daemon routines * @brief HTTP Daemon routines
*
* @defgroup APACHE Apache
*
* Top level group of which all other groups are a member
* @{
*
* @defgroup APACHE_MODS Apache Modules
* Top level group for Apache Modules
* @defgroup APACHE_OS Operating System Specific
* @defgroup APACHE_CORE Apache Core
* @{
* @defgroup APACHE_CORE_DAEMON HTTP Daemon Routine
* @{
*/ */
#ifndef APACHE_HTTPD_H
#define APACHE_HTTPD_H
/* XXX - We need to push more stuff to other .h files, or even .c files, to /* XXX - We need to push more stuff to other .h files, or even .c files, to
* make this file smaller * make this file smaller
*/ */
@ -59,23 +72,24 @@ extern "C" {
/* ----------------------------- config dir ------------------------------ */ /* ----------------------------- config dir ------------------------------ */
/* Define this to be the default server home dir. Most things later in this /** Define this to be the default server home dir. Most things later in this
* file with a relative pathname will have this added. * file with a relative pathname will have this added.
*/ */
#ifndef HTTPD_ROOT #ifndef HTTPD_ROOT
#ifdef OS2 #ifdef OS2
/* Set default for OS/2 file system */ /** Set default for OS/2 file system */
#define HTTPD_ROOT "/os2httpd" #define HTTPD_ROOT "/os2httpd"
#elif defined(WIN32) #elif defined(WIN32)
/* Set default for Windows file system */ /** Set default for Windows file system */
#define HTTPD_ROOT "/apache" #define HTTPD_ROOT "/apache"
#elif defined (BEOS) #elif defined (BEOS)
/* Set the default for BeOS */ /** Set the default for BeOS */
#define HTTPD_ROOT "/boot/home/apache" #define HTTPD_ROOT "/boot/home/apache"
#elif defined (NETWARE) #elif defined (NETWARE)
/* Set the default for NetWare */ /** Set the default for NetWare */
#define HTTPD_ROOT "/apache" #define HTTPD_ROOT "/apache"
#else #else
/** Set for all other OSs */
#define HTTPD_ROOT "/usr/local/apache" #define HTTPD_ROOT "/usr/local/apache"
#endif #endif
#endif /* HTTPD_ROOT */ #endif /* HTTPD_ROOT */
@ -88,7 +102,8 @@ extern "C" {
* *
*/ */
/* Default location of documents. Can be overridden by the DocumentRoot /**
* Default location of documents. Can be overridden by the DocumentRoot
* directive. * directive.
*/ */
#ifndef DOCUMENT_LOCATION #ifndef DOCUMENT_LOCATION
@ -96,19 +111,20 @@ extern "C" {
/* Set default for OS/2 file system */ /* Set default for OS/2 file system */
#define DOCUMENT_LOCATION HTTPD_ROOT "/docs" #define DOCUMENT_LOCATION HTTPD_ROOT "/docs"
#else #else
/* Set default for non OS/2 file system */
#define DOCUMENT_LOCATION HTTPD_ROOT "/htdocs" #define DOCUMENT_LOCATION HTTPD_ROOT "/htdocs"
#endif #endif
#endif /* DOCUMENT_LOCATION */ #endif /* DOCUMENT_LOCATION */
/* Maximum number of dynamically loaded modules */ /** Maximum number of dynamically loaded modules */
#ifndef DYNAMIC_MODULE_LIMIT #ifndef DYNAMIC_MODULE_LIMIT
#define DYNAMIC_MODULE_LIMIT 128 #define DYNAMIC_MODULE_LIMIT 128
#endif #endif
/* Default administrator's address */ /** Default administrator's address */
#define DEFAULT_ADMIN "[no address given]" #define DEFAULT_ADMIN "[no address given]"
/* The name of the log files */ /** The name of the log files */
#ifndef DEFAULT_ERRORLOG #ifndef DEFAULT_ERRORLOG
#if defined(OS2) || defined(WIN32) #if defined(OS2) || defined(WIN32)
#define DEFAULT_ERRORLOG "logs/error.log" #define DEFAULT_ERRORLOG "logs/error.log"
@ -117,7 +133,7 @@ extern "C" {
#endif #endif
#endif /* DEFAULT_ERRORLOG */ #endif /* DEFAULT_ERRORLOG */
/* Define this to be what your per-directory security files are called */ /** Define this to be what your per-directory security files are called */
#ifndef DEFAULT_ACCESS_FNAME #ifndef DEFAULT_ACCESS_FNAME
#ifdef OS2 #ifdef OS2
/* Set default for OS/2 file system */ /* Set default for OS/2 file system */
@ -127,37 +143,38 @@ extern "C" {
#endif #endif
#endif /* DEFAULT_ACCESS_FNAME */ #endif /* DEFAULT_ACCESS_FNAME */
/* The name of the server config file */ /** The name of the server config file */
#ifndef SERVER_CONFIG_FILE #ifndef SERVER_CONFIG_FILE
#define SERVER_CONFIG_FILE "conf/httpd.conf" #define SERVER_CONFIG_FILE "conf/httpd.conf"
#endif #endif
/* The default path for CGI scripts if none is currently set */ /** The default path for CGI scripts if none is currently set */
#ifndef DEFAULT_PATH #ifndef DEFAULT_PATH
#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin" #define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
#endif #endif
/* The path to the suExec wrapper, can be overridden in Configuration */ /** The path to the suExec wrapper, can be overridden in Configuration */
#ifndef SUEXEC_BIN #ifndef SUEXEC_BIN
#define SUEXEC_BIN HTTPD_ROOT "/bin/suexec" #define SUEXEC_BIN HTTPD_ROOT "/bin/suexec"
#endif #endif
/* The timeout for waiting for messages */ /** The timeout for waiting for messages */
#ifndef DEFAULT_TIMEOUT #ifndef DEFAULT_TIMEOUT
#define DEFAULT_TIMEOUT 300 #define DEFAULT_TIMEOUT 300
#endif #endif
/* The timeout for waiting for keepalive timeout until next request */ /** The timeout for waiting for keepalive timeout until next request */
#ifndef DEFAULT_KEEPALIVE_TIMEOUT #ifndef DEFAULT_KEEPALIVE_TIMEOUT
#define DEFAULT_KEEPALIVE_TIMEOUT 5 #define DEFAULT_KEEPALIVE_TIMEOUT 5
#endif #endif
/* The number of requests to entertain per connection */ /** The number of requests to entertain per connection */
#ifndef DEFAULT_KEEPALIVE #ifndef DEFAULT_KEEPALIVE
#define DEFAULT_KEEPALIVE 100 #define DEFAULT_KEEPALIVE 100
#endif #endif
/* Limits on the size of various request items. These limits primarily /*
* Limits on the size of various request items. These limits primarily
* exist to prevent simple denial-of-service attacks on a server based * exist to prevent simple denial-of-service attacks on a server based
* on misuse of the protocol. The recommended values will depend on the * on misuse of the protocol. The recommended values will depend on the
* nature of the server resources -- CGI scripts and database backends * nature of the server resources -- CGI scripts and database backends
@ -173,16 +190,19 @@ extern "C" {
* DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by * DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by
* the server config directive LimitRequestFields. * the server config directive LimitRequestFields.
*/ */
/** default limit on bytes in Request-Line (Method+URI+HTTP-version) */
#ifndef DEFAULT_LIMIT_REQUEST_LINE #ifndef DEFAULT_LIMIT_REQUEST_LINE
#define DEFAULT_LIMIT_REQUEST_LINE 8190 #define DEFAULT_LIMIT_REQUEST_LINE 8190
#endif /* default limit on bytes in Request-Line (Method+URI+HTTP-version) */ #endif
/** default limit on bytes in any one header field */
#ifndef DEFAULT_LIMIT_REQUEST_FIELDSIZE #ifndef DEFAULT_LIMIT_REQUEST_FIELDSIZE
#define DEFAULT_LIMIT_REQUEST_FIELDSIZE 8190 #define DEFAULT_LIMIT_REQUEST_FIELDSIZE 8190
#endif /* default limit on bytes in any one header field */ #endif
/** default limit on number of request header fields */
#ifndef DEFAULT_LIMIT_REQUEST_FIELDS #ifndef DEFAULT_LIMIT_REQUEST_FIELDS
#define DEFAULT_LIMIT_REQUEST_FIELDS 100 #define DEFAULT_LIMIT_REQUEST_FIELDS 100
#endif /* default limit on number of request header fields */ #endif
/** /**
* The default default character set name to add if AddDefaultCharset is * The default default character set name to add if AddDefaultCharset is
@ -256,7 +276,6 @@ extern "C" {
"xhtml1-frameset.dtd\">" "xhtml1-frameset.dtd\">"
/** Internal representation for a HTTP protocol number, e.g., HTTP/1.1 */ /** Internal representation for a HTTP protocol number, e.g., HTTP/1.1 */
#define HTTP_VERSION(major,minor) (1000*(major)+(minor)) #define HTTP_VERSION(major,minor) (1000*(major)+(minor))
/** Major part of HTTP protocol */ /** Major part of HTTP protocol */
#define HTTP_VERSION_MAJOR(number) ((number)/1000) #define HTTP_VERSION_MAJOR(number) ((number)/1000)
@ -287,8 +306,10 @@ extern "C" {
*/ */
#define ap_http_scheme(r) ap_run_http_scheme(r) #define ap_http_scheme(r) ap_run_http_scheme(r)
/** The default string lengths */ /** The default string length */
#define MAX_STRING_LEN HUGE_STRING_LEN #define MAX_STRING_LEN HUGE_STRING_LEN
/** The length of a Huge string */
#define HUGE_STRING_LEN 8192 #define HUGE_STRING_LEN 8192
/** The size of the server's internal read-write buffers */ /** The size of the server's internal read-write buffers */
@ -364,14 +385,15 @@ extern "C" {
/** /**
* @internal * @internal
* modules should not used functions marked AP_CORE_DECLARE * modules should not use functions marked AP_CORE_DECLARE
*/ */
#ifndef AP_CORE_DECLARE #ifndef AP_CORE_DECLARE
# define AP_CORE_DECLARE AP_DECLARE # define AP_CORE_DECLARE AP_DECLARE
#endif #endif
/** /**
* @internal * @internal
* modules should not used functions marked AP_CORE_DECLARE_NONSTD * modules should not use functions marked AP_CORE_DECLARE_NONSTD
*/ */
#ifndef AP_CORE_DECLARE_NONSTD #ifndef AP_CORE_DECLARE_NONSTD
@ -379,7 +401,7 @@ extern "C" {
#endif #endif
/** /**
* The numeric version information is broken out into fields within this * @brief The numeric version information is broken out into fields within this
* structure. * structure.
*/ */
typedef struct { typedef struct {
@ -508,33 +530,37 @@ AP_DECLARE(const char *) ap_get_server_built(void);
((x) == HTTP_SERVICE_UNAVAILABLE) || \ ((x) == HTTP_SERVICE_UNAVAILABLE) || \
((x) == HTTP_NOT_IMPLEMENTED)) ((x) == HTTP_NOT_IMPLEMENTED))
/** @} */ /** @} */
/** /**
* @defgroup Methods List of Methods recognized by the server * @defgroup Methods List of Methods recognized by the server
* @ingroup APACHE_CORE_DAEMON
* @{ * @{
*/ *
/** * @brief Methods recognized (but not necessarily handled) by the server.
* Methods recognized (but not necessarily handled) by the server. *
* These constants are used in bit shifting masks of size int, so it is * These constants are used in bit shifting masks of size int, so it is
* unsafe to have more methods than bits in an int. HEAD == M_GET. * unsafe to have more methods than bits in an int. HEAD == M_GET.
* This list must be tracked by the list in http_protocol.c in routine * This list must be tracked by the list in http_protocol.c in routine
* ap_method_name_of(). * ap_method_name_of().
*
*/ */
#define M_GET 0 /* RFC 2616: HTTP */
#define M_GET 0 /** RFC 2616: HTTP */
#define M_PUT 1 /* : */ #define M_PUT 1 /* : */
#define M_POST 2 #define M_POST 2
#define M_DELETE 3 #define M_DELETE 3
#define M_CONNECT 4 #define M_CONNECT 4
#define M_OPTIONS 5 #define M_OPTIONS 5
#define M_TRACE 6 /* RFC 2616: HTTP */ #define M_TRACE 6 /** RFC 2616: HTTP */
#define M_PATCH 7 /* no rfc(!) ### remove this one? */ #define M_PATCH 7 /** no rfc(!) ### remove this one? */
#define M_PROPFIND 8 /* RFC 2518: WebDAV */ #define M_PROPFIND 8 /** RFC 2518: WebDAV */
#define M_PROPPATCH 9 /* : */ #define M_PROPPATCH 9 /* : */
#define M_MKCOL 10 #define M_MKCOL 10
#define M_COPY 11 #define M_COPY 11
#define M_MOVE 12 #define M_MOVE 12
#define M_LOCK 13 #define M_LOCK 13
#define M_UNLOCK 14 /* RFC 2518: WebDAV */ #define M_UNLOCK 14 /** RFC 2518: WebDAV */
#define M_VERSION_CONTROL 15 /* RFC 3253: WebDAV Versioning */ #define M_VERSION_CONTROL 15 /** RFC 3253: WebDAV Versioning */
#define M_CHECKOUT 16 /* : */ #define M_CHECKOUT 16 /* : */
#define M_UNCHECKOUT 17 #define M_UNCHECKOUT 17
#define M_CHECKIN 18 #define M_CHECKIN 18
@ -545,7 +571,7 @@ AP_DECLARE(const char *) ap_get_server_built(void);
#define M_MKACTIVITY 23 #define M_MKACTIVITY 23
#define M_BASELINE_CONTROL 24 #define M_BASELINE_CONTROL 24
#define M_MERGE 25 #define M_MERGE 25
#define M_INVALID 26 /* RFC 3253: WebDAV Versioning */ #define M_INVALID 26 /** RFC 3253: WebDAV Versioning */
/** /**
* METHODS needs to be equal to the number of bits * METHODS needs to be equal to the number of bits
@ -560,18 +586,23 @@ AP_DECLARE(const char *) ap_get_server_built(void);
/** @} */ /** @} */
/** /** @see ap_method_list_t */
* Structure for handling HTTP methods. Methods known to the server are
* accessed via a bitmask shortcut; extension methods are handled by
* an array.
*/
typedef struct ap_method_list_t ap_method_list_t; typedef struct ap_method_list_t ap_method_list_t;
/**
* @struct ap_method_list_t
* @brief Structure for handling HTTP methods.
*
* Methods known to the server are accessed via a bitmask shortcut;
* extension methods are handled by an array.
*/
struct ap_method_list_t { struct ap_method_list_t {
/* The bitmask used for known methods */ /** The bitmask used for known methods */
apr_int64_t method_mask; apr_int64_t method_mask;
/* the array used for extension methods */ /** the array used for extension methods */
apr_array_header_t *method_list; apr_array_header_t *method_list;
}; };
/** /**
* @defgroup module_magic Module Magic mime types * @defgroup module_magic Module Magic mime types
* @{ * @{
@ -618,10 +649,11 @@ struct ap_method_list_t {
#define REQUEST_CHUNKED_ERROR 1 #define REQUEST_CHUNKED_ERROR 1
/** If chunked, remove the chunks for me. */ /** If chunked, remove the chunks for me. */
#define REQUEST_CHUNKED_DECHUNK 2 #define REQUEST_CHUNKED_DECHUNK 2
/** @} */ /** @} // values_request_rec_body */
/** /**
* @defgroup values_request_rec_used_path_info Possible values for request_rec.used_path_info * @defgroup values_request_rec_used_path_info Possible values for request_rec.used_path_info
* @ingroup APACHE_CORE_DAEMON
* @{ * @{
* Possible values for request_rec.used_path_info: * Possible values for request_rec.used_path_info:
*/ */
@ -632,7 +664,9 @@ struct ap_method_list_t {
#define AP_REQ_REJECT_PATH_INFO 1 #define AP_REQ_REJECT_PATH_INFO 1
/** Module may chose to use the given path_info */ /** Module may chose to use the given path_info */
#define AP_REQ_DEFAULT_PATH_INFO 2 #define AP_REQ_DEFAULT_PATH_INFO 2
/** @} */
/** @} // values_request_rec_used_path_info */
/* /*
* Things which may vary per file-lookup WITHIN a request --- * Things which may vary per file-lookup WITHIN a request ---
@ -649,7 +683,7 @@ struct ap_method_list_t {
*/ */
/** /**
* This represents the result of calling htaccess; these are cached for * @brief This represents the result of calling htaccess; these are cached for
* each request. * each request.
*/ */
struct htaccess_result { struct htaccess_result {
@ -688,7 +722,9 @@ typedef struct conn_state_t conn_state_t;
/* This comes after we have defined the request_rec type */ /* This comes after we have defined the request_rec type */
#include "apr_uri.h" #include "apr_uri.h"
/** A structure that represents one process */ /**
* @brief A structure that represents one process
*/
struct process_rec { struct process_rec {
/** Global pool. Cleared upon normal exit */ /** Global pool. Cleared upon normal exit */
apr_pool_t *pool; apr_pool_t *pool;
@ -702,7 +738,9 @@ struct process_rec {
const char *short_name; const char *short_name;
}; };
/** A structure that represents the current request */ /**
* @brief A structure that represents the current request
*/
struct request_rec { struct request_rec {
/** The pool associated with the request */ /** The pool associated with the request */
apr_pool_t *pool; apr_pool_t *pool;
@ -953,13 +991,18 @@ struct request_rec {
/* @} */ /* @} */
/**
* @brief Enumeration of connection keepalive options
*/
typedef enum { typedef enum {
AP_CONN_UNKNOWN, AP_CONN_UNKNOWN,
AP_CONN_CLOSE, AP_CONN_CLOSE,
AP_CONN_KEEPALIVE AP_CONN_KEEPALIVE
} ap_conn_keepalive_e; } ap_conn_keepalive_e;
/** Structure to store things which are per connection */ /**
* @brief Structure to store things which are per connection
*/
struct conn_rec { struct conn_rec {
/** Pool associated with this connection */ /** Pool associated with this connection */
apr_pool_t *pool; apr_pool_t *pool;
@ -1025,19 +1068,32 @@ struct conn_rec {
int data_in_input_filters; int data_in_input_filters;
}; };
/**
* Enumeration of connection states
*/
typedef enum { typedef enum {
CONN_STATE_CHECK_REQUEST_LINE_READABLE, CONN_STATE_CHECK_REQUEST_LINE_READABLE,
CONN_STATE_READ_REQUEST_LINE, CONN_STATE_READ_REQUEST_LINE,
CONN_STATE_LINGER, CONN_STATE_LINGER,
} conn_state_e; } conn_state_e;
/**
* @brief A structure to contain connection state information
*/
struct conn_state_t { struct conn_state_t {
APR_RING_ENTRY(conn_state_t) timeout_list; /** APR_RING of expiration timeouts */
apr_time_t expiration_time; APR_RING_ENTRY(conn_state_t) timeout_list;
/** the expiration time of the next keepalive timeout */
apr_time_t expiration_time;
/** Current state of the connection */
conn_state_e state; conn_state_e state;
/** connection record this struct refers to */
conn_rec *c; conn_rec *c;
/** memory pool to allocate from */
apr_pool_t *p; apr_pool_t *p;
/** bucket allocator */
apr_bucket_alloc_t *bucket_alloc; apr_bucket_alloc_t *bucket_alloc;
/** poll file decriptor information */
apr_pollfd_t pfd; apr_pollfd_t pfd;
}; };
@ -1050,7 +1106,10 @@ struct conn_state_t {
#define DEFAULT_VHOST_ADDR 0xfffffffful #define DEFAULT_VHOST_ADDR 0xfffffffful
/** A structure to be used for Per-vhost config */ /**
* @struct server_addr_rec
* @brief A structure to be used for Per-vhost config
*/
typedef struct server_addr_rec server_addr_rec; typedef struct server_addr_rec server_addr_rec;
struct server_addr_rec { struct server_addr_rec {
/** The next server in the list */ /** The next server in the list */
@ -1059,11 +1118,13 @@ struct server_addr_rec {
apr_sockaddr_t *host_addr; apr_sockaddr_t *host_addr;
/** The bound port, for this server */ /** The bound port, for this server */
apr_port_t host_port; apr_port_t host_port;
/** The name given in <VirtualHost> */ /** The name given in "<VirtualHost>" */
char *virthost; char *virthost;
}; };
/** A structure to store information for each virtual server */ /**
* @brief A structure to store information for each virtual server
*/
struct server_rec { struct server_rec {
/** The process this server is running in */ /** The process this server is running in */
process_rec *process; process_rec *process;
@ -1136,9 +1197,10 @@ struct server_rec {
typedef struct core_output_filter_ctx { typedef struct core_output_filter_ctx {
apr_bucket_brigade *b; apr_bucket_brigade *b;
apr_pool_t *deferred_write_pool; /* subpool of c->pool used for resources /** subpool of c->pool used for resources
* which may outlive the request * which may outlive the request
*/ */
apr_pool_t *deferred_write_pool;
} core_output_filter_ctx_t; } core_output_filter_ctx_t;
typedef struct core_filter_ctx { typedef struct core_filter_ctx {
@ -1188,6 +1250,7 @@ AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int
* @return A copy of the characters up to the first stop character * @return A copy of the characters up to the first stop character
*/ */
AP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop); AP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop);
/** /**
* Get the characters until the first occurance of a specified character * Get the characters until the first occurance of a specified character
* @param p The pool to allocate memory from * @param p The pool to allocate memory from
@ -1206,18 +1269,19 @@ AP_DECLARE(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop);
* @return The first word in the line * @return The first word in the line
*/ */
AP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line); AP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line);
/** /**
* Get the first word from a given string. A word is defined as all characters * Get the first word from a given string. A word is defined as all characters
* up to the first whitespace. * up to the first whitespace.
* @param p The pool to allocate memory from * @param p The pool to allocate memory from
* @param line The string to traverse * @param line The string to traverse
* @return The first word in the line * @return The first word in the line
* @note The same as ap_getword_white(), except it doesn't use const char **. * @note The same as ap_getword_white(), except it doesn't use const char**
*/ */
AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line); AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line);
/** /**
* Get all characters from the first occurance of @a stop to the first '\0' * Get all characters from the first occurance of @a stop to the first "\0"
* @param p The pool to allocate memory from * @param p The pool to allocate memory from
* @param line The line to traverse * @param line The line to traverse
* @param stop The character to start at * @param stop The character to start at
@ -1226,8 +1290,9 @@ AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line);
*/ */
AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line, AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line,
char stop); char stop);
/** /**
* Get all characters from the first occurance of @a stop to the first '\0' * Get all characters from the first occurance of @a stop to the first "\0"
* @param p The pool to allocate memory from * @param p The pool to allocate memory from
* @param line The line to traverse * @param line The line to traverse
* @param stop The character to start at * @param stop The character to start at
@ -1244,6 +1309,7 @@ AP_DECLARE(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop);
* @return A copy of the string * @return A copy of the string
*/ */
AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line); AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line);
/** /**
* Get the second word in the string paying attention to quoting * Get the second word in the string paying attention to quoting
* @param p The pool to allocate from * @param p The pool to allocate from
@ -1340,12 +1406,14 @@ AP_DECLARE(int) ap_is_url(const char *u);
* @return 0 on success, non-zero otherwise * @return 0 on success, non-zero otherwise
*/ */
AP_DECLARE(int) ap_unescape_url(char *url); AP_DECLARE(int) ap_unescape_url(char *url);
/** /**
* Unescape a URL, but leaving %2f (slashes) escaped * Unescape a URL, but leaving %2f (slashes) escaped
* @param url The url to unescape * @param url The url to unescape
* @return 0 on success, non-zero otherwise * @return 0 on success, non-zero otherwise
*/ */
AP_DECLARE(int) ap_unescape_url_keep2f(char *url); AP_DECLARE(int) ap_unescape_url_keep2f(char *url);
/** /**
* Convert all double slashes to single slashes * Convert all double slashes to single slashes
* @param name The string to convert * @param name The string to convert
@ -1366,6 +1434,7 @@ AP_DECLARE(void) ap_getparents(char *name);
* @return The converted URL * @return The converted URL
*/ */
AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s); AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s);
/** /**
* convert an OS path to a URL in an OS dependant way. * convert an OS path to a URL in an OS dependant way.
* @param p The pool to allocate from * @param p The pool to allocate from
@ -1375,6 +1444,7 @@ AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s);
* @return The converted URL * @return The converted URL
*/ */
AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial); AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial);
/** @see ap_os_escape_path */ /** @see ap_os_escape_path */
#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1) #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
@ -1398,7 +1468,7 @@ AP_DECLARE(char *) ap_escape_logitem(apr_pool_t *p, const char *str);
* Escape a string for logging into the error log (without a pool) * Escape a string for logging into the error log (without a pool)
* @param dest The buffer to write to * @param dest The buffer to write to
* @param source The string to escape * @param source The string to escape
* @param buflen The buffer size for the escaped string (including \0) * @param buflen The buffer size for the escaped string (including "\0")
* @return The len of the escaped string (always < maxlen) * @return The len of the escaped string (always < maxlen)
*/ */
AP_DECLARE(apr_size_t) ap_escape_errorlog_item(char *dest, const char *source, AP_DECLARE(apr_size_t) ap_escape_errorlog_item(char *dest, const char *source,
@ -1414,6 +1484,7 @@ AP_DECLARE(apr_size_t) ap_escape_errorlog_item(char *dest, const char *source,
*/ */
AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname, AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
apr_port_t port, const request_rec *r); apr_port_t port, const request_rec *r);
/** /**
* Escape a shell command * Escape a shell command
* @param p The pool to allocate from * @param p The pool to allocate from
@ -1436,7 +1507,7 @@ AP_DECLARE(int) ap_count_dirs(const char *path);
* @param d The location to copy to * @param d The location to copy to
* @param s The location to copy from * @param s The location to copy from
* @param n The number of directories to copy * @param n The number of directories to copy
* @return value is the ever useful pointer to the trailing \0 of d * @return value is the ever useful pointer to the trailing "\0" of d
* @note on platforms with drive letters, n = 0 returns the "/" root, * @note on platforms with drive letters, n = 0 returns the "/" root,
* whereas n = 1 returns the "d:/" root. On all other platforms, n = 0 * whereas n = 1 returns the "d:/" root. On all other platforms, n = 0
* returns the empty string. */ * returns the empty string. */
@ -1459,7 +1530,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s);
* @param dir The directory name * @param dir The directory name
* @param f The filename * @param f The filename
* @return A copy of the full path * @return A copy of the full path
* @tip Never consider using this function if you are dealing with filesystem * @note Never consider using this function if you are dealing with filesystem
* names that need to remain canonical, unless you are merging an apr_dir_read * names that need to remain canonical, unless you are merging an apr_dir_read
* path and returned filename. Otherwise, the result is not canonical. * path and returned filename. Otherwise, the result is not canonical.
*/ */
@ -1469,7 +1540,7 @@ AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char
* Test if the given path has an an absolute path. * Test if the given path has an an absolute path.
* @param p The pool to allocate from * @param p The pool to allocate from
* @param dir The directory name * @param dir The directory name
* @tip The converse is not necessarily true, some OS's (Win32/OS2/Netware) have * @note The converse is not necessarily true, some OS's (Win32/OS2/Netware) have
* multiple forms of absolute paths. This only reports if the path is absolute * multiple forms of absolute paths. This only reports if the path is absolute
* in a canonical sense. * in a canonical sense.
*/ */
@ -1491,6 +1562,7 @@ AP_DECLARE(int) ap_is_matchexp(const char *str);
* @return 1 if the two strings match, 0 otherwise * @return 1 if the two strings match, 0 otherwise
*/ */
AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected); AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected);
/** /**
* Determine if a string matches a patterm containing the wildcards '?' or '*', * Determine if a string matches a patterm containing the wildcards '?' or '*',
* ignoring case * ignoring case
@ -1529,27 +1601,26 @@ AP_DECLARE(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded);
/** /**
* Encode a string into memory allocated from a pool in base 64 format * Encode a string into memory allocated from a pool in base 64 format
* @param p The pool to allocate from * @param p The pool to allocate from
* @param strin The plaintext string * @param string The plaintext string
* @return The encoded string * @return The encoded string
*/ */
AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string); AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
/** /**
* Compile a regular expression to be used later * Compile a regular expression to be used later
* @param p The pool to allocate from * @param p The pool to allocate from
* @param pattern the regular expression to compile * @param pattern the regular expression to compile
* @param cflags The bitwise or of one or more of the following: * @param cflags The bitwise or of one or more of the following:
* @li #REG_EXTENDED - Use POSIX extended Regular Expressions * @li REG_EXTENDED - Use POSIX extended Regular Expressions
* @li #REG_ICASE - Ignore case * @li REG_ICASE - Ignore case
* @li #REG_NOSUB - Support for substring addressing of matches * @li REG_NOSUB - Support for substring addressing of matches
* not required * not required
* @li #REG_NEWLINE - Match-any-character operators don't match new-line * @li REG_NEWLINE - Match-any-character operators don't match new-line
* @return The compiled regular expression * @return The compiled regular expression
*/ */
AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern, AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
int cflags); int cflags);
/** /**
* Free the memory associated with a compiled regular expression * Free the memory associated with a compiled regular expression
* @param p The pool the regex was allocated from * @param p The pool the regex was allocated from
@ -1647,7 +1718,9 @@ char *ap_get_local_host(apr_pool_t *p);
AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine) AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
__attribute__((noreturn)); __attribute__((noreturn));
/** @internal */ /**
* @internal Internal Assert function
*/
#define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__)) #define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__))
/** /**
@ -1657,7 +1730,6 @@ AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
* Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG * Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG
* is defined. * is defined.
*/ */
#ifdef AP_DEBUG #ifdef AP_DEBUG
#define AP_DEBUG_ASSERT(exp) ap_assert(exp) #define AP_DEBUG_ASSERT(exp) ap_assert(exp)
#else #else
@ -1665,7 +1737,7 @@ AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
#endif #endif
/** /**
* @defgroup stopsignal flags which indicate places where the sever should stop for debugging. * @defgroup stopsignal Flags which indicate places where the sever should stop for debugging.
* @{ * @{
* A set of flags which indicate places where the server should raise(SIGSTOP). * A set of flags which indicate places where the server should raise(SIGSTOP).
* This is useful for debugging, because you can then attach to that process * This is useful for debugging, because you can then attach to that process
@ -1756,3 +1828,8 @@ AP_DECLARE(const char *) ap_strstr_c(const char *s, const char *c);
#endif #endif
#endif /* !APACHE_HTTPD_H */ #endif /* !APACHE_HTTPD_H */
/** @} //APACHE Daemon */
/** @} //APACHE Core */
/** @} //APACHE super group */

View File

@ -25,6 +25,15 @@
* does not belong in src/os/unix * does not belong in src/os/unix
*/ */
/**
* @file mpm_common.h
* @brief Multi-Processing Modules functions
*
* @defgroup APACHE_MPM Multi-Processing Modules
* @ingroup APACHE
* @{
*/
#ifndef APACHE_MPM_COMMON_H #ifndef APACHE_MPM_COMMON_H
#define APACHE_MPM_COMMON_H #define APACHE_MPM_COMMON_H
@ -40,10 +49,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Multi-Processing Modules functions
*/
/* The maximum length of the queue of pending connections, as defined /* The maximum length of the queue of pending connections, as defined
* by listen(2). Under some systems, it should be increased if you * by listen(2). Under some systems, it should be increased if you
* are experiencing a heavy TCP SYN flood attack. * are experiencing a heavy TCP SYN flood attack.
@ -348,3 +353,4 @@ AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p))
#endif #endif
#endif /* !APACHE_MPM_COMMON_H */ #endif /* !APACHE_MPM_COMMON_H */
/** @} */

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file scoreboard.h
* @brief Apache scoreboard library
*/
#ifndef APACHE_SCOREBOARD_H #ifndef APACHE_SCOREBOARD_H
#define APACHE_SCOREBOARD_H #define APACHE_SCOREBOARD_H

View File

@ -14,19 +14,26 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_cfgtree.h
* @brief Config Tree Package
*
* @defgroup APACHE_CORE_CONFIG_TREE Config Tree Package
* @ingroup APACHE_CORE_CONFIG
* @{
*/
#ifndef AP_CONFTREE_H #ifndef AP_CONFTREE_H
#define AP_CONFTREE_H #define AP_CONFTREE_H
#include "ap_config.h" #include "ap_config.h"
/**
* @package Config Tree Package
*/
typedef struct ap_directive_t ap_directive_t; typedef struct ap_directive_t ap_directive_t;
/** /**
* Structure used to build the config tree. The config tree only stores * @brief Structure used to build the config tree.
*
* The config tree only stores
* the directives that will be active in the running server. Directives * the directives that will be active in the running server. Directives
* that contain other directions, such as <Directory ...> cause a sub-level * that contain other directions, such as <Directory ...> cause a sub-level
* to be created, where the included directives are stored. The closing * to be created, where the included directives are stored. The closing
@ -77,3 +84,4 @@ ap_directive_t *ap_add_node(ap_directive_t **parent, ap_directive_t *current,
ap_directive_t *toadd, int child); ap_directive_t *toadd, int child);
#endif #endif
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_charset.h
* @brief charset conversion
*
* @defgroup APACHE_CORE_CHARSET Charset Conversion
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_UTIL_CHARSET_H #ifndef APACHE_UTIL_CHARSET_H
#define APACHE_UTIL_CHARSET_H #define APACHE_UTIL_CHARSET_H
@ -21,9 +30,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package charset conversion
*/
#include "apr.h" #include "apr.h"
#if APR_CHARSET_EBCDIC #if APR_CHARSET_EBCDIC
@ -46,3 +52,4 @@ extern apr_xlate_t *ap_hdrs_from_ascii;
#endif #endif
#endif /* !APACHE_UTIL_CHARSET_H */ #endif /* !APACHE_UTIL_CHARSET_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_ebcdic.h
* @brief Utilities for EBCDIC conversion
*
* @defgroup APACHE_CORE_EBCDIC Utilities for EBCDIC conversion
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_UTIL_EBCDIC_H #ifndef APACHE_UTIL_EBCDIC_H
#define APACHE_UTIL_EBCDIC_H #define APACHE_UTIL_EBCDIC_H
@ -26,10 +35,6 @@ extern "C" {
#include "httpd.h" #include "httpd.h"
#include "util_charset.h" #include "util_charset.h"
/**
* @package Utilities for EBCDIC conversion
*/
#if APR_CHARSET_EBCDIC #if APR_CHARSET_EBCDIC
/** /**
@ -76,3 +81,4 @@ int ap_rvputs_proto_in_ascii(request_rec *r, ...);
#endif #endif
#endif /* !APACHE_UTIL_EBCDIC_H */ #endif /* !APACHE_UTIL_EBCDIC_H */
/** @} */

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_filter.h
* @brief Apache filter library
*/
#ifndef AP_FILTER_H #ifndef AP_FILTER_H
#define AP_FILTER_H #define AP_FILTER_H
@ -30,11 +35,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @file util_filter.h
* @brief Apache filter library
*/
/** Returned by the bottom-most filter if no data was written. /** Returned by the bottom-most filter if no data was written.
* @see ap_pass_brigade(). */ * @see ap_pass_brigade(). */
#define AP_NOBODY_WROTE -1 #define AP_NOBODY_WROTE -1
@ -45,7 +45,7 @@ extern "C" {
#define AP_FILTER_ERROR -3 #define AP_FILTER_ERROR -3
/** /**
* input filtering modes * @brief input filtering modes
*/ */
typedef enum { typedef enum {
/** The filter should return at most readbytes data. */ /** The filter should return at most readbytes data. */
@ -72,7 +72,8 @@ typedef enum {
} ap_input_mode_t; } ap_input_mode_t;
/** /**
* @defgroup filter FILTER CHAIN * @defgroup APACHE_CORE_FILTER Filter Chain
* @ingroup APACHE_CORE
* *
* Filters operate using a "chaining" mechanism. The filters are chained * Filters operate using a "chaining" mechanism. The filters are chained
* together into a sequence. When output is generated, it is passed through * together into a sequence. When output is generated, it is passed through
@ -201,7 +202,7 @@ typedef struct ap_filter_rec_t ap_filter_rec_t;
typedef struct ap_filter_provider_t ap_filter_provider_t; typedef struct ap_filter_provider_t ap_filter_provider_t;
/** /**
* This structure is used for recording information about the * @brief This structure is used for recording information about the
* registered filters. It associates a name with the filter's callback * registered filters. It associates a name with the filter's callback
* and filter type. * and filter type.
* *
@ -248,7 +249,9 @@ struct ap_filter_rec_t {
}; };
/** /**
* The representation of a filter chain. Each request has a list * @brief The representation of a filter chain.
*
* Each request has a list
* of these structures which are called in turn to filter the data. Sub * of these structures which are called in turn to filter the data. Sub
* requests get an exact copy of the main requests filter chain. * requests get an exact copy of the main requests filter chain.
*/ */

View File

@ -14,6 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_ldap.h
* @brief Apache LDAP library
*/
#ifndef UTIL_LDAP_H #ifndef UTIL_LDAP_H
#define UTIL_LDAP_H #define UTIL_LDAP_H

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_md5.h
* @brief Apache MD5 library
*
* @defgroup APACHE_CORE_MD5 MD5 Package Library
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_UTIL_MD5_H #ifndef APACHE_UTIL_MD5_H
#define APACHE_UTIL_MD5_H #define APACHE_UTIL_MD5_H
@ -21,10 +30,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Apache MD5 library
*/
#include "apr_md5.h" #include "apr_md5.h"
/** /**
@ -68,3 +73,4 @@ AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile);
#endif #endif
#endif /* !APACHE_UTIL_MD5_H */ #endif /* !APACHE_UTIL_MD5_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_script.h
* @brief Apache script tools
*
* @defgroup APACHE_CORE_SCRIPT Script Tools
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_UTIL_SCRIPT_H #ifndef APACHE_UTIL_SCRIPT_H
#define APACHE_UTIL_SCRIPT_H #define APACHE_UTIL_SCRIPT_H
@ -23,10 +32,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Apache script tools
*/
#ifndef APACHE_ARG_MAX #ifndef APACHE_ARG_MAX
#ifdef _POSIX_ARG_MAX #ifdef _POSIX_ARG_MAX
#define APACHE_ARG_MAX _POSIX_ARG_MAX #define APACHE_ARG_MAX _POSIX_ARG_MAX
@ -140,3 +145,4 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
#endif #endif
#endif /* !APACHE_UTIL_SCRIPT_H */ #endif /* !APACHE_UTIL_SCRIPT_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_time.h
* @brief Apache date-time handling functions
*
* @defgroup APACHE_CORE_TIME Date-time handling functions
* @ingroup APACHE_CORE
* @{
*/
#ifndef APACHE_UTIL_TIME_H #ifndef APACHE_UTIL_TIME_H
#define APACHE_UTIL_TIME_H #define APACHE_UTIL_TIME_H
@ -25,10 +34,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Apache date-time handling functions
*/
/* Maximum delta from the current time, in seconds, for a past time /* Maximum delta from the current time, in seconds, for a past time
* to qualify as "recent" for use in the ap_explode_recent_*() functions: * to qualify as "recent" for use in the ap_explode_recent_*() functions:
* (Must be a power of two minus one!) * (Must be a power of two minus one!)
@ -83,3 +88,4 @@ AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t);
#endif #endif
#endif /* !APACHE_UTIL_TIME_H */ #endif /* !APACHE_UTIL_TIME_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file util_xml.h
* @brief Apache XML library
*
* @defgroup APACHE_CORE_XML XML Library
* @ingroup APACHE_CORE
* @{
*/
#ifndef UTIL_XML_H #ifndef UTIL_XML_H
#define UTIL_XML_H #define UTIL_XML_H
@ -25,10 +34,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package Apache XML library
*/
/** /**
* Get XML post data and parse it * Get XML post data and parse it
* @param r The current request * @param r The current request
@ -44,3 +49,4 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec *r, apr_xml_doc **pdoc);
#endif #endif
#endif /* UTIL_XML_H */ #endif /* UTIL_XML_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_auth.h
* @brief uthentication Extension Module for Apache
*
* @defgroup MOD_AUTH mod_auth
* @ingroup APACHE_MODS
*/
#ifndef APACHE_MOD_AUTH_H #ifndef APACHE_MOD_AUTH_H
#define APACHE_MOD_AUTH_H #define APACHE_MOD_AUTH_H

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_isapi.h
* @brief ISAPI module extension to Apache
*
* @defgroup MOD_ISAPI mod_isapi
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_ISAPI_H #ifndef MOD_ISAPI_H
#define MOD_ISAPI_H #define MOD_ISAPI_H
@ -258,3 +267,5 @@ typedef int (APR_THREAD_FUNC *PFN_TERMINATEEXTENSION)(apr_uint32_t flags);
#endif #endif
#endif /* !MOD_ISAPI_H */ #endif /* !MOD_ISAPI_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file cache_cache.h
* @brief Cache Cache Functions
*
* @defgroup Cache_cache Cache Functions
* @ingroup MOD_CACHE
* @{
*/
#ifndef CACHE_CACHE_H #ifndef CACHE_CACHE_H
#define CACHE_CACHE_H #define CACHE_CACHE_H
@ -23,16 +32,6 @@ extern "C" {
#include "mod_cache.h" #include "mod_cache.h"
/**
* @file cache_hash.h
* @brief Cache Cache Functions
*/
/**
* @defgroup Cache_cache Cache Functions
* @ingroup CACHE
* @{
*/
/** ADT for the cache */ /** ADT for the cache */
typedef struct cache_cache_t cache_cache_t; typedef struct cache_cache_t cache_cache_t;
@ -104,9 +103,9 @@ CACHE_DECLARE(void *)cache_pop(cache_cache_t* c);
* @param entry the actual entry (from a find) * @param entry the actual entry (from a find)
*/ */
CACHE_DECLARE(apr_status_t) cache_remove(cache_cache_t* c, void *entry); CACHE_DECLARE(apr_status_t) cache_remove(cache_cache_t* c, void *entry);
/** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* !CACHE_CACHE_H */ #endif /* !CACHE_CACHE_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file cache_hash.h
* @brief Cache Hash Tables
*
* @defgroup Cache_Hash Hash Tables
* @ingroup MOD_CACHE
* @{
*/
#ifndef CACHE_HASH_H #ifndef CACHE_HASH_H
#define CACHE_HASH_H #define CACHE_HASH_H
@ -23,17 +32,6 @@ extern "C" {
#include "mod_cache.h" #include "mod_cache.h"
/**
* @file cache_hash.h
* @brief Cache Hash Tables
*/
/**
* @defgroup Cache_Hash Hash Tables
* @ingroup CACHE
* @{
*/
/** /**
* When passing a key to cache_hash_set or cache_hash_get, this value can be * When passing a key to cache_hash_set or cache_hash_get, this value can be
* passed to indicate a string-valued key, and have cache_hash compute the * passed to indicate a string-valued key, and have cache_hash compute the

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file cache_pqueue.h
* @brief Cache Priority Queue function declarations
*
* @defgroup MOD_CACHE_QUEUE Priority Queue
* @ingroup MOD_CACHE
* @{
*/
#ifndef CACHE_PQUEUE_H #ifndef CACHE_PQUEUE_H
#define CACHE_PQUEUE_H #define CACHE_PQUEUE_H
@ -158,3 +167,4 @@ int cache_pq_is_valid(cache_pqueue_t *q);
#endif #endif
#endif /* !CACHE_PQUEUE_H */ #endif /* !CACHE_PQUEUE_H */
/** @} */

View File

@ -14,13 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_cache.h
* @brief Main include file for the Apache Transparent Cache
*
* @defgroup MOD_CACHE mod_cache
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_CACHE_H #ifndef MOD_CACHE_H
#define MOD_CACHE_H #define MOD_CACHE_H
/*
* Main include file for the Apache Transparent Cache
*/
#define CORE_PRIVATE #define CORE_PRIVATE
#include "apr_hooks.h" #include "apr_hooks.h"
@ -319,3 +324,4 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t,
#endif /*MOD_CACHE_H*/ #endif /*MOD_CACHE_H*/
/** @} */

View File

@ -14,9 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
/* /**
** Declarations for the filesystem repository implementation * @file repos.h
*/ * @brief Declarations for the filesystem repository implementation
*
* @addtogroup MOD_DAV
* @{
*/
#ifndef _DAV_FS_REPOS_H_ #ifndef _DAV_FS_REPOS_H_
#define _DAV_FS_REPOS_H_ #define _DAV_FS_REPOS_H_
@ -76,3 +80,5 @@ void dav_fs_insert_all_liveprops(request_rec *r, const dav_resource *resource,
void dav_fs_register(apr_pool_t *p); void dav_fs_register(apr_pool_t *p);
#endif /* _DAV_FS_REPOS_H_ */ #endif /* _DAV_FS_REPOS_H_ */
/** @} */

View File

@ -14,9 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
/* /**
** Declarations for the generic lock implementation * @file locks.h
*/ * @brief Declarations for the generic lock implementation
*
* @addtogroup MOD_DAV
* @{
*/
#ifndef _DAV_LOCK_LOCKS_H_ #ifndef _DAV_LOCK_LOCKS_H_
#define _DAV_LOCK_LOCKS_H_ #define _DAV_LOCK_LOCKS_H_
@ -25,3 +29,5 @@
const char *dav_generic_get_lockdb_path(const request_rec *r); const char *dav_generic_get_lockdb_path(const request_rec *r);
#endif /* _DAV_LOCK_LOCKS_H_ */ #endif /* _DAV_LOCK_LOCKS_H_ */
/** @} */

View File

@ -14,9 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/* /**
** DAV extension module for Apache 2.0.* * @file mod_dav.h
*/ * @brief DAV extension module for Apache 2.0.*
*
* @defgroup MOD_DAV mod_dav
* @ingroup APACHE_MODS
* @{
*/
#ifndef _MOD_DAV_H_ #ifndef _MOD_DAV_H_
#define _MOD_DAV_H_ #define _MOD_DAV_H_
@ -2418,3 +2423,5 @@ typedef struct {
#endif #endif
#endif /* _MOD_DAV_H_ */ #endif /* _MOD_DAV_H_ */
/** @} */

View File

@ -15,11 +15,20 @@
* limitations under the License. * limitations under the License.
*/ */
/* Overview of what this is and does: /**
* @file mod_dbd.h
* @brief Database Acces Extension Module for Apache
*
* Overview of what this is and does:
* http://www.apache.org/~niq/dbd.html * http://www.apache.org/~niq/dbd.html
* or * or
* http://apache.webthing.com/database/ * http://apache.webthing.com/database/
*
* @defgroup MOD_DBD mod_dbd
* @ingroup APACHE_MODS
* @{
*/ */
#ifndef DBD_H #ifndef DBD_H
#define DBD_H #define DBD_H
@ -59,3 +68,5 @@ APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*)); APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
#endif #endif
/** @} */

View File

@ -42,8 +42,9 @@
module AP_MODULE_DECLARE_DATA filter_module; module AP_MODULE_DECLARE_DATA filter_module;
/** /**
* ap_filter_provider_t is a filter provider, as defined and implemented * @brief is a filter provider, as defined and implemented by mod_filter.
* by mod_filter. The struct is a linked list, with dispatch criteria *
* The struct is a linked list, with dispatch criteria
* defined for each filter. The provider implementation itself is a * defined for each filter. The provider implementation itself is a
* (2.0-compatible) ap_filter_rec_t* frec. * (2.0-compatible) ap_filter_rec_t* frec.
*/ */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_include.h
* @brief Server Side Include Filter Extension Module for Apache
*
* @defgroup MOD_INCLUDE mod_include
* @ingroup APACHE_MODS
* @{
*/
#ifndef _MOD_INCLUDE_H #ifndef _MOD_INCLUDE_H
#define _MOD_INCLUDE_H 1 #define _MOD_INCLUDE_H 1
@ -104,3 +113,4 @@ APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler,
(char *tag, include_handler_fn_t *func)); (char *tag, include_handler_fn_t *func));
#endif /* MOD_INCLUDE */ #endif /* MOD_INCLUDE */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_cgi.h
* @brief CGI Script Execution Extension Module for Apache
*
* @defgroup MOD_CGI mod_cgi
* @ingroup APACHE_MODS
* @{
*/
#ifndef _MOD_CGI_H #ifndef _MOD_CGI_H
#define _MOD_CGI_H 1 #define _MOD_CGI_H 1
@ -57,3 +66,5 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command,
cgi_exec_info_t *e_info)); cgi_exec_info_t *e_info));
#endif /* _MOD_CGI_H */ #endif /* _MOD_CGI_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_status.h
* @brief Status Report Extension Module to Apache
*
* @defgroup MOD_STATUS mod_status
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_STATUS_H #ifndef MOD_STATUS_H
#define MOD_STATUS_H #define MOD_STATUS_H
@ -52,3 +61,4 @@
APR_DECLARE_EXTERNAL_HOOK(ap, STATUS, int, status_hook, APR_DECLARE_EXTERNAL_HOOK(ap, STATUS, int, status_hook,
(request_rec *r, int flags)) (request_rec *r, int flags))
#endif #endif
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_suexec.h
* @brief SuExec Extension Module for Apache
*
* @defgroup MOD_SUEXEC mod_suexec
* @ingroup APACHE_MODS
* @{
*/
#include "unixd.h" #include "unixd.h"
typedef struct { typedef struct {
@ -21,3 +30,4 @@ typedef struct {
int active; int active;
} suexec_config_t; } suexec_config_t;
/** @}*/

View File

@ -14,6 +14,16 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_core.h
* @brief mod_core private header file
*
* @defgroup MOD_CORE mod_core
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_CORE_H #ifndef MOD_CORE_H
#define MOD_CORE_H #define MOD_CORE_H
@ -28,10 +38,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @package mod_core private header file
*/
/* Handles for core filters */ /* Handles for core filters */
extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_input_filter_handle; extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_input_filter_handle;
extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_header_filter_handle; extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_header_filter_handle;
@ -81,3 +87,4 @@ AP_DECLARE(int) ap_send_http_options(request_rec *r);
#endif #endif
#endif /* !MOD_CORE_H */ #endif /* !MOD_CORE_H */
/** @} */

View File

@ -17,8 +17,9 @@
#ifndef APU_LDAP_CACHE_H #ifndef APU_LDAP_CACHE_H
#define APU_LDAP_CACHE_H #define APU_LDAP_CACHE_H
/* /**
* This switches LDAP support on or off. * @file util_ldap_cache.h
* @brief This switches LDAP support on or off.
*/ */
/* this whole thing disappears if LDAP is not enabled */ /* this whole thing disappears if LDAP is not enabled */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_log_config.h
* @brief Logging Configuration Extension Module for Apache
*
* @defgroup MOD_LOG_CONFIG mod_log_config
* @ingroup APACHE_MODS
* @{
*/
#include "apr_optional.h" #include "apr_optional.h"
#include "httpd.h" #include "httpd.h"
#include "scoreboard.h" #include "scoreboard.h"
@ -61,3 +70,5 @@ APR_DECLARE_OPTIONAL_FN(ap_log_writer_init*, ap_log_set_writer_init,(ap_log_writ
APR_DECLARE_OPTIONAL_FN(ap_log_writer*, ap_log_set_writer, (ap_log_writer* func)); APR_DECLARE_OPTIONAL_FN(ap_log_writer*, ap_log_set_writer, (ap_log_writer* func));
#endif /* MOD_LOG_CONFIG */ #endif /* MOD_LOG_CONFIG */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_rewrite.h
* @brief Rewrite Extension module for Apache
*
* @defgroup MOD_REWRITE mod_rewrite
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_REWRITE_H #ifndef MOD_REWRITE_H
#define MOD_REWRITE_H 1 #define MOD_REWRITE_H 1
@ -28,3 +37,4 @@ APR_DECLARE_OPTIONAL_FN(void, ap_register_rewrite_mapfunc,
(char *name, rewrite_mapfunc_t *func)); (char *name, rewrite_mapfunc_t *func));
#endif /* MOD_REWRITE_H */ #endif /* MOD_REWRITE_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_so.h
* @brief Shared Object Loader Extension Module for Apache
*
* @defgroup MOD_SO mod_so
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_SO_H #ifndef MOD_SO_H
#define MOD_SO_H 1 #define MOD_SO_H 1
@ -25,4 +34,5 @@ APR_DECLARE_OPTIONAL_FN(module *, ap_find_loaded_module_symbol,
(server_rec *s, const char *modname)); (server_rec *s, const char *modname));
#endif /* MOD_SO_H */ #endif /* MOD_SO_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ajp.h
* @brief Apache Jserv Protocol
*
* @defgroup AJP_defines AJP definitions
* @ingroup MOD_PROXY
* @{
*/
#ifndef AJP_H #ifndef AJP_H
#define AJP_H #define AJP_H
@ -125,10 +134,6 @@ struct ajp_msg
int server_side; int server_side;
}; };
/**
* @defgroup AJP_defines AJP definitions
* @{
*/
/** /**
* Signature for the messages sent from Apache to tomcat * Signature for the messages sent from Apache to tomcat
*/ */
@ -161,6 +166,7 @@ struct ajp_msg
/** /**
* @defgroup AJP_api AJP API functions * @defgroup AJP_api AJP API functions
* @ingroup MOD_PROXY
* @{ * @{
*/ */
/** /**

View File

@ -13,6 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/**
* @file ajp_header.h
* @brief AJP defines
*
* @addtogroup AJP_defines
* @{
*/
#ifndef AJP_HEADER_H #ifndef AJP_HEADER_H
#define AJP_HEADER_H #define AJP_HEADER_H
@ -163,3 +172,4 @@
#define SC_RES_HEADERS_NUM 11 #define SC_RES_HEADERS_NUM 11
#endif /* AJP_HEADER_H */ #endif /* AJP_HEADER_H */
/** @} */

View File

@ -17,8 +17,13 @@
#ifndef MOD_PROXY_H #ifndef MOD_PROXY_H
#define MOD_PROXY_H #define MOD_PROXY_H
/* /**
* Main include file for the Apache proxy * @file mod_proxy.h
* @brief Proxy Extension Module for Apache
*
* @defgroup MOD_PROXY mod_proxy
* @ingroup APACHE_MODS
* @{
*/ */
/* /*
@ -696,3 +701,4 @@ extern module PROXY_DECLARE_DATA proxy_module;
extern int PROXY_DECLARE_DATA proxy_lb_workers; extern int PROXY_DECLARE_DATA proxy_lb_workers;
#endif /*MOD_PROXY_H*/ #endif /*MOD_PROXY_H*/
/** @} */

View File

@ -14,20 +14,29 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mod_ssl.h
* @brief SSL extension module for Apache
*
* @defgroup MOD_SSL mod_ssl
* @ingroup APACHE_MODS
* @{
*/
#ifndef __MOD_SSL_H__ #ifndef __MOD_SSL_H__
#define __MOD_SSL_H__ #define __MOD_SSL_H__
#include "httpd.h" #include "httpd.h"
#include "apr_optional.h" #include "apr_optional.h"
/* The ssl_var_lookup() optional function retrieves SSL environment /** The ssl_var_lookup() optional function retrieves SSL environment
* variables. */ * variables. */
APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup, APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
(apr_pool_t *, server_rec *, (apr_pool_t *, server_rec *,
conn_rec *, request_rec *, conn_rec *, request_rec *,
char *)); char *));
/* The ssl_ext_lookup() optional function retrieves the value of a SSL /** The ssl_ext_lookup() optional function retrieves the value of a SSL
* certificate X.509 extension. The client certificate is used if * certificate X.509 extension. The client certificate is used if
* peer is non-zero; the server certificate is used otherwise. The * peer is non-zero; the server certificate is used otherwise. The
* oidnum parameter specifies the numeric OID (e.g. "1.2.3.4") of the * oidnum parameter specifies the numeric OID (e.g. "1.2.3.4") of the
@ -37,11 +46,11 @@ APR_DECLARE_OPTIONAL_FN(const char *, ssl_ext_lookup,
(apr_pool_t *p, conn_rec *c, int peer, (apr_pool_t *p, conn_rec *c, int peer,
const char *oidnum)); const char *oidnum));
/* An optional function which returns non-zero if the given connection /** An optional function which returns non-zero if the given connection
* is using SSL/TLS. */ * is using SSL/TLS. */
APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *)); APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *));
/* The ssl_proxy_enable() and ssl_engine_disable() optional functions /** The ssl_proxy_enable() and ssl_engine_disable() optional functions
* are used by mod_proxy to enable use of SSL for outgoing * are used by mod_proxy to enable use of SSL for outgoing
* connections. */ * connections. */
@ -52,3 +61,4 @@ APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));
APR_DECLARE_OPTIONAL_FN(apr_array_header_t *, ssl_extlist_by_oid, (request_rec *r, const char *oidstr)); APR_DECLARE_OPTIONAL_FN(apr_array_header_t *, ssl_extlist_by_oid, (request_rec *r, const char *oidstr));
#endif /* __MOD_SSL_H__ */ #endif /* __MOD_SSL_H__ */
/** @} */

View File

@ -14,16 +14,23 @@
* limitations under the License. * limitations under the License.
*/ */
/* _ _ /**
* _ __ ___ ___ __| | ___ ___| | mod_ssl * @verbatim
* | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL _ _
* | | | | | | (_) | (_| | \__ \__ \ | _ __ ___ ___ __| | ___ ___| | mod_ssl
* |_| |_| |_|\___/ \__,_|___|___/___/_| | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
* |_____| | | | | | | (_) | (_| | \__ \__ \ |
* ssl_expr.h |_| |_| |_|\___/ \__,_|___|___/___/_|
* Expression Handling (Header) |_____|
@endverbatim
* @file ssl_expr.h
* @brief Expression Handling (Header).
* ``May all your PUSHes be POPed.''
*
* @defgroup MOD_SSL_EXPR Expression Handling
* @ingroup MOD_SSL
* @{
*/ */
/* ``May all your PUSHes be POPed.'' */
#ifndef __SSL_EXPR_H__ #ifndef __SSL_EXPR_H__
#define __SSL_EXPR_H__ #define __SSL_EXPR_H__
@ -102,3 +109,5 @@ extern ssl_expr *ssl_expr_make(ssl_expr_node_op, void *, void *);
extern BOOL ssl_expr_eval(request_rec *, ssl_expr *); extern BOOL ssl_expr_eval(request_rec *, ssl_expr *);
#endif /* __SSL_EXPR_H__ */ #endif /* __SSL_EXPR_H__ */
/** @} */

View File

@ -17,11 +17,16 @@
#ifndef SSL_PRIVATE_H #ifndef SSL_PRIVATE_H
#define SSL_PRIVATE_H #define SSL_PRIVATE_H
/* /**
* Internal interfaces private to mod_ssl. * @file ssl_private.h
* @brief Internal interfaces private to mod_ssl.
*
* @defgroup MOD_SSL_PRIVATE Private
* @ingroup MOD_SSL
* @{
*/ */
/* Apache headers */ /** Apache headers */
#include "httpd.h" #include "httpd.h"
#include "http_config.h" #include "http_config.h"
#include "http_core.h" #include "http_core.h"
@ -50,22 +55,22 @@
#define MOD_SSL_VERSION AP_SERVER_BASEREVISION #define MOD_SSL_VERSION AP_SERVER_BASEREVISION
/* mod_ssl headers */ /** mod_ssl headers */
#include "ssl_toolkit_compat.h" #include "ssl_toolkit_compat.h"
#include "ssl_expr.h" #include "ssl_expr.h"
#include "ssl_util_ssl.h" #include "ssl_util_ssl.h"
/* The #ifdef macros are only defined AFTER including the above /** The #ifdef macros are only defined AFTER including the above
* therefore we cannot include these system files at the top :-( * therefore we cannot include these system files at the top :-(
*/ */
#if APR_HAVE_SYS_TIME_H #if APR_HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#if APR_HAVE_UNISTD_H #if APR_HAVE_UNISTD_H
#include <unistd.h> /* needed for STDIN_FILENO et.al., at least on FreeBSD */ #include <unistd.h> /** needed for STDIN_FILENO et.al., at least on FreeBSD */
#endif #endif
/* /**
* Provide reasonable default for some defines * Provide reasonable default for some defines
*/ */
#ifndef FALSE #ifndef FALSE
@ -91,7 +96,7 @@
#define RAND_MAX INT_MAX #define RAND_MAX INT_MAX
#endif #endif
/* /**
* Provide reasonable defines for some types * Provide reasonable defines for some types
*/ */
#ifndef BOOL #ifndef BOOL
@ -101,7 +106,7 @@
#define UCHAR unsigned char #define UCHAR unsigned char
#endif #endif
/* /**
* Provide useful shorthands * Provide useful shorthands
*/ */
#define strEQ(s1,s2) (strcmp(s1,s2) == 0) #define strEQ(s1,s2) (strcmp(s1,s2) == 0)
@ -128,19 +133,19 @@ ap_set_module_config(c->conn_config, &ssl_module, val)
#define myCtxVarSet(mc,num,val) mc->rCtx.pV##num = val #define myCtxVarSet(mc,num,val) mc->rCtx.pV##num = val
#define myCtxVarGet(mc,num,type) (type)(mc->rCtx.pV##num) #define myCtxVarGet(mc,num,type) (type)(mc->rCtx.pV##num)
/* /**
* Defaults for the configuration * Defaults for the configuration
*/ */
#ifndef SSL_SESSION_CACHE_TIMEOUT #ifndef SSL_SESSION_CACHE_TIMEOUT
#define SSL_SESSION_CACHE_TIMEOUT 300 #define SSL_SESSION_CACHE_TIMEOUT 300
#endif #endif
/* /**
* Support for MM library * Support for MM library
*/ */
#define SSL_MM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD ) #define SSL_MM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
/* /**
* Support for DBM library * Support for DBM library
*/ */
#define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD ) #define SSL_DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
@ -158,7 +163,7 @@ ap_set_module_config(c->conn_config, &ssl_module, val)
#endif #endif
#endif #endif
/* /**
* Define the certificate algorithm types * Define the certificate algorithm types
*/ */
@ -174,7 +179,7 @@ typedef int ssl_algo_t;
#define SSL_AIDX_MAX (2) #define SSL_AIDX_MAX (2)
/* /**
* Define IDs for the temporary RSA keys and DH params * Define IDs for the temporary RSA keys and DH params
*/ */
@ -184,7 +189,7 @@ typedef int ssl_algo_t;
#define SSL_TMP_KEY_DH_1024 (3) #define SSL_TMP_KEY_DH_1024 (3)
#define SSL_TMP_KEY_MAX (4) #define SSL_TMP_KEY_MAX (4)
/* /**
* Define the SSL options * Define the SSL options
*/ */
#define SSL_OPT_NONE (0) #define SSL_OPT_NONE (0)
@ -197,7 +202,7 @@ typedef int ssl_algo_t;
#define SSL_OPT_ALL (SSL_OPT_STDENVVARS|SSL_OPT_EXPORTCERTDATA|SSL_OPT_FAKEBASICAUTH|SSL_OPT_STRICTREQUIRE|SSL_OPT_OPTRENEGOTIATE) #define SSL_OPT_ALL (SSL_OPT_STDENVVARS|SSL_OPT_EXPORTCERTDATA|SSL_OPT_FAKEBASICAUTH|SSL_OPT_STRICTREQUIRE|SSL_OPT_OPTRENEGOTIATE)
typedef int ssl_opt_t; typedef int ssl_opt_t;
/* /**
* Define the SSL Protocol options * Define the SSL Protocol options
*/ */
#define SSL_PROTOCOL_NONE (0) #define SSL_PROTOCOL_NONE (0)
@ -207,7 +212,7 @@ typedef int ssl_opt_t;
#define SSL_PROTOCOL_ALL (SSL_PROTOCOL_SSLV2|SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1) #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_SSLV2|SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1)
typedef int ssl_proto_t; typedef int ssl_proto_t;
/* /**
* Define the SSL verify levels * Define the SSL verify levels
*/ */
typedef enum { typedef enum {
@ -232,7 +237,7 @@ typedef enum {
|| (errnum == X509_V_ERR_CERT_UNTRUSTED) \ || (errnum == X509_V_ERR_CERT_UNTRUSTED) \
|| (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE)) || (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
/* /**
* Define the SSL pass phrase dialog types * Define the SSL pass phrase dialog types
*/ */
typedef enum { typedef enum {
@ -242,7 +247,7 @@ typedef enum {
SSL_PPTYPE_PIPE = 2 SSL_PPTYPE_PIPE = 2
} ssl_pphrase_t; } ssl_pphrase_t;
/* /**
* Define the Path Checking modes * Define the Path Checking modes
*/ */
#define SSL_PCM_EXISTS 1 #define SSL_PCM_EXISTS 1
@ -251,7 +256,7 @@ typedef enum {
#define SSL_PCM_ISNONZERO 8 #define SSL_PCM_ISNONZERO 8
typedef unsigned int ssl_pathcheck_t; typedef unsigned int ssl_pathcheck_t;
/* /**
* Define the SSL session cache modes and structures * Define the SSL session cache modes and structures
*/ */
typedef enum { typedef enum {
@ -263,7 +268,7 @@ typedef enum {
SSL_SCMODE_NONE_NOT_NULL = 5 SSL_SCMODE_NONE_NOT_NULL = 5
} ssl_scmode_t; } ssl_scmode_t;
/* /**
* Define the SSL mutex modes * Define the SSL mutex modes
*/ */
typedef enum { typedef enum {
@ -272,7 +277,7 @@ typedef enum {
SSL_MUTEXMODE_USED = 1 SSL_MUTEXMODE_USED = 1
} ssl_mutexmode_t; } ssl_mutexmode_t;
/* /**
* Define the SSL enabled state * Define the SSL enabled state
*/ */
typedef enum { typedef enum {
@ -282,7 +287,7 @@ typedef enum {
SSL_ENABLED_OPTIONAL = 3 SSL_ENABLED_OPTIONAL = 3
} ssl_enabled_t; } ssl_enabled_t;
/* /**
* Define the SSL requirement structure * Define the SSL requirement structure
*/ */
typedef struct { typedef struct {
@ -290,7 +295,7 @@ typedef struct {
ssl_expr *mpExpr; ssl_expr *mpExpr;
} ssl_require_t; } ssl_require_t;
/* /**
* Define the SSL random number generator seeding source * Define the SSL random number generator seeding source
*/ */
typedef enum { typedef enum {
@ -310,7 +315,7 @@ typedef struct {
int nBytes; int nBytes;
} ssl_randseed_t; } ssl_randseed_t;
/* /**
* Define the structure of an ASN.1 anything * Define the structure of an ASN.1 anything
*/ */
typedef struct { typedef struct {
@ -319,7 +324,7 @@ typedef struct {
apr_time_t source_mtime; apr_time_t source_mtime;
} ssl_asn1_t; } ssl_asn1_t;
/* /**
* Define the mod_ssl per-module configuration structure * Define the mod_ssl per-module configuration structure
* (i.e. the global configuration for each httpd process) * (i.e. the global configuration for each httpd process)
*/ */
@ -371,9 +376,9 @@ typedef struct {
} rCtx; } rCtx;
} SSLModConfigRec; } SSLModConfigRec;
/* public cert/private key */ /** public cert/private key */
typedef struct { typedef struct {
/* /**
* server only has 1-2 certs/keys * server only has 1-2 certs/keys
* 1 RSA and/or 1 DSA * 1 RSA and/or 1 DSA
*/ */
@ -382,28 +387,28 @@ typedef struct {
X509 *certs[SSL_AIDX_MAX]; X509 *certs[SSL_AIDX_MAX];
EVP_PKEY *keys[SSL_AIDX_MAX]; EVP_PKEY *keys[SSL_AIDX_MAX];
/* Certificates which specify the set of CA names which should be /** Certificates which specify the set of CA names which should be
* sent in the CertificateRequest message: */ * sent in the CertificateRequest message: */
const char *ca_name_path; const char *ca_name_path;
const char *ca_name_file; const char *ca_name_file;
} modssl_pk_server_t; } modssl_pk_server_t;
typedef struct { typedef struct {
/* proxy can have any number of cert/key pairs */ /** proxy can have any number of cert/key pairs */
const char *cert_file; const char *cert_file;
const char *cert_path; const char *cert_path;
STACK_OF(X509_INFO) *certs; STACK_OF(X509_INFO) *certs;
} modssl_pk_proxy_t; } modssl_pk_proxy_t;
/* stuff related to authentication that can also be per-dir */ /** stuff related to authentication that can also be per-dir */
typedef struct { typedef struct {
/* known/trusted CAs */ /** known/trusted CAs */
const char *ca_cert_path; const char *ca_cert_path;
const char *ca_cert_file; const char *ca_cert_file;
const char *cipher_suite; const char *cipher_suite;
/* for client or downstream server authentication */ /** for client or downstream server authentication */
int verify_depth; int verify_depth;
ssl_verify_t verify_mode; ssl_verify_t verify_mode;
} modssl_auth_ctx_t; } modssl_auth_ctx_t;
@ -411,22 +416,22 @@ typedef struct {
typedef struct SSLSrvConfigRec SSLSrvConfigRec; typedef struct SSLSrvConfigRec SSLSrvConfigRec;
typedef struct { typedef struct {
SSLSrvConfigRec *sc; /* pointer back to server config */ SSLSrvConfigRec *sc; /** pointer back to server config */
SSL_CTX *ssl_ctx; SSL_CTX *ssl_ctx;
/* we are one or the other */ /** we are one or the other */
modssl_pk_server_t *pks; modssl_pk_server_t *pks;
modssl_pk_proxy_t *pkp; modssl_pk_proxy_t *pkp;
ssl_proto_t protocol; ssl_proto_t protocol;
/* config for handling encrypted keys */ /** config for handling encrypted keys */
ssl_pphrase_t pphrase_dialog_type; ssl_pphrase_t pphrase_dialog_type;
const char *pphrase_dialog_path; const char *pphrase_dialog_path;
const char *cert_chain; const char *cert_chain;
/* certificate revocation list */ /** certificate revocation list */
const char *crl_path; const char *crl_path;
const char *crl_file; const char *crl_file;
X509_STORE *crl; X509_STORE *crl;
@ -446,7 +451,7 @@ struct SSLSrvConfigRec {
modssl_ctx_t *proxy; modssl_ctx_t *proxy;
}; };
/* /**
* Define the mod_ssl per-directory configuration structure * Define the mod_ssl per-directory configuration structure
* (i.e. the local configuration for all <Directory> * (i.e. the local configuration for all <Directory>
* and .htaccess contexts) * and .htaccess contexts)
@ -465,17 +470,17 @@ typedef struct {
const char *szUserName; const char *szUserName;
} SSLDirConfigRec; } SSLDirConfigRec;
/* /**
* function prototypes * function prototypes
*/ */
/* API glue structures */ /** API glue structures */
extern module AP_MODULE_DECLARE_DATA ssl_module; extern module AP_MODULE_DECLARE_DATA ssl_module;
/* "global" stuff */ /** "global" stuff */
extern const char ssl_valid_ssl_mutex_string[]; extern const char ssl_valid_ssl_mutex_string[];
/* configuration handling */ /** configuration handling */
SSLModConfigRec *ssl_config_global_create(server_rec *); SSLModConfigRec *ssl_config_global_create(server_rec *);
void ssl_config_global_fix(SSLModConfigRec *); void ssl_config_global_fix(SSLModConfigRec *);
BOOL ssl_config_global_isfixed(SSLModConfigRec *); BOOL ssl_config_global_isfixed(SSLModConfigRec *);
@ -521,7 +526,7 @@ const char *ssl_cmd_SSLProxyCARevocationFile(cmd_parms *, void *, const char *)
const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *); const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *);
const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *); const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *);
/* module initialization */ /** module initialization */
int ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *); int ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *);
void ssl_init_Engine(server_rec *, apr_pool_t *); void ssl_init_Engine(server_rec *, apr_pool_t *);
void ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *); void ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *);
@ -531,7 +536,7 @@ STACK_OF(X509_NAME)
void ssl_init_Child(apr_pool_t *, server_rec *); void ssl_init_Child(apr_pool_t *, server_rec *);
apr_status_t ssl_init_ModuleKill(void *data); apr_status_t ssl_init_ModuleKill(void *data);
/* Apache API hooks */ /** Apache API hooks */
int ssl_hook_Auth(request_rec *); int ssl_hook_Auth(request_rec *);
int ssl_hook_UserCheck(request_rec *); int ssl_hook_UserCheck(request_rec *);
int ssl_hook_Access(request_rec *); int ssl_hook_Access(request_rec *);
@ -540,7 +545,7 @@ int ssl_hook_ReadReq(request_rec *);
int ssl_hook_Upgrade(request_rec *); int ssl_hook_Upgrade(request_rec *);
void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s); void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s);
/* OpenSSL callbacks */ /** OpenSSL callbacks */
RSA *ssl_callback_TmpRSA(SSL *, int, int); RSA *ssl_callback_TmpRSA(SSL *, int, int);
DH *ssl_callback_TmpDH(SSL *, int, int); DH *ssl_callback_TmpDH(SSL *, int, int);
int ssl_callback_SSLVerify(int, X509_STORE_CTX *); int ssl_callback_SSLVerify(int, X509_STORE_CTX *);
@ -551,7 +556,7 @@ SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *, unsigned char *, int, int
void ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *); void ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *);
void ssl_callback_LogTracingState(MODSSL_INFO_CB_ARG_TYPE, int, int); void ssl_callback_LogTracingState(MODSSL_INFO_CB_ARG_TYPE, int, int);
/* Session Cache Support */ /** Session Cache Support */
void ssl_scache_init(server_rec *, apr_pool_t *); void ssl_scache_init(server_rec *, apr_pool_t *);
void ssl_scache_status_register(apr_pool_t *p); void ssl_scache_status_register(apr_pool_t *p);
void ssl_scache_kill(server_rec *); void ssl_scache_kill(server_rec *);
@ -581,19 +586,19 @@ SSL_SESSION *ssl_scache_dc_retrieve(server_rec *, UCHAR *, int);
void ssl_scache_dc_remove(server_rec *, UCHAR *, int); void ssl_scache_dc_remove(server_rec *, UCHAR *, int);
void ssl_scache_dc_status(request_rec *r, int flags, apr_pool_t *pool); void ssl_scache_dc_status(request_rec *r, int flags, apr_pool_t *pool);
/* Proxy Support */ /** Proxy Support */
int ssl_proxy_enable(conn_rec *c); int ssl_proxy_enable(conn_rec *c);
int ssl_engine_disable(conn_rec *c); int ssl_engine_disable(conn_rec *c);
/* I/O */ /** I/O */
void ssl_io_filter_init(conn_rec *, SSL *); void ssl_io_filter_init(conn_rec *, SSL *);
void ssl_io_filter_register(apr_pool_t *); void ssl_io_filter_register(apr_pool_t *);
long ssl_io_data_cb(BIO *, int, MODSSL_BIO_CB_ARG_TYPE *, int, long, long); long ssl_io_data_cb(BIO *, int, MODSSL_BIO_CB_ARG_TYPE *, int, long, long);
/* PRNG */ /** PRNG */
int ssl_rand_seed(server_rec *, apr_pool_t *, ssl_rsctx_t, char *); int ssl_rand_seed(server_rec *, apr_pool_t *, ssl_rsctx_t, char *);
/* Utility Functions */ /** Utility Functions */
char *ssl_util_vhostid(apr_pool_t *, server_rec *); char *ssl_util_vhostid(apr_pool_t *, server_rec *);
apr_file_t *ssl_util_ppopen(server_rec *, apr_pool_t *, const char *, apr_file_t *ssl_util_ppopen(server_rec *, apr_pool_t *, const char *,
const char * const *); const char * const *);
@ -606,10 +611,10 @@ char *ssl_util_algotypestr(ssl_algo_t);
void ssl_util_thread_setup(apr_pool_t *); void ssl_util_thread_setup(apr_pool_t *);
int ssl_init_ssl_connection(conn_rec *c); int ssl_init_ssl_connection(conn_rec *c);
/* Pass Phrase Support */ /** Pass Phrase Support */
void ssl_pphrase_Handle(server_rec *, apr_pool_t *); void ssl_pphrase_Handle(server_rec *, apr_pool_t *);
/* Diffie-Hellman Parameter Support */ /** Diffie-Hellman Parameter Support */
DH *ssl_dh_GetTmpParam(int); DH *ssl_dh_GetTmpParam(int);
DH *ssl_dh_GetParamFromFile(char *); DH *ssl_dh_GetParamFromFile(char *);
@ -628,17 +633,17 @@ const char *ssl_asn1_keystr(int keytype);
const char *ssl_asn1_table_keyfmt(apr_pool_t *p, const char *ssl_asn1_table_keyfmt(apr_pool_t *p,
const char *id, const char *id,
int keytype); int keytype);
/* Mutex Support */ /** Mutex Support */
int ssl_mutex_init(server_rec *, apr_pool_t *); int ssl_mutex_init(server_rec *, apr_pool_t *);
int ssl_mutex_reinit(server_rec *, apr_pool_t *); int ssl_mutex_reinit(server_rec *, apr_pool_t *);
int ssl_mutex_on(server_rec *); int ssl_mutex_on(server_rec *);
int ssl_mutex_off(server_rec *); int ssl_mutex_off(server_rec *);
/* Logfile Support */ /** Logfile Support */
void ssl_die(void); void ssl_die(void);
void ssl_log_ssl_error(const char *, int, int, server_rec *); void ssl_log_ssl_error(const char *, int, int, server_rec *);
/* Variables */ /** Variables */
void ssl_var_register(void); void ssl_var_register(void);
char *ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *); char *ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *);
const char *ssl_ext_lookup(apr_pool_t *p, conn_rec *c, int peer, const char *oid); const char *ssl_ext_lookup(apr_pool_t *p, conn_rec *c, int peer, const char *oid);
@ -650,3 +655,5 @@ void ssl_var_log_config_register(apr_pool_t *p);
#define APR_SHM_MAXSIZE (64 * 1024 * 1024) #define APR_SHM_MAXSIZE (64 * 1024 * 1024)
#endif /* SSL_PRIVATE_H */ #endif /* SSL_PRIVATE_H */
/** @} */

View File

@ -17,14 +17,19 @@
#ifndef SSL_TOOLKIT_COMPAT_H #ifndef SSL_TOOLKIT_COMPAT_H
#define SSL_TOOLKIT_COMPAT_H #define SSL_TOOLKIT_COMPAT_H
/* /**
* this header file provides a compatiblity layer * @file ssl_toolkit_compat.h
* between OpenSSL and RSA sslc * @brief this header file provides a compatiblity layer
* between OpenSSL and RSA sslc
*
* @defgroup MOD_SSL_TOOLKIT Toolkit
* @ingroup MOD_SSL
* @{
*/ */
#ifdef HAVE_OPENSSL #ifdef HAVE_OPENSSL
/* OpenSSL headers */ /** OpenSSL headers */
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/x509.h> #include <openssl/x509.h>
@ -33,14 +38,14 @@
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#include <openssl/x509v3.h> #include <openssl/x509v3.h>
/* Avoid tripping over an engine build installed globally and detected /** Avoid tripping over an engine build installed globally and detected
* when the user points at an explicit non-engine flavor of OpenSSL * when the user points at an explicit non-engine flavor of OpenSSL
*/ */
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT) #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
#include <openssl/engine.h> #include <openssl/engine.h>
#endif #endif
/* /**
* rsa sslc uses incomplete types for most structures * rsa sslc uses incomplete types for most structures
* so we macroize for OpenSSL those which cannot be dereferenced * so we macroize for OpenSSL those which cannot be dereferenced
* using the same sames as the sslc functions * using the same sames as the sslc functions
@ -66,7 +71,7 @@
#define SSL_SESSION_get_session_id(s) (s->session_id) #define SSL_SESSION_get_session_id(s) (s->session_id)
#define SSL_SESSION_get_session_id_length(s) (s->session_id_length) #define SSL_SESSION_get_session_id_length(s) (s->session_id_length)
/* /**
* Support for retrieving/overriding states * Support for retrieving/overriding states
*/ */
#ifndef SSL_get_state #ifndef SSL_get_state
@ -85,7 +90,7 @@
#define MODSSL_CLIENT_CERT_CB_ARG_TYPE X509 #define MODSSL_CLIENT_CERT_CB_ARG_TYPE X509
#define MODSSL_PCHAR_CAST #define MODSSL_PCHAR_CAST
/* ...shifting sands of openssl... */ /** ...shifting sands of openssl... */
#if (OPENSSL_VERSION_NUMBER >= 0x0090707f) #if (OPENSSL_VERSION_NUMBER >= 0x0090707f)
# define MODSSL_D2I_SSL_SESSION_CONST const # define MODSSL_D2I_SSL_SESSION_CONST const
#else #else
@ -130,7 +135,7 @@ typedef int (modssl_read_bio_cb_fn)(char*,int,int,void*);
#ifndef PEM_F_DEF_CALLBACK #ifndef PEM_F_DEF_CALLBACK
#ifdef PEM_F_PEM_DEF_CALLBACK #ifdef PEM_F_PEM_DEF_CALLBACK
/* In OpenSSL 0.9.8 PEM_F_DEF_CALLBACK was renamed */ /** In OpenSSL 0.9.8 PEM_F_DEF_CALLBACK was renamed */
#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK #define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK
#endif #endif
#endif #endif
@ -146,10 +151,10 @@ typedef int (modssl_read_bio_cb_fn)(char*,int,int,void*);
#include <objects.h> #include <objects.h>
#include <sslc.h> #include <sslc.h>
/* sslc does not support this function, OpenSSL has since 9.5.1 */ /** sslc does not support this function, OpenSSL has since 9.5.1 */
#define RAND_status() 1 #define RAND_status() 1
/* sslc names this function a bit differently */ /** sslc names this function a bit differently */
#define CRYPTO_num_locks() CRYPTO_get_num_locks() #define CRYPTO_num_locks() CRYPTO_get_num_locks()
#ifndef STACK_OF #ifndef STACK_OF
@ -179,7 +184,7 @@ typedef int (modssl_read_bio_cb_fn)(char*,int,int);
PEM_read_bio_PrivateKey(b, k, cb) PEM_read_bio_PrivateKey(b, k, cb)
#ifndef HAVE_SSL_SET_STATE #ifndef HAVE_SSL_SET_STATE
#define SSL_set_state(ssl, state) /* XXX: should throw an error */ #define SSL_set_state(ssl, state) /** XXX: should throw an error */
#endif #endif
#define modssl_set_cipher_list(ssl, l) \ #define modssl_set_cipher_list(ssl, l) \
@ -202,13 +207,13 @@ typedef int (modssl_read_bio_cb_fn)(char*,int,int);
#define modssl_set_verify(ssl, verify, cb) \ #define modssl_set_verify(ssl, verify, cb) \
SSL_set_verify(ssl, verify) SSL_set_verify(ssl, verify)
#else /* SSLC_VERSION_NUMBER >= 0x2000 */ #else /** SSLC_VERSION_NUMBER >= 0x2000 */
#define CRYPTO_malloc_init R_malloc_init #define CRYPTO_malloc_init R_malloc_init
#define EVP_cleanup() #define EVP_cleanup()
#endif /* SSLC_VERSION_NUMBER >= 0x2000 */ #endif /** SSLC_VERSION_NUMBER >= 0x2000 */
typedef void (*modssl_popfree_fn)(char *data); typedef void (*modssl_popfree_fn)(char *data);
@ -238,7 +243,7 @@ typedef void (*modssl_popfree_fn)(char *data);
#define sk_X509_REVOKED_num sk_num #define sk_X509_REVOKED_num sk_num
#define sk_X509_REVOKED_value (X509_REVOKED *)sk_value #define sk_X509_REVOKED_value (X509_REVOKED *)sk_value
#else /* ! HAVE_OPENSSL && ! HAVE_SSLC */ #else /** ! HAVE_OPENSSL && ! HAVE_SSLC */
#error "Unrecognized SSL Toolkit!" #error "Unrecognized SSL Toolkit!"
@ -254,3 +259,5 @@ typedef void (*modssl_popfree_fn)(char *data);
#endif #endif
#endif /* SSL_TOOLKIT_COMPAT_H */ #endif /* SSL_TOOLKIT_COMPAT_H */
/** @} */

View File

@ -14,20 +14,27 @@
* limitations under the License. * limitations under the License.
*/ */
/* _ _ /**
* _ __ ___ ___ __| | ___ ___| | mod_ssl * @verbatim
* | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL _ _
* | | | | | | (_) | (_| | \__ \__ \ | _ __ ___ ___ __| | ___ ___| | mod_ssl
* |_| |_| |_|\___/ \__,_|___|___/___/_| | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
* |_____| | | | | | | (_) | (_| | \__ \__ \ |
* ssl_util_ssl.h |_| |_| |_|\___/ \__,_|___|___/___/_|
* Additional Utility Functions for OpenSSL |_____|
@endverbatim
* @file ssl_util_ssl.h
* @brief Additional Utility Functions for OpenSSL
*
* @defgroup MOD_SSL_UTIL Utilities
* @ingroup MOD_SSL
* @{
*/ */
#ifndef __SSL_UTIL_SSL_H__ #ifndef __SSL_UTIL_SSL_H__
#define __SSL_UTIL_SSL_H__ #define __SSL_UTIL_SSL_H__
/* /**
* Determine SSL library version number * Determine SSL library version number
*/ */
#ifdef OPENSSL_VERSION_NUMBER #ifdef OPENSSL_VERSION_NUMBER
@ -40,18 +47,18 @@
#define SSL_LIBRARY_TEXT "OtherSSL 0.0.0 00 XXX 0000" #define SSL_LIBRARY_TEXT "OtherSSL 0.0.0 00 XXX 0000"
#endif #endif
/* /**
* Maximum length of a DER encoded session. * Maximum length of a DER encoded session.
* FIXME: There is no define in OpenSSL, but OpenSSL uses 1024*10, * FIXME: There is no define in OpenSSL, but OpenSSL uses 1024*10,
* so this value should be ok. Although we have no warm feeling. * so this value should be ok. Although we have no warm feeling.
*/ */
#define SSL_SESSION_MAX_DER 1024*10 #define SSL_SESSION_MAX_DER 1024*10
/* max length for SSL_SESSION_id2sz */ /** max length for SSL_SESSION_id2sz */
#define SSL_SESSION_ID_STRING_LEN \ #define SSL_SESSION_ID_STRING_LEN \
((SSL_MAX_SSL_SESSION_ID_LENGTH + 1) * 2) ((SSL_MAX_SSL_SESSION_ID_LENGTH + 1) * 2)
/* /**
* Additional Functions * Additional Functions
*/ */
void SSL_init_app_data2_idx(void); void SSL_init_app_data2_idx(void);
@ -71,10 +78,12 @@ BOOL SSL_X509_INFO_load_path(apr_pool_t *, STACK_OF(X509_INFO) *, const c
int SSL_CTX_use_certificate_chain(SSL_CTX *, char *, int, modssl_read_bio_cb_fn *); int SSL_CTX_use_certificate_chain(SSL_CTX *, char *, int, modssl_read_bio_cb_fn *);
char *SSL_SESSION_id2sz(unsigned char *, int, char *, int); char *SSL_SESSION_id2sz(unsigned char *, int, char *, int);
/* util functions for OpenSSL+sslc compat */ /** util functions for OpenSSL+sslc compat */
int modssl_session_get_time(SSL_SESSION *session); int modssl_session_get_time(SSL_SESSION *session);
DH *modssl_dh_configure(unsigned char *p, int plen, DH *modssl_dh_configure(unsigned char *p, int plen,
unsigned char *g, int glen); unsigned char *g, int glen);
#endif /* __SSL_UTIL_SSL_H__ */ #endif /* __SSL_UTIL_SSL_H__ */
/** @} */

View File

@ -14,12 +14,19 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file beosd.h
* @brief common stuff that beos MPMs will want
*
* @addtogroup APACHE_OS_BEOS
* @{
*/
#ifndef BEOSD_H #ifndef BEOSD_H
#define BEOSD_H #define BEOSD_H
#include "httpd.h" #include "httpd.h"
#include "ap_listen.h" #include "ap_listen.h"
/* common stuff that beos MPMs will want */
/* Default user name and group name. These may be specified as numbers by /* Default user name and group name. These may be specified as numbers by
* placing a # before a number */ * placing a # before a number */
@ -58,3 +65,4 @@ AP_INIT_TAKE1("Group", beosd_set_group, NULL, RSRC_CONF, \
"Effective group id for this server (NO-OP)") "Effective group id for this server (NO-OP)")
#endif /* BEOSD_H */ #endif /* BEOSD_H */
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file beos/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_BEOS beos
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_H #ifndef APACHE_OS_H
#define APACHE_OS_H #define APACHE_OS_H
@ -28,3 +39,4 @@
#endif #endif
#endif /* !APACHE_OS_H */ #endif /* !APACHE_OS_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file bs2000/ebcdic.h
* @brief EBCDIC/ASCII converson function declarations
*
* @addtogroup APACHE_OS_BS2000
* @{
*/
#include <sys/types.h> #include <sys/types.h>
extern const unsigned char os_toascii[256]; extern const unsigned char os_toascii[256];
@ -21,4 +29,5 @@ extern const unsigned char os_toebcdic[256];
void ebcdic2ascii(unsigned char *dest, const unsigned char *srce, size_t count); void ebcdic2ascii(unsigned char *dest, const unsigned char *srce, size_t count);
void ebcdic2ascii_strictly(unsigned char *dest, const unsigned char *srce, size_t count); void ebcdic2ascii_strictly(unsigned char *dest, const unsigned char *srce, size_t count);
void ascii2ebcdic(unsigned char *dest, const unsigned char *srce, size_t count); void ascii2ebcdic(unsigned char *dest, const unsigned char *srce, size_t count);
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file bs2000/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_BS2000 bs2000
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_BS2000_H #ifndef APACHE_OS_BS2000_H
#define APACHE_OS_BS2000_H #define APACHE_OS_BS2000_H
@ -21,14 +32,9 @@
#include "../unix/os.h" #include "../unix/os.h"
/*
* This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*/
/* Other ap_os_ routines not used by this platform */ /* Other ap_os_ routines not used by this platform */
extern pid_t os_fork(const char *user); extern pid_t os_fork(const char *user);
#endif /* APACHE_OS_BS2000_H */ #endif /* APACHE_OS_BS2000_H */
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file netware/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_NETWARE netware
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_H #ifndef APACHE_OS_H
#define APACHE_OS_H #define APACHE_OS_H
@ -38,3 +49,4 @@ AP_DECLARE_DATA extern int hold_screen_on_exit; /* Indicates whether the screen
#define exit(s) {if((s||hold_screen_on_exit)&&(hold_screen_on_exit>=0)){pressanykey();}apr_terminate();exit(s);} #define exit(s) {if((s||hold_screen_on_exit)&&(hold_screen_on_exit>=0)){pressanykey();}apr_terminate();exit(s);}
#endif /* ! APACHE_OS_H */ #endif /* ! APACHE_OS_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file pre_nw.h
* @brief Definitions for Netware systems
*
* @addtogroup APACHE_OS_NETWARE
* @{
*/
#ifndef __pre_nw__ #ifndef __pre_nw__
#define __pre_nw__ #define __pre_nw__
@ -65,6 +73,4 @@
#define AP_MAX_INCLUDE_DEPTH 48 #define AP_MAX_INCLUDE_DEPTH 48
#endif #endif
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file os2/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_OS2 os2
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_H #ifndef APACHE_OS_H
#define APACHE_OS_H #define APACHE_OS_H
@ -24,10 +35,5 @@
#define HAVE_UNC_PATHS #define HAVE_UNC_PATHS
#define CASE_BLIND_FILESYSTEM #define CASE_BLIND_FILESYSTEM
/*
* This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*/
#endif /* ! APACHE_OS_H */ #endif /* ! APACHE_OS_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file tpf/ebcdic.h
* @brief EBCDIC/ASCII converson function declarations
*
* @addtogroup APACHE_OS_TPF
* @{
*/
#include <sys/types.h> #include <sys/types.h>
extern const unsigned char os_toascii[256]; extern const unsigned char os_toascii[256];
@ -21,4 +29,4 @@ extern const unsigned char os_toebcdic[256];
void ebcdic2ascii(void *dest, const void *srce, size_t count); void ebcdic2ascii(void *dest, const void *srce, size_t count);
void ebcdic2ascii_strictly(unsigned char *dest, const unsigned char *srce, size_t count); void ebcdic2ascii_strictly(unsigned char *dest, const unsigned char *srce, size_t count);
void ascii2ebcdic(void *dest, const void *srce, size_t count); void ascii2ebcdic(void *dest, const void *srce, size_t count);
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file tpf/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_TPF tpf
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_H #ifndef APACHE_OS_H
#define APACHE_OS_H #define APACHE_OS_H
@ -23,12 +34,6 @@
#undef errno #undef errno
#endif #endif
/*
* This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*/
#include "apr.h" #include "apr.h"
#include "ap_config.h" #include "ap_config.h"
#include <strings.h> #include <strings.h>
@ -85,3 +90,4 @@ extern int scoreboard_fd;
#undef NSIG #undef NSIG
#endif #endif
#endif /*! APACHE_OS_H*/ #endif /*! APACHE_OS_H*/
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file unix/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_UNIX unix
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_H #ifndef APACHE_OS_H
#define APACHE_OS_H #define APACHE_OS_H
@ -34,3 +45,4 @@ pid_t os_fork(const char *user);
#endif #endif
#endif /* !APACHE_OS_H */ #endif /* !APACHE_OS_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file unixd.h
* @brief common stuff that unix MPMs will want
*
* @addtogroup APACHE_OS_UNIX
* @{
*/
#ifndef UNIXD_H #ifndef UNIXD_H
#define UNIXD_H #define UNIXD_H
@ -48,7 +56,6 @@ typedef struct {
AP_DECLARE_HOOK(ap_unix_identity_t *, get_suexec_identity,(const request_rec *r)) AP_DECLARE_HOOK(ap_unix_identity_t *, get_suexec_identity,(const request_rec *r))
/* common stuff that unix MPMs will want */
/* Default user name and group name. These may be specified as numbers by /* Default user name and group name. These may be specified as numbers by
* placing a # before a number */ * placing a # before a number */
@ -107,3 +114,4 @@ AP_INIT_TAKE1("Group", unixd_set_group, NULL, RSRC_CONF, \
"Effective group id for this server") "Effective group id for this server")
#endif #endif
/** @} */

View File

@ -14,6 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file win32/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_WIN32 win32
* @ingroup APACHE_OS
* @{
*/
#ifdef WIN32 #ifdef WIN32
#ifndef AP_OS_H #ifndef AP_OS_H
@ -121,3 +132,4 @@ AP_DECLARE_LATE_DLL_FUNC(AP_DLL_WINBASEAPI, DWORD, WINAPI, RegisterServiceProces
#endif /* ndef AP_OS_H */ #endif /* ndef AP_OS_H */
#endif /* def WIN32 */ #endif /* def WIN32 */
/** @} */

View File

@ -14,8 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
/* /**
* core_filters.c --- Core input/output network filters. * @file core_filters.c
* @brief Core input/output network filters.
*/ */
#include "apr.h" #include "apr.h"

View File

@ -731,5 +731,6 @@ const void *suck_in_APR(void)
extern const void *ap_ugly_hack; extern const void *ap_ugly_hack;
return ap_ugly_hack; return ap_ugly_hack;
gzeof(NULL);
} }
#endif #endif

View File

@ -14,6 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file beos/beos.h
* @brief Extern functions/values for BEOS MPM
*
* @addtogroup APACHE_MPM_BEOS
* @{
*/
#ifndef APACHE_MPM_BEOS_H #ifndef APACHE_MPM_BEOS_H
#define APACHE_MPM_BEOS_H #define APACHE_MPM_BEOS_H
@ -24,3 +31,4 @@ extern void clean_child_exit(int);
extern int max_daemons_limit; extern int max_daemons_limit;
#endif /* APACHE_MPM_BEOS_H */ #endif /* APACHE_MPM_BEOS_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file beos/mpm.h
* @brief BEOS MPM
*
* @defgroup APACHE_MPM_BEOS BEOS MPM
* @ingroup APACHE_MPM APACHE_OS_BEOS
* @{
*/
#ifndef APACHE_MPM_BEOS_H #ifndef APACHE_MPM_BEOS_H
#define APACHE_MPM_BEOS_H #define APACHE_MPM_BEOS_H
@ -38,3 +47,4 @@ extern server_rec *ap_server_conf;
extern int ap_threads_per_child; extern int ap_threads_per_child;
#endif /* APACHE_MPM_BEOS_H */ #endif /* APACHE_MPM_BEOS_H */
/** @} */

View File

@ -14,6 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file beos/mpm_default.h
* @brief beos MPM defaults
*
* @addtogroup APACHE_MPM_BEOS
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -74,3 +81,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file event/fdqueue.h
* @brief fd queue declarations
*
* @addtogroup APACHE_MPM_EVENT
* @{
*/
#ifndef FDQUEUE_H #ifndef FDQUEUE_H
#define FDQUEUE_H #define FDQUEUE_H
#include "httpd.h" #include "httpd.h"
@ -71,3 +79,4 @@ apr_status_t ap_queue_interrupt_all(fd_queue_t * queue);
apr_status_t ap_queue_term(fd_queue_t * queue); apr_status_t ap_queue_term(fd_queue_t * queue);
#endif /* FDQUEUE_H */ #endif /* FDQUEUE_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file event/mpm.h
* @brief Unix Exent driven MPM
*
* @defgroup APACHE_MPM_EVENT Unix Event MPM
* @ingroup APACHE_OS_UNIX APACHE_MPM
* @{
*/
#include "scoreboard.h" #include "scoreboard.h"
#include "unixd.h" #include "unixd.h"
@ -49,3 +58,4 @@ extern server_rec *ap_server_conf;
extern char ap_coredump_dir[MAX_STRING_LEN]; extern char ap_coredump_dir[MAX_STRING_LEN];
#endif /* APACHE_MPM_EVENT_H */ #endif /* APACHE_MPM_EVENT_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file event/mpm_default.h
* @brief Event MPM defaults
*
* @addtogroup APACHE_MPM_EVENT
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -67,3 +76,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file event/pod.h
* @brief pod definitions
*
* @addtogroup APACHE_MPM_EVENT
* @{
*/
#include "apr.h" #include "apr.h"
#include "apr_strings.h" #include "apr_strings.h"
#define APR_WANT_STRFUNC #define APR_WANT_STRFUNC
@ -49,3 +57,4 @@ AP_DECLARE(int) ap_mpm_pod_check(ap_pod_t * pod);
AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t * pod); AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t * pod);
AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t * pod, int graceful); AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t * pod, int graceful);
AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t * pod, int num, int graceful); AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t * pod, int num, int graceful);
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file leader/mpm.h
* @brief Unix Leader-Follower MPM
*
* @defgroup APACHE_MPM_LEADER Unix Leader-Follower MPM
* @ingroup APACHE_MPM APACHE_OS_UNIX
* @{
*/
#include "scoreboard.h" #include "scoreboard.h"
#include "unixd.h" #include "unixd.h"
@ -50,3 +59,4 @@ extern server_rec *ap_server_conf;
extern char ap_coredump_dir[MAX_STRING_LEN]; extern char ap_coredump_dir[MAX_STRING_LEN];
#endif /* APACHE_MPM_LEADER_H */ #endif /* APACHE_MPM_LEADER_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file leader/mpm_default.h
* @brief Leader-Follower MPM defaults
*
* @addtogroup APACHE_MPM_LEADER
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -67,3 +75,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file perchild/mpm.h
* @brief Unix Perchild MPM
*
* @defgroup APACHE_MPM_PERCHILD Uinx Perchild MPM
* @ingroup APACHE_MPM APACHE_OS_UNIX
* @{
*/
#include "httpd.h" #include "httpd.h"
#include "mpm_default.h" #include "mpm_default.h"
#include "unixd.h" #include "unixd.h"
@ -58,3 +67,4 @@ extern int ap_max_daemons_limit;
extern server_rec *ap_server_conf; extern server_rec *ap_server_conf;
#endif /* APACHE_MPM_PERCHILD_H */ #endif /* APACHE_MPM_PERCHILD_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file perchild/mpm_default.h
* @brief perchild MPM defaults
*
* @addtogroup APACHE_MPM_PERCHILD
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -69,3 +77,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file threadpool/mpm.h
* @brief Unix Threadpool MPM
*
* @defgroup APACHE_MPM_THREADPOOL Unix Threadpool MPM
* @ingroup APACHE_OS_UNIX APACHE_MPM
* @{
*/
#include "scoreboard.h" #include "scoreboard.h"
#include "unixd.h" #include "unixd.h"
@ -49,3 +58,4 @@ extern server_rec *ap_server_conf;
extern char ap_coredump_dir[MAX_STRING_LEN]; extern char ap_coredump_dir[MAX_STRING_LEN];
#endif /* APACHE_MPM_THREADPOOL_H */ #endif /* APACHE_MPM_THREADPOOL_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file threadpool/mpm_default.h
* @brief Unix Threadpool MPM defaults
*
* @addtogroup APACHE_MPM_THREADPOOL
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -67,3 +75,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file threadpool/pod.h
* @brief Threadpool Pipe of Death declarations
*
* @addtogroup APACHE_MPM_THREADPOOL
* @{
*/
#include "apr.h" #include "apr.h"
#include "apr_strings.h" #include "apr_strings.h"
#define APR_WANT_STRFUNC #define APR_WANT_STRFUNC
@ -48,3 +56,4 @@ AP_DECLARE(int) ap_mpm_pod_check(ap_pod_t *pod);
AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t *pod); AP_DECLARE(apr_status_t) ap_mpm_pod_close(ap_pod_t *pod);
AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod, int graceful); AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod, int graceful);
AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num, int graceful); AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num, int graceful);
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mpmt_os2/mpm.h
* @brief MPM for os2
*
* @defgroup APACHE_MPM_OS2 os2 MPM
* @ingroup APACHE_OS_OS2 APACHE_MPM
*/
#ifndef APACHE_MPM_MPMT_OS2_H #ifndef APACHE_MPM_MPMT_OS2_H
#define APACHE_MPM_MPMT_OS2_H #define APACHE_MPM_MPMT_OS2_H
@ -32,3 +40,4 @@ extern server_rec *ap_server_conf;
#define AP_MPM_WANT_SET_MAX_MEM_FREE #define AP_MPM_WANT_SET_MAX_MEM_FREE
#endif /* APACHE_MPM_MPMT_OS2_H */ #endif /* APACHE_MPM_MPMT_OS2_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mpmt_os2/mpm_default.h
* @brief os2 MPM defaults
*
* @addtogroup APACHE_MPM_OS2
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -57,3 +65,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file netware/mpm.h
* @brief Netware MPM
*
* @defgroup APACHE_MPM_NETWARE Netware MPM
* @ingroup APACHE_OS_NETWARE APACHE_MPM
* @{
*/
#include "scoreboard.h" #include "scoreboard.h"
#ifndef APACHE_MPM_THREADED_H #ifndef APACHE_MPM_THREADED_H
@ -46,3 +55,4 @@ extern int ap_max_workers_limit;
extern server_rec *ap_server_conf; extern server_rec *ap_server_conf;
#endif /* APACHE_MPM_THREADED_H */ #endif /* APACHE_MPM_THREADED_H */
/** @} */

View File

@ -14,6 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file netware/mpm_default.h
* @brief Defaults for Netware MPM
*
* @addtogroup APACHE_MPM_NETWARE
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -112,3 +119,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file prefork/mpm.h
* @brief Unix Prefork MPM (default for Uinx systems)
*
* @defgroup APACHE_MPM_PREFORK Unix Prefork
* @ingroup APACHE_MPM APACHE_OS_UNIX
* @{
*/
#include "httpd.h" #include "httpd.h"
#include "mpm_default.h" #include "mpm_default.h"
#include "scoreboard.h" #include "scoreboard.h"
@ -50,3 +59,4 @@ extern int ap_threads_per_child;
extern int ap_max_daemons_limit; extern int ap_max_daemons_limit;
extern server_rec *ap_server_conf; extern server_rec *ap_server_conf;
#endif /* APACHE_MPM_PREFORK_H */ #endif /* APACHE_MPM_PREFORK_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file prefork/mpm_default.h
* @brief Prefork MPM defaults
*
* @addtogroup APACHE_MPM_PREFORK
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -63,3 +71,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file Win9xConHook.h
* @brief ???
*
* @addtogroup APACHE_MPM_WINNT
* @{
*/
#ifndef AP_WIN9XCONHOOK_H #ifndef AP_WIN9XCONHOOK_H
#define AP_WIN9XCONHOOK_H #define AP_WIN9XCONHOOK_H
@ -55,3 +63,4 @@ BOOL WINAPI FixConsoleCtrlHandler(PHANDLER_ROUTINE phandler, BOOL add);
#endif /* WIN32 */ #endif /* WIN32 */
#endif AP_WIN9XCONHOOK_H #endif AP_WIN9XCONHOOK_H
/** @} */

View File

@ -14,14 +14,22 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef APACHE_MPM_H /**
#define APACHE_MPM_H * @file winnt/mpm.h
* @brief MPM for Windows NT
/* mpm.h is the place to make declarations that are MPM specific but that must be *
* this is the place to make declarations that are MPM specific but that must be
* shared with non-mpm specific code in the server. Hummm, perhaps we can * shared with non-mpm specific code in the server. Hummm, perhaps we can
* move most of this stuff to mpm_common.h? * move most of this stuff to mpm_common.h?
*
* @defgroup APACHE_MPM_WINNT WinNT MPM
* @ingroup APACHE_OS_WIN32 APACHE_MPM
* @{
*/ */
#ifndef APACHE_MPM_H
#define APACHE_MPM_H
#include "scoreboard.h" #include "scoreboard.h"
#define MPM_NAME "WinNT" #define MPM_NAME "WinNT"
@ -38,3 +46,4 @@ extern int ap_thread_limit;
extern server_rec *ap_server_conf; extern server_rec *ap_server_conf;
#endif /* APACHE_MPM_H */ #endif /* APACHE_MPM_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file winnt/mpm_default.h
* @brief win32 MPM defaults
*
* @addtogroup APACHE_MPM_WINNT
* @{
*/
#ifndef APACHE_MPM_DEFAULT_H #ifndef APACHE_MPM_DEFAULT_H
#define APACHE_MPM_DEFAULT_H #define APACHE_MPM_DEFAULT_H
@ -78,3 +86,4 @@
#endif #endif
#endif /* AP_MPM_DEFAULT_H */ #endif /* AP_MPM_DEFAULT_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file mpm_winnt.h
* @brief WinNT MPM specific
*
* @addtogroup APACHE_MPM_WINNT
* @{
*/
#ifndef APACHE_MPM_WINNT_H #ifndef APACHE_MPM_WINNT_H
#define APACHE_MPM_WINNT_H #define APACHE_MPM_WINNT_H
@ -119,3 +127,4 @@ void mpm_recycle_completion_context(PCOMP_CONTEXT pCompContext);
apr_status_t mpm_post_completion_context(PCOMP_CONTEXT pCompContext, io_state_e state); apr_status_t mpm_post_completion_context(PCOMP_CONTEXT pCompContext, io_state_e state);
void hold_console_open_on_error(void); void hold_console_open_on_error(void);
#endif /* APACHE_MPM_WINNT_H */ #endif /* APACHE_MPM_WINNT_H */
/** @} */

View File

@ -14,6 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file worker/fdqueue.h
* @brief fd queue declarations
*
* @addtogroup APACHE_MPM_WORKER
* @{
*/
#ifndef FDQUEUE_H #ifndef FDQUEUE_H
#define FDQUEUE_H #define FDQUEUE_H
#include "httpd.h" #include "httpd.h"
@ -62,3 +70,4 @@ apr_status_t ap_queue_interrupt_all(fd_queue_t *queue);
apr_status_t ap_queue_term(fd_queue_t *queue); apr_status_t ap_queue_term(fd_queue_t *queue);
#endif /* FDQUEUE_H */ #endif /* FDQUEUE_H */
/** @} */

View File

@ -14,6 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
/**
* @file worker/mpm.h
* @brief Unix Worker MPM
*
* @defgroup APACHE_MPM_WORKER Unix Worker MPM
* @ingroup APACHE_OS_UNIX APACHE_MPM
* @{
*/
#include "scoreboard.h" #include "scoreboard.h"
#include "unixd.h" #include "unixd.h"
@ -50,3 +59,4 @@ extern server_rec *ap_server_conf;
extern char ap_coredump_dir[MAX_STRING_LEN]; extern char ap_coredump_dir[MAX_STRING_LEN];
#endif /* APACHE_MPM_WORKER_H */ #endif /* APACHE_MPM_WORKER_H */
/** @} */

Some files were not shown because too many files have changed in this diff Show More