[Apache]

Package Name: General

struct ap_configfile_t

struct ap_filter_rec_t

struct ap_filter_rec_t

struct ap_filter_t

struct ap_method_list_t

struct cmd_parms_struct

struct ap_conf_vector_t

struct command_struct

struct conn_rec

struct ap_conf_vector_t

struct ap_filter_t

struct apr_bucket_alloc_t

struct htaccess_result

struct ap_conf_vector_t

struct module_struct

struct process_rec

struct request_rec

struct ap_conf_vector_t

struct ap_filter_t

struct server_addr_rec

struct server_rec

struct ap_conf_vector_t


struct ap_configfile_t

Source:./include/http_config.h

this directive can be placed anywhere @} This can be returned by a function if they don't wish to handle a command. Make it something not likely someone will actually use as an error code. Common structure for reading of config files / passwd files etc.


struct ap_filter_rec_t

Source:./include/util_filter.h

This is the request-time context structure for an installed filter (in the output filter chain). It provides the callback to use for filtering, the request this filter is associated with (which is important when an output chain also includes sub-request filters), the context for this installed filter, and the filter ordering/chaining fields. Filter callbacks are free to use ->ctx as they please, to store context during the filter process. Generally, this is superior over associating the state directly with the request. A callback should not change any of the other fields. This structure is used for recording information about the registered filters. It associates a name with the filter's callback and filter type. At the moment, these are simply linked in a chain, so a ->next pointer is available.

Member Index

Class Variables

ap_filter_func filter_func;
The function to call when this filter is invoked.

ap_init_filter_func filter_init_func;
The function to call before the handlers are invoked. Notice that this function is called only for filters participating in the http protocol. Filters for other protocols are to be initiliazed by the protocols themselves.

ap_filter_type ftype;
The type of filter, either AP_FTYPE_CONTENT or AP_FTYPE_CONNECTION. An AP_FTYPE_CONTENT filter modifies the data based on information found in the content. An AP_FTYPE_CONNECTION filter modifies the data based on the type of connection.

const char *name;
The registered name for this filter


struct ap_filter_rec_t

Source:./include/util_filter.h

The next filter_rec in the list


struct ap_filter_t

Source:./include/util_filter.h

The representation of a filter chain. Each request has a list of these structures which are called in turn to filter the data. Sub requests get an exact copy of the main requests filter chain.

Member Index

Class Variables

conn_rec *c;
The conn_rec associated with the current filter. This is analogous to the request_rec, except that it is used for input filtering.

void *ctx;
A place to store any data associated with the current filter

ap_filter_rec_t *frec;
The internal representation of this filter. This includes the filter's name, type, and the actual function pointer.

ap_filter_t *next;
The next filter in the chain

request_rec *r;
The request_rec associated with the current filter. If a sub-request adds filters, then the sub-request is the request associated with the filter.


struct ap_method_list_t

Source:./include/httpd.h

@defgroup HTTP_Status HTTP Status Codes @{ The size of the static array in http_protocol.c for storing all of the potential response status-lines (a sparse table). A future version should dynamically generate the apr_table_t at startup. is the status code informational is the status code OK ?is the status code a redirect is the status code a error (client or server) is the status code a client error is the status code a server error should the status code drop the connection @} @defgroup Methods List of Methods recognized 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 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 ap_method_name_of(). METHODS needs to be equal to the number of bits we are using for limit masks. The method mask bit to shift for anding with a bitmask. @} Structure for handling HTTP methods. Methods known to the server are accessed via a bitmask shortcut; extension methods are handled by an array.


struct cmd_parms_struct

Source:./include/http_config.h

This structure is passed to a command which is being invoked, to carry a large variety of miscellaneous data which is all of use to *somebody*...

Member Index

Class Variables

const command_rec *cmd;
configuration command

ap_configfile_t *config_file;
Config file structure.

ap_directive_t *directive;
the directive specifying this command

const ap_directive_t *err_directive;
directive with syntax error

void *info;
Argument to command from cmd_table

apr_int64_t limited;
Which methods are ed

apr_array_header_t *limited_xmethods;
methods which are limited

int override;
Which allow-override bits are set

char *path;
If configuring for a directory, pathname of that directory. NOPE! That's what it meant previous to the existance of , and regex matching. Now the only usefulness that can be derived from this field is whether a command is being called in a server context (path == NULL) or being called in a dir context (path != NULL).

apr_pool_t *pool;
Pool to allocate new storage in

server_rec *server;
Server_rec being configured for

apr_pool_t *temp_pool;
Pool for scratch memory; persists during configuration, but wiped before the first request is served...

ap_method_list_t *xlimited;
methods which are xlimited


struct ap_conf_vector_t

Source:./include/http_config.h

per_dir_config vector passed to handle_command


struct command_struct

Source:./include/http_config.h

This configuration directive does not take any arguments This configuration directive will handle it's own parsing of argumentsThis configuration directive takes 1 argumentThis configuration directive takes 2 arguments This configuration directive takes 3 arguments This configuration directive takes a flag (on/off) as a argumentmethod of declaring a directive with no arguments method of declaring a directive with raw argument parsing method of declaring a directive which takes 1 argument method of declaring a directive which takes multiple arguments method of declaring a directive which takes 2 arguments method of declaring a directive which takes 1 or 2 arguments method of declaring a directive which takes multiple 2 arguments method of declaring a directive which takes 1 or 3 arguments method of declaring a directive which takes 2 or 3 arguments method of declaring a directive which takes 1 to 3 arguments method of declaring a directive which takes 3 arguments method of declaring a directive which takes a flag (on/off) as a argumentThe command record structure. Each modules can define a table of these to define the directives it will implement.

Member Index

Class Variables

void *cmd_data;
Extra data, for functions which implement multiple commands...

cmd_howargs_how;
What the command expects as arguments

const char *errmsg;
'usage' message, in case of syntax errors

cmd_func func;
The function to be called when this directive is parsed

const char *name;
Name of this command

int req_override;
What overrides need to be allowed to enable this command.


struct conn_rec

Source:./include/httpd.h

Structure to store things which are per connection

Member Index

Class Variables

unsigned aborted;
Are we still talking?

server_rec *base_server;
Physical vhost this conn came in on

signed int double_reverse;
have we done double-reverse DNS? -1 yes/failure, 0 not yet, 1 yes/success

long id;
ID of this connection; unique at any point in time

ap_conn_keepalive_e keepalive;
Are we going to keep the connection alive for another request?

See Also
ap_conn_keepalive_e

int keepalives;
How many times have we used it?

apr_sockaddr_t *local_addr;
local address

char *local_host;
used for ap_get_server_name when UseCanonicalName is set to DNS (ignores setting of HostnameLookups)

char *local_ip;
server IP address

apr_table_t *notes;
Notes on *this* connection: send note from one module to another. must remain valid for all requests on this conn

apr_pool_t *pool;
Pool associated with this connection

apr_sockaddr_t *remote_addr;
remote address

char *remote_host;
Client's DNS name, if known. NULL if DNS hasn't been checked, "" if it has and no address was found. N.B. Only access this though get_remote_host()

char *remote_ip;
Client's IP address

char *remote_logname;
Only ever set if doing rfc1413 lookups. N.B. Only access this through get_remote_logname()

void *sbh;
handle to scoreboard information for this connection

void *vhost_lookup_data;
used by http_vhost.c


struct ap_conf_vector_t

Source:./include/httpd.h

Config vector containing pointers to connections per-server config structures.


struct ap_filter_t

Source:./include/httpd.h

A list of output filters to be used for this connection


struct apr_bucket_alloc_t

Source:./include/httpd.h

The bucket allocator to use for all bucket/brigade creations


struct htaccess_result

Source:./include/httpd.h

@defgroup module_magic Module Magic mime types @{ Magic for mod_cgi[d] Magic for mod_include Magic for mod_include Magic for mod_dir @} linefeed carrige return carrige return /Line Feed Combo @defgroup values_request_rec_body Possible values for request_rec.read_body @{ Possible values for request_rec.read_body (set by handling module): Send 413 error if message has any body Send 411 error if body without Content-Length If chunked, remove the chunks for me. @} @defgroup values_request_rec_used_path_info Possible values for request_rec.used_path_info @{ Possible values for request_rec.used_path_info: Accept the path_info from the request Return a 404 error if path_info was given Module may chose to use the given path_info @} This represents the result of calling htaccess; these are cached for each request.

Member Index

Class Variables

const char *dir;
the directory to which this applies

const struct htaccess_result *next;
the next one, or NULL if no more; N.B. never change this

int override;
the overrides allowed for the .htaccess file


struct ap_conf_vector_t

Source:./include/httpd.h

the configuration directives


struct module_struct

Source:./include/http_config.h

Module structures. Just about everything is dispatched through these, directly or indirectly (through the command and handler tables).

Member Index

Class Variables

const command_rec *cmds;
A command_rec table that describes all of the directives this module defines.

void *dynamic_load_handle;
The handle for the DSO. Internal use only

unsigned long magic;
Magic Cookie to identify a module structure; It's mainly important for the DSO facility (see also mod_so).

int minor_version;
API minor version. Provides API feature milestones. Not checked during module init

int module_index;
Index to this modules structures in config vectors.

module_struct*next ;
A pointer to the next module in the list

const char *name;
The name of the module's C file

int version;
API version, *not* module version; check that module is compatible with this version of the server.

Class Methods

void (*register_hooks)(apr_pool_t *p);
A hook to allow modules to hook other points in the request processing. In this function, modules should call the ap_hook_*() functions to register an interest in a specific step in processing the current request.

Parameters
pthe pool to use for all allocations
void (*rewrite_args)(process_rec *process);
Function to allow MPMs to re-write command line arguments. This hook is only available to MPMs.

Parameters
Theprocess that the server is running in.
void *(*create_dir_config)(apr_pool_t *p, char *dir);
Function to allow all modules to create per directory configuration structures.

Parameters
pThe pool to use for all allocations.
dirThe directory currently being processed.
Return Value
The per-directory structure created

void *(*create_server_config)(apr_pool_t *p, server_rec *s);
Function to allow all modules to create per server configuration structures.

Parameters
pThe pool to use for all allocations.
sThe server currently being processed.
Return Value
The per-server structure created

void *(*merge_dir_config)(apr_pool_t *p, void *base_conf, void *new_conf);
Function to allow all modules to merge the per directory configuration structures for two directories.

Parameters
pThe pool to use for all allocations.
base_confThe directory structure created for the parent directory.
new_confThe directory structure currently being processed.
Return Value
The new per-directory structure created

void *(*merge_server_config)(apr_pool_t *p, void *base_conf, void *new_conf);
Function to allow all modules to merge the per server configuration structures for two servers.

Parameters
pThe pool to use for all allocations.
base_confThe directory structure created for the parent directory.
new_confThe directory structure currently being processed.
Return Value
The new per-directory structure created


struct process_rec

Source:./include/httpd.h

A structure that represents one process A structure that represents a virtual server A structure that represents one connection A structure that represents the current request A structure that represents one process

Member Index

Class Variables

int argc;
Number of command line arguments passed to the program

const char * const;
The command line arguments

apr_pool_t *pconf;
Configuration pool. Cleared upon restart

apr_pool_t *pool;
Global pool. Cleared upon normal exit

const char *short_name;
The program name used to execute the program


struct request_rec

Source:./include/httpd.h

A structure that represents the current request

Member Index

Class Variables

apr_int64_t allowed;
'allowed' is a bitvector of the allowed methods. A handler must ensure that the request method is one that it is capable of handling. Generally modules should DECLINE any request methods they do not handle. Prior to aborting the handler like this the handler should set r->allowed to the list of methods that it is willing to handle. This bitvector is used to construct the "Allow:" header required for OPTIONS requests, and HTTP_METHOD_NOT_ALLOWED and HTTP_NOT_IMPLEMENTED status codes. Since the default_handler deals with OPTIONS, all modules can usually decline to deal with OPTIONS. TRACE is always allowed, modules don't need to set it explicitly. Since the default_handler will always handle a GET, a module which does *not* implement GET should probably return HTTP_METHOD_NOT_ALLOWED. Unfortunately this means that a Script GET handler can't be installed by mod_actions.

ap_method_list_t *allowed_methods;
List of allowed methods

apr_array_header_t *allowed_xmethods;
Array of extension methods

char *ap_auth_type;
If an authentication check was made, this gets set to the auth type.

char *args;
The QUERY_ARGS extracted from this request

int assbackwards;
HTTP/0.9, "simple" request (e.g. GET /foo\n w/no headers)

apr_off_t bytes_sent;
body byte count, for easy access

char *canonical_filename;
The true filename, we canonicalize r->filename if these don't match

int chunked;
sending chunked transfer-coding

apr_off_t clength;
The "real" content length

conn_rec *connection;
The connection to the client

const char *content_encoding;
How to encode the data

apr_array_header_t *content_languages;
Array of strings representing the content languages

const char *content_type;
The content-type for the current request

int eos_sent;
A flag to determine if the eos bucket has been sent yet

apr_table_t *err_headers_out;
MIME header environment for the response, printed even on errors and persist across internal redirects

unsigned expecting_100;
is client waiting for a 100 response?

char *filename;
The filename on disk corresponding to this response

apr_finfo_t finfo;
finfo.protection (st_mode) set to zero if no such file

const char *handler;
The handler string that we use to call a handler function

int header_only;
HEAD request, as opposed to GET

apr_table_t *headers_in;
MIME header environment from the request

apr_table_t *headers_out;
MIME header environment for the response

const char *hostname;
Host, as set by full URI or Host:

const struct htaccess_result *htaccess;
A linked list of the .htaccess configuration directives accessed by this request. N.B. always add to the head of the list, _never_ to the end. that way, a sub request's list can (temporarily) point to a parent's list

request_rec *main;
Pointer to the main request if this is a sub-request (see http_request.h)

const char *method;
Request method (eg. GET, HEAD, POST, etc.)

int method_number;
M_GET, M_POST, etc.

apr_time_t mtime;
Last modified time of the requested resource

request_rec *next;
Pointer to the redirected request if this is an external redirect

int no_cache;
This response can not be cached

int no_local_copy;
There is no local copy of this response

apr_table_t *notes;
Notes from one module to another

apr_uri_t parsed_uri;
A struct containing the components of URI

char *path_info;
The PATH_INFO extracted from this request

apr_pool_t *pool;
The pool associated with the request

request_rec *prev;
Pointer to the previous request if this is an internal redirect

int proto_num;
Protocol version number of protocol; 1.1 = 1001

char *protocol;
Protocol string, as given to us, or HTTP/0.9

int proxyreq;
A proxy request (calculated during post_read_request/translate_name) possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE, PROXYREQ_RESPONSE

const char *range;
The Range: header

int read_body;
Method for reading the request body (eg. REQUEST_CHUNKED_ERROR, REQUEST_NO_BODY, REQUEST_CHUNKED_DECHUNK, etc...)

int read_chunked;
reading chunked transfer-coding

apr_off_t read_length;
Number of bytes that have been read from the request body

apr_off_t remaining;
Remaining bytes left to read from the request body

apr_time_t request_time;
Time when the request started

apr_off_t sent_bodyct;
byte count in stream is for body

server_rec *server;
The virtual host for this request

int status;
Status line

const char *status_line;
Status line, if set by script

apr_table_t *subprocess_env;
Array of environment variables to be used for sub processes

char *the_request;
First line of request

char *unparsed_uri;
The URI without any parsing performed

char *uri;
The path portion of the URI

int used_path_info;
Flag for the handler to accept or reject path_info on the current request. All modules should respect the AP_REQ_ACCEPT_PATH_INFO and AP_REQ_REJECT_PATH_INFO values, while AP_REQ_DEFAULT_PATH_INFO indicates they may follow existing conventions. This is set to the user's preference upon HOOK_VERY_FIRST of the fixups.

char *user;
If an authentication check was made, this gets set to the user name.

char *vlist_validator;
variant list validator (if negotiated)


struct ap_conf_vector_t

Source:./include/httpd.h

Notes on *this* request


struct ap_filter_t

Source:./include/httpd.h

A list of protocol level input filters to be used for this request


struct server_addr_rec

Source:./include/httpd.h

The address 255.255.255.255, when used as a virtualhost address, will become the "default" server when the ip doesn't match other vhosts. A structure to be used for Per-vhost config

Member Index

Class Variables

apr_sockaddr_t *host_addr;
The bound address, for this server

apr_port_t host_port;
The bound port, for this server

server_addr_rec *next;
The next server in the list

char *virthost;
The name given in


struct server_rec

Source:./include/httpd.h

A structure to store information for each virtual server

Member Index

Class Variables

server_addr_rec *addrs;
I haven't got a clue

unsigned defn_line_number;
The line of the config file that the server was defined on

const char *defn_name;
The name of the server

char *error_fname;
The name of the error log

apr_file_t *error_log;
A file descriptor that references the error log

int is_virtual;
true if this is the virtual server

int keep_alive;
Use persistent connections?

int keep_alive_max;
Maximum requests per connection

apr_interval_time_t keep_alive_timeout;
The apr interval we will wait for another request

int limit_req_fields;
limit on number of request header fields

int limit_req_fieldsize;
limit on size of any request header field

int limit_req_line;
limit on size of the HTTP request line

int loglevel;
The log level for this server

apr_array_header_t *names;
Normal names for ServerAlias servers

server_rec *next;
The next server in the list

const char *path;
Pathname for ServerPath

int pathlen;
Length of path

apr_port_t port;
for redirects, etc.

process_rec *process;
The process this server is running in

char *server_admin;
The admin's contact information

char *server_hostname;
The server hostname

apr_interval_time_t timeout;
Timeout, as an apr interval, before we give up

apr_array_header_t *wild_names;
Wildcarded names for ServerAlias servers


struct ap_conf_vector_t

Source:./include/httpd.h

MIME type info, etc., before we start checking per-directory info

Global Variables

and;
@defgroup ConfigDirectives Allowed locations for configuration directives. The allowed locations for a configuration directive are the union of those indicated by each set bit in the req_override mask. @{

ap_conn_keepalive_e;
@defgroup ProxyReq Proxy request types Possible values of request_rec->proxyreq. A request could be normal, proxied or reverse proxied. Normally proxied and reverse proxied are grouped together as just "proxied", but sometimes it's necessary to tell the difference between the two, such as for authentication. @{

ap_filter_func;
@defgroup filter FILTER CHAIN Filters operate using a "chaining" mechanism. The filters are chained together into a sequence. When output is generated, it is passed through each of the filters on this chain, until it reaches the end (or "bottom") and is placed onto the network. The top of the chain, the code generating the output, is typically called a "content generator." The content generator's output is fed into the filter chain using the standard Apache output mechanisms: ap_rputs(), ap_rprintf(), ap_rwrite(), etc. Each filter is defined by a callback. This callback takes the output from the previous filter (or the content generator if there is no previous filter), operates on it, and passes the result to the next filter in the chain. This pass-off is performed using the ap_fc_* functions, such as ap_fc_puts(), ap_fc_printf(), ap_fc_write(), etc. When content generation is complete, the system will pass an "end of stream" marker into the filter chain. The filters will use this to flush out any internal state and to detect incomplete syntax (for example, an unterminated SSI directive). @name Filter callbacks This function type is used for filter callbacks. It will be passed a pointer to "this" filter, and a "bucket" containing the content to be filtered. In filter->ctx, the callback will find its context. This context is provided here, so that a filter may be installed multiple times, each receiving its own per-install context pointer. Callbacks are associated with a filter definition, which is specified by name. See ap_register_input_filter() and ap_register_output_filter() for setting the association between a name for a filter and its associated callback (and other information). If the initialization function argument passed to the registration functions is non-NULL, it will be called iff the filter is in the input or output filter chains and before any data is generated to allow the filter to prepare for processing. The *bucket structure (and all those referenced by ->next and ->prev) should be considered "const". The filter is allowed to modify the next/prev to insert/remove/replace elements in the bucket list, but the types and values of the individual buckets should not be altered. For the input and output filters, the return value of a filter should be an APR status value. For the init function, the return value should be an HTTP error code or OK if it was successful.

@ingroup filter @{

ap_filter_type;
@} Filters have different types/classifications. These are used to group and sort the filters to properly sequence their operation. The types have a particular sort order, which allows us to insert them into the filter chain in a determistic order. Within a particular grouping, the ordering is equivalent to the order of calls to ap_add_*_filter().

ap_input_mode_t;
@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 read. Returned when??

find out when! input filtering modes

See Also
ap_pass_brigade(). ap_get_brigade().

cmd_func;
@file http_config.h @brief Apache Configuration How the directives arguments should be parsed. @remark Note that for all of these except RAW_ARGS, the config routine is passed a freshly allocated string which can be modified or stored or whatever... This structure is passed to a command which is being invoked, to carry a large variety of miscellaneous data which is all of use to *somebody*... All the types of functions that can be used in directives @internal

module*ap_top_module;
Forbidden in //Forbidden in //// @} The topmost module in the list

module*ap_prelinked_modules[];
Array of all statically linked modules

module*ap_preloaded_modules[];
Array of all preloaded modules

module**ap_loaded_modules;
Array of all loaded modules

extern int raise_sigstop_flags;
@internal Redefine assert() to something more useful for an Apache... Use ap_assert() if the condition should always be checked. Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG is defined. @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). This is useful for debugging, because you can then attach to that process with gdb and continue. This is important in cases where one_process debugging isn't possible. stop on a Detach stop making a child process stop spawning a child process stop spawning a child process with a piped log stop spawning a CGI child process Macro to get GDB started

regex_t;
@file include/pcreposix.h @brief PCRE definitions Ignore case Don't match newlines with wildcards Don't match BOL Don't match EOL UNUSED! UNUSED!

Global Functions

(apr_status_t);
Win32 Only: Store a raw bytes value into an open key.

Parameters
keyThe registry key to store the value into
valuenameThe named value to store (pass "" for the default)
valueThe bytes to store for the named value
valuesizeThe number of bytes for value
valuetypeThe values will find all %foo% variables expanded from the environment.
poolThe pool used for temp allocations
(void,insert_filter,(request_rec *r));
This hook allows modules to insert filters for the current request @ingroup hooks

Parameters
rthe current request
(const char *);
@file httpd.h @brief HTTP Daemon routines The default default character set name to add if AddDefaultCharset is enabled. Overridden with AddDefaultCharsetName. default HTTP Server protocol Define this to be what your HTML directory content files are called Define this to be what type you'd like returned for files with unknown suffixes.

MUST be all lower case. The name of the MIME types file HTML 2.0 Doctype Internal representation for a HTTP protocol number, e.g., HTTP/1.1 Major part of HTTP protocol Minor part of HTTP protocol default HTTP Port default HTTPS Port Check whether @a port is the default port for the request @a r. Get the default port for a request (which depends on the scheme). Get the scheme for a request.

This should be called ap_http_scheme! The default string lengths The size of the server's internal read-write buffers The max number of regex captures that can be expanded by ap_pregsub APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into mutiple buckets, no greater than MAX(apr_size_t), and more granular than that in case the brigade code/filters attempt to read it directly. ### 16mb is an invention, no idea if it is reasonable. Special Apache error codes. These are basically used in http_main.c so we can keep track of various errors. a normal exit A fatal error arising during the server's init sequence The child died during its init sequence The child exited due to a resource shortage. The parent should limit the rate of forking until the situation is resolved. A fatal error, resulting in the whole server aborting. If a child exits with this error, the parent process considers this a server-wide fatal error and aborts. Stuff marked #AP_DECLARE is part of the API, and intended for use by modules. Its purpose is to allow us to add attributes that particular platforms or compilers require to every exported function. Stuff marked #AP_DECLARE_NONSTD is part of the API, and intended for use by modules. The difference between #AP_DECLARE and #AP_DECLARE_NONSTD is that the latter is required for any functions which use varargs or are used via indirect function call. This is to accomodate the two calling conventions in windows dlls. @internal modules should not used functions marked AP_CORE_DECLARE @internal modules should not used functions marked AP_CORE_DECLARE_NONSTD Get the server version string

Parameters
portThe port number
rThe request
rThe request
rThe request
Return Value
The server version string

See Also
ap_default_port

(void);
Add a component to the version string

Parameters
pconfThe pool to allocate the component from
componentThe string to add
(const char *);
Get the date a time that the server was built

Return Value
The server build time string

(char *);
Examine a field value (such as a media-/content-type) string and return it sans any parameters; e.g., strip off any ';charset=foo' and the like.

Parameters
pPool to allocate memory from
intypeThe field to examine
Return Value
A copy of the field minus any parameters

(char *);
Convert a time from an integer into a string in a specified format

Parameters
pThe pool to allocate memory from
tThe time to convert
fmtThe format to use for the conversion
gmtConvert the time for GMT?
Return Value
The string that represents the specified time

(char *);
Get the characters until the first occurance of a specified character

Parameters
pThe pool to allocate memory from
lineThe string to get the characters from
stopThe character to stop at
Return Value
A copy of the characters up to the first stop character

(apr_status_t);
Win32 Only: Retrieve a registry value string from an open key.

Parameters
resultThe string elements retrieved from a REG_MULTI_SZ string array
keyThe registry key to retrieve the value from
valuenameThe named value to retrieve (pass "" for the default)
poolThe pool used to store the result
(char *);
Get the characters until the first occurance of a specified character @note This is the same as ap_getword(), except it doesn't use const char **.

Parameters
pThe pool to allocate memory from
lineThe string to get the characters from
stopThe character to stop at
Return Value
A copy of the characters up to the first stop character

(char *);
Get the first word from a given string. A word is defined as all characters up to the first whitespace.

Parameters
pThe pool to allocate memory from
lineThe string to traverse
Return Value
The first word in the line

(char *);
Get the first word from a given string. A word is defined as all characters up to the first whitespace. @note The same as ap_getword_white(), except it doesn't use const char **.

Parameters
pThe pool to allocate memory from
lineThe string to traverse
Return Value
The first word in the line

(char *);
Get all characters from the first occurance of @a stop to the first '\0'

Parameters
pThe pool to allocate memory from
lineThe line to traverse
stopThe character to start at
Return Value
A copy of all caracters after the first occurance of the specified character

(char *);
Get all characters from the first occurance of @a stop to the first '\0' @note The same as ap_getword_nulls(), except it doesn't use const char **.

Parameters
pThe pool to allocate memory from
lineThe line to traverse
stopThe character to start at
Return Value
A copy of all caracters after the first occurance of the specified character

(char *);
Get the second word in the string paying attention to quoting

Parameters
pThe pool to allocate from
lineThe line to traverse
Return Value
A copy of the string

(char *);
Get the second word in the string paying attention to quoting @note The same as ap_getword_conf(), except it doesn't use const char **.

Parameters
pThe pool to allocate from
lineThe line to traverse
Return Value
A copy of the string

(const char *);
Check a string for any ${ENV} environment variable construct and replace each them by the value of that environment variable, if it exists. If the environment value does not exist, leave the ${ENV} construct alone; it means something else.

Parameters
pThe pool to allocate from
wordThe string to check
Return Value
The string with the replaced environment variables

(const char *);
Size an HTTP header field list item, as separated by a comma.

Parameters
fieldThe field to size
lenThe length of the field
Return Value
The return value is a pointer to the beginning of the non-empty list item within the original string (or NULL if there is none) and the address of field is shifted to the next non-comma, non-whitespace character. len is the length of the item excluding any beginning whitespace.

(char *);
Retrieve an HTTP header field list item, as separated by a comma, while stripping insignificant whitespace and lowercasing anything not in a quoted string or comment.

Parameters
pThe pool to allocate from
fieldThe field to retrieve
Return Value
The return value is a new string containing the converted list item (or NULL if none) and the address pointed to by field is shifted to the next non-comma, non-whitespace.

(apr_status_t);
Win32 Only: Store a registry value string array into an open key.

Parameters
keyThe registry key to store the value into
valuenameThe named value to store (pass "" for the default)
neltsThe string elements to store in a REG_MULTI_SZ string array
eltsThe number of elements in the elts string array
poolThe pool used for temp allocations
(int);
Find an item in canonical form (lowercase, no extra spaces) within an HTTP field value list.

Parameters
pThe pool to allocate from
lineThe field value list to search
tokThe token to search for
Return Value
1 if found, 0 if not found.

(char *);
Retrieve a token, spacing over it and returning a pointer to the first non-white byte afterwards. Note that these tokens are delimited by semis and commas and can also be delimited by whitespace at the caller's option.

Parameters
pThe pool to allocate from
accept_lineThe line to retrieve the token from
accept_whiteIs it delimited by whitespace
Return Value
the first non-white byte after the token

(int);
Find http tokens, see the definition of token from RFC2068

Parameters
pThe pool to allocate from
lineThe line to find the token
tokThe token to find
Return Value
1 if the token is found, 0 otherwise

(int);
find http tokens from the end of the line

Parameters
pThe pool to allocate from
lineThe line to find the token
tokThe token to find
Return Value
1 if the token is found, 0 otherwise

(int);
Check for an Absolute URI syntax

Parameters
uThe string to check
Return Value
1 if URI, 0 otherwise

(int);
Unescape a URL

Parameters
urlThe url to unescape
Return Value
0 on success, non-zero otherwise

(int);
Unescape a URL, but leaving %2f (slashes) escaped

Parameters
urlThe url to unescape
Return Value
0 on success, non-zero otherwise

(void);
Convert all double slashes to single slashes

Parameters
nameThe string to convert
(void);
Remove all ./ and xx/../ substrings from a file name. Also remove any leading ../ or /../ substrings.

Parameters
namethe file name to parse
(char *);
Escape a path segment, as defined in RFC 1808

Parameters
pThe pool to allocate from
sThe path to convert
Return Value
The converted URL

(apr_status_t);
Win32 Only: Remove a registry value from an open key.

Parameters
keyThe registry key to remove the value from
valuenameThe named value to remove (pass "" for the default)
poolThe pool used for temp allocations
(char *);
convert an OS path to a URL in an OS dependant way.

Parameters
pThe pool to allocate from
pathThe path to convert
partialif set, assume that the path will be appended to something with a '/' in it (and thus does not prefix "./")
Return Value
The converted URL

(char *);
Escape an html string

Parameters
pThe pool to allocate from
sThe html to escape
Return Value
The escaped string

See Also
ap_os_escape_path

(char *);
Escape a string for logging

Parameters
pThe pool to allocate from
strThe string to escape
Return Value
The escaped string

(apr_size_t);
Escape a string for logging into the error log (without a pool)

Parameters
destThe buffer to write to
sourceThe string to escape
buflenThe buffer size for the escaped string (including \0)
Return Value
The len of the escaped string (always < maxlen)

(char *);
Construct a full hostname

Parameters
pThe pool to allocate from
hostnameThe hostname of the server
portThe port the server is running on
rThe current request
Return Value
The server's hostname

(char *);
Escape a shell command

Parameters
pThe pool to allocate from
sThe command to escape
Return Value
The escaped shell command

(int);
Count the number of directories in a path

Parameters
pathThe path to count
Return Value
The number of directories

(char *);
Copy at most @a n leading directories of @a s into @a d. @a d should be at least as large as @a s plus 1 extra byte @note on platforms with drive letters, n = 0 returns the "/" root, whereas n = 1 returns the "d:/" root. On all other platforms, n = 0 returns the empty string.

Parameters
dThe location to copy to
sThe location to copy from
nThe number of directories to copy
Return Value
value is the ever useful pointer to the trailing \0 of d

(char *);
Return the parent directory name (including trailing /) of the file @a s

Parameters
pThe pool to allocate from
sThe file to get the parent of
Return Value
A copy of the file's parent directory

(char *);
Given a directory and filename, create a single path from them. This function is smart enough to ensure that there is a sinlge '/' between the directory and file names

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 path and returned filename. Otherwise, the result is not canonical.

Parameters
aThe pool to allocate from
dirThe directory name
fThe filename
Return Value
A copy of the full path

(void *);
@defgroup ModuleInit Module structure initializers Initializer for the first few module slots, which are only really set up once we start running. Note that the first two slots provide a version check; this should allow us to deal with changes to the API. The major number should reflect changes to the API handler table itself or removal of functionality. The minor number should reflect additions of functionality to the existing API. (the server can detect an old-format module, and either handle it back-compatibly, or at least signal an error). See src/include/ap_mmn.h for MMN version history. @{ The one used in Apache 1.3, which will deliberately cause an error Use this in all standard modules Use this only in MPMs @} configuration vector structure Generic accessors for other modules to get at their own module-specific data

Parameters
conf_vectorThe vector in which the modules configuration is stored. usually r->per_dir_config or s->module_config
mThe module to get the data for.
Return Value
The module-specific data

(int);
Test if the given path has an an absolute path.

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 in a canonical sense.

Parameters
pThe pool to allocate from
dirThe directory name
(int);
Does the provided string contain wildcard characters? This is useful for determining if the string should be passed to strcmp_match or to strcmp. The only wildcard characters recognized are '?' and '*'

Parameters
strThe string to check
Return Value
1 if the string has wildcards, 0 otherwise

(int);
Determine if a string matches a patterm containing the wildcards '?' or '*'

Parameters
strThe string to check
expectedThe pattern to match against
Return Value
1 if the two strings match, 0 otherwise

(int);
Determine if a string matches a patterm containing the wildcards '?' or '*', ignoring case

Parameters
strThe string to check
expectedThe pattern to match against
Return Value
1 if the two strings match, 0 otherwise

(char *);
Find the first occurrence of the substring s2 in s1, regardless of case @remark See apr_strmatch() for a faster alternative

Parameters
s1The string to search
s2The substring to search for
Return Value
A pointer to the beginning of the substring

(const char *);
Return a pointer to the location inside of bigstring immediately after prefix

Parameters
bigstringThe input string
prefixThe prefix to strip away
Return Value
A pointer relative to bigstring after prefix

(char *);
Decode a base64 encoded string into memory allocated from a pool

Parameters
pThe pool to allocate from
bufcodedThe encoded string
Return Value
The decoded string

(char *);
Encode a string into memory allocated from a pool in base 64 format

Parameters
pThe pool to allocate from
strinThe plaintext string
Return Value
The encoded string

(regex_t *);
Compile a regular expression to be used later @li #REG_EXTENDED - Use POSIX extended Regular Expressions @li #REG_ICASE - Ignore case @li #REG_NOSUB - Support for substring addressing of matches not required @li #REG_NEWLINE - Match-any-character operators don't match new-line

Parameters
pThe pool to allocate from
patternthe regular expression to compile
cflagsThe bitwise or of one or more of the following:
Return Value
The compiled regular expression

(void);
Free the memory associated with a compiled regular expression

Parameters
pThe pool the regex was allocated from
regThe regular expression to free
(void);
Generic accessors for other modules to set at their own module-specific data

Parameters
conf_vectorThe vector in which the modules configuration is stored. usually r->per_dir_config or s->module_config
mThe module to set the data for.
valThe module-specific data to set
(int);
Match a null-terminated string against a pre-compiled regex. @li #REG_NOTBOL - match-beginning-of-line operator always fails to match @li #REG_NOTEOL - match-end-of-line operator always fails to match

Parameters
pregThe pre-compiled regex
stringThe string to match
nmatchProvide information regarding the location of any matches
pmatchProvide information regarding the location of any matches
eflagsBitwise or of any of:
Return Value
0 for successful match, #REG_NOMATCH otherwise

(size_t);
Return the error code returned by regcomp or regexec into error messages

Parameters
errcodethe error code returned by regexec or regcomp
pregThe precompiled regex
errbufA buffer to store the error in
errbuf_sizeThe size of the buffer
(char *);
After performing a successful regex match, you may use this function to perform a series of string substitutions based on subexpressions that were matched during the call to ap_regexec

Parameters
pThe pool to allocate from
inputAn arbitrary string containing $1 through $9. These are replaced with the corresponding matched sub-expressions
sourceThe string that was originally matched to the regex
nmatchthe nmatch returned from ap_pregex
pmatchthe pmatch array returned from ap_pregex
(void);
We want to downcase the type/subtype for comparison purposes but nothing else because ;parameter=foo values are case sensitive.

Parameters
sThe content-type to convert to lowercase
(void);
convert a string to all lowercase

Parameters
sThe string to convert to lowercase
(int);
Search a string from left to right for the first occurrence of a specific character

Parameters
strThe string to search
cThe character to search for
Return Value
The index of the first occurrence of c in str

(int);
Search a string from right to left for the first occurrence of a specific character

Parameters
strThe string to search
cThe character to search for
Return Value
The index of the first occurrence of c in str

(char *);
Given a string, replace any bare " with \" .

Parameters
pThe pool to allocate memory from
instringThe string to search for "
Return Value
A copy of the string with escaped quotes

(int);
Given the name of an object in the file system determine if it is a directory

Parameters
pThe pool to allocate from
nameThe name of the object to check
Return Value
1 if it is a directory, 0 otherwise

(int);
Given the name of an object in the file system determine if it is a directory - this version is symlink aware

Parameters
pThe pool to allocate from
nameThe name of the object to check
Return Value
1 if it is a directory, 0 otherwise

(const char *);
Generic command handling function for strings

Parameters
cmdThe command parameters for this directive
struct_ptrpointer into a given type
argThe argument to the directive
Return Value
An error string or NULL on success

(void);
Log an assertion to the error log

Parameters
szExpThe assertion that failed
szFileThe file the assertion is in
nLineThe line the assertion is defined on
(const char *);
@} Get HTML describing the address and (optionally) admin of the server.

Parameters
prefixText which is prepended to the return value
rThe request_rec
Return Value
HTML describing the server, allocated in @a r's pool.

(char *);
strtoul does not exist on sunos4.

(int, pre_mpm, (apr_pool_t *p, ap_scoreboard_e sb_type));
Hook for post scoreboard creation, pre mpm. @ingroup hooks

Parameters
pApache pool to allocate from.
Return Value
OK or DECLINE on success; anything else is a error

(apr_status_t);
Get the current bucket brigade from the next filter on the filter stack. The filter returns an apr_status_t value. If the bottom-most filter doesn't read from the network, then ::AP_NOBODY_READ is returned. The bucket brigade will be empty when there is nothing left to get.

Parameters
filterThe next filter in the chain
bucketThe current bucket brigade. The original brigade passed to ap_get_brigade() must be empty.
modeThe way in which the data should be read
blockHow the operations should be performed ::APR_BLOCK_READ, ::APR_NONBLOCK_READ
readbytesHow many bytes to read from the next filter.
(const char *);
Generic command handling function for integers

Parameters
cmdThe command parameters for this directive
struct_ptrpointer into a given type
argThe argument to the directive
Return Value
An error string or NULL on success

(apr_status_t);
Pass the current bucket brigade down to the next filter on the filter stack. The filter returns an apr_status_t value. If the bottom-most filter doesn't write to the network, then ::AP_NOBODY_WROTE is returned. The caller relinquishes ownership of the brigade.

Parameters
filterThe next filter in the chain
bucketThe current bucket brigade
(ap_filter_rec_t *);
This function is used to register an input filter with the system. After this registration is performed, then a filter may be added into the filter chain by using ap_add_input_filter() and simply specifying the name.

Parameters
nameThe name to attach to the filter function
filter_funcThe filter function to name
filter_initThe function to call before the filter handlers are invoked
ftypeThe type of filter function, either ::AP_FTYPE_CONTENT or ::AP_FTYPE_CONNECTION
See Also
add_input_filter()

(ap_filter_rec_t *);
This function is used to register an output filter with the system. After this registration is performed, then a filter may be added into the filter chain by using ap_add_output_filter() and simply specifying the name.

Parameters
nameThe name to attach to the filter function
filter_funcThe filter function to name
filter_initThe function to call before the filter handlers are invoked
ftypeThe type of filter function, either ::AP_FTYPE_CONTENT or ::AP_FTYPE_CONNECTION
See Also
ap_add_output_filter()

(ap_filter_t *);
Adds a named filter into the filter chain on the specified request record. The filter will be installed with the specified context pointer. Filters added in this way will always be placed at the end of the filters that have the same type (thus, the filters have the same order as the calls to ap_add_filter). If the current filter chain contains filters from another request, then this filter will be added before those other filters.

To re-iterate that last comment. This function is building a FIFO list of filters. Take note of that when adding your filter to the chain.

Parameters
nameThe name of the filter to add
ctxContext data to provide to the filter
rThe request to add this filter for (or NULL if it isn't associated with a request)
cThe connection to add the fillter for
(ap_filter_t *);
Variant of ap_add_input_filter() that accepts a registered filter handle (as returned by ap_register_input_filter()) rather than a filter name

Parameters
fThe filter handle to add
ctxContext data to provide to the filter
rThe request to add this filter for (or NULL if it isn't associated with a request)
cThe connection to add the fillter for
(ap_filter_rec_t *);
Returns the filter handle for use with ap_add_input_filter_handle.

Parameters
nameThe filter name to look up
(ap_filter_t *);
Add a filter to the current request. Filters are added in a FIFO manner. The first filter added will be the first filter called.

Parameters
nameThe name of the filter to add
ctxContext data to set in the filter
rThe request to add this filter for (or NULL if it isn't associated with a request)
cThe connection to add this filter for
(ap_filter_t *);
Variant of ap_add_output_filter() that accepts a registered filter handle (as returned by ap_register_output_filter()) rather than a filter name

Parameters
fThe filter handle to add
rThe request to add this filter for (or NULL if it isn't associated with a request)
cThe connection to add the fillter for
(ap_filter_rec_t *);
Returns the filter handle for use with ap_add_output_filter_handle.

Parameters
nameThe filter name to look up
(void);
Remove an input filter from either the request or connection stack it is associated with.

Parameters
fThe filter to remove
(int);
Return true if the specified method is limited by being listed in a container, or by *not* being listed in a container.

Parameters
methodPointer to a string specifying the method to check.
cmdPointer to the cmd_parms structure passed to the directive handler.
Return Value
0 if the method is not limited in the current scope

(void);
Remove an output filter from either the request or connection stack it is associated with.

Parameters
fThe filter to remove
(apr_status_t);
prepare a bucket brigade to be setaside. If a different brigade was set-aside earlier, then the two brigades are concatenated together.

Parameters
fThe current filter
save_toThe brigade that was previously set-aside. Regardless, the new bucket brigade is returned in this location.
bThe bucket brigade to save aside. This brigade is always empty on return
pEnsure that all data in the brigade lives as long as this pool
(apr_status_t);
Flush function for apr_brigade_* calls. This calls ap_pass_brigade to flush the brigade if the brigade buffer overflows. @note this function has nothing to do with FLUSH buckets. It is simply a way to flush content out of a brigade and down a filter stack.

Parameters
bbThe brigade to flush
ctxThe filter to pass the brigade to
(apr_status_t);
Flush the current brigade down the filter stack.

Parameters
fThe current filter
bbThe brigade to flush
(apr_status_t);
Write a buffer for the current filter, buffering if possible. Write a buffer for the current filter, buffering if possible. Write a character for the current filter, buffering if possible. Write an unspecified number of strings to the current filter

Parameters
fthe filter doing the writing
bbThe brigade to buffer into
dataThe data to write
nbyteThe number of bytes in the data
fthe filter doing the writing
bbThe brigade to buffer into
strThe string to write
fthe filter doing the writing
bbThe brigade to buffer into
cThe character to write
fthe filter doing the writing
bbThe brigade to buffer into ... The strings to write
(apr_status_t);
Output data to the filter in printf format

Parameters
fthe filter doing the writing
bbThe brigade to buffer into
fmtThe format string ... The argumets to use to fill out the format string
(int);
util_ldap_connection_t *ldc)

(util_ldap_connection_t *);
const char *binddn, const char *bindpw, deref_options deref, int netscapessl, int starttls)

(int);
const char *url, const char *dn, const char *reqdn, int compare_dn_on_server)

(int);
const char *url, const char *dn, const char *attrib, const char *value)

(const char *);
Generic command handling function for strings, always sets the value to a lowercase string

Parameters
cmdThe command parameters for this directive
struct_ptrpointer into a given type
argThe argument to the directive
Return Value
An error string or NULL on success

(int);
char *url, const char *basedn, int scope, char **attrs, char *filter, char *bindpw, char **binddn, char ***retvals)

(int);
char *url, const char *basedn, int scope, char **attrs, char *filter, char **binddn, char ***retvals)

(const char *);
Generic command handling function for flags

Parameters
cmdThe command parameters for this directive
struct_ptrpointer into a given type
argThe argument to the directive (either 1 or 0)
Return Value
An error string or NULL on success

(const char *);
Generic command handling function for files

Parameters
cmdThe command parameters for this directive
struct_ptrpointer into a given type
argThe argument to the directive
Return Value
An error string or NULL on success

(const char *);
Generic command handling function to respond with cmd->help as an error

This allows simple declarations such as;

    AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL, 
        "The Foo directive is no longer supported, use Bar"),

Parameters
cmdThe command parameters for this directive
struct_ptrpointer into a given type
argThe argument to the directive
Return Value
The cmd->help value as the error string

(char *);
For modules which need to read config files, open logs, etc. this returns the canonical form of fname made absolute to ap_server_root.

Parameters
ppool to allocate data from
fnameThe file name
(void);
Add a module to the server

Parameters
mThe module structure of the module to add
pThe pool of the same lifetime as the module
(void);
Remove a module from the server. There are some caveats: when the module is removed, its slot is lost so all the current per-dir and per-server configurations are invalid. So we should only ever call this function when you are invalidating almost all our current data. I.e. when doing a restart.

Parameters
mthe module structure of the module to remove
(void);
Add a module to the chained modules list and the list of loaded modules

Parameters
mThe module structure of the module to add
pThe pool with the same lifetime as the module
(void);
Remove a module fromthe chained modules list and the list of loaded modules

Parameters
mthe module structure of the module to remove
(int);
Add a module to the list of loaded module based on the name of the module

Parameters
nameThe name of the module
pThe pool valid for the lifetime of the module
Return Value
1 on success, 0 on failure

(const char *);
Find the name of the specified module

Parameters
mThe module to get the name for
Return Value
the name of the module

(module *);
Find a module based on the name of the module

Parameters
namethe name of the module
Return Value
the module structure if found, NULL otherwise

(apr_status_t);
Open a ap_configfile_t as apr_file_t

Parameters
ret_cfgopen ap_configfile_t struct pointer
pThe pool to allocate the structure from
namethe name of the file to open
(ap_configfile_t *);
Allocate a ap_configfile_t handle with user defined functions and params

Parameters
pThe pool to allocate from
descrThe name of the file
paramThe argument passed to getch/getstr/close
getc_funcThe getch function
gets_funcThe getstr function
close_funcThe close function
(int);
Read one line from open ap_configfile_t, strip LF, increase line number

Parameters
bufplace to store the line read
bufsizesize of the buffer
cfpFile to read from
Return Value
1 on success, 0 on failure

(int);
Read one char from open configfile_t, increase line number upon LF

Parameters
cfpThe file to read from
Return Value
the character read

(int);
Detach from open ap_configfile_t, calling the close handler

Parameters
cfpThe file to close
Return Value
1 on sucess, 0 on failure

(const char *);
Read all data between the current and the matching . All of this data is forgotten immediately.

Parameters
cmdThe cmd_parms to pass to the directives inside the container
directiveThe directive name to read until
Return Value
Error string on failure, NULL on success

(const char *);
Read all data between the current and the matching and build a config tree from it

Parameters
ppool to allocate from
temp_poolTemporary pool to allocate from
parmsThe cmd_parms to pass to all directives read
currentThe current node in the tree
curr_parentThe current parent node
orig_directiveThe directive to read until hit.
Return Value
Error string on failure, NULL on success

(const char *);
Build a config tree from a config file

Parameters
parmsThe cmd_parms to pass to all of the directives in the file
conf_poolThe pconf pool
temp_poolThe temporary pool
conftreePlace to store the root node of the config tree
Return Value
Error string on erro, NULL otherwise

(const char *);
Walk a config tree and setup the server's internal structures

Parameters
conftreeThe config tree to walk
parmsThe cmd_parms to pass to all functions
section_vectorThe per-section config vector.
Return Value
Error string on error, NULL otherwise

(apr_status_t);
@file ap_regkey.h @brief APR-style Win32 Registry Manipulation Win32 Only: Constants for ap_regkey_open() Win32 Only: Flags for ap_regkey_value_set() Win32 Only: Open the specified registry key.

Parameters
newkeyThe opened registry key
parentkeyThe open registry key of the parent, or one of
          AP_REGKEY_CLASSES_ROOT
          AP_REGKEY_CURRENT_CONFIG
          AP_REGKEY_CURRENT_USER
          AP_REGKEY_LOCAL_MACHINE
          AP_REGKEY_USERS
          AP_REGKEY_PERFORMANCE_DATA 
          AP_REGKEY_DYN_DATA 
keynameThe path of the key relative to the parent key
flagsOr'ed value of:
          APR_READ             open key for reading
          APR_WRITE            open key for writing
          APR_CREATE           create the key if it doesn't exist
          APR_EXCL             return error if APR_CREATE and key exists
poolThe pool in which newkey is allocated
(const char *);
@defgroup ap_check_cmd_context ap_check_cmd_context @{ Check the context a command is used in.

Parameters
cmdThe command to check
forbiddenWhere the command is forbidden.
Return Value
Error string on error, NULL on success

(void);
Run a single module's two create_config hooks

Parameters
pthe pool to allocate from
sThe server to configure for.
mThe module to configure
(void);
Add all of the prelinked modules into the loaded module list

Parameters
processThe process that is currently running the server
(void);
Show the preloaded configuration directives, the help string explaining the directive arguments, in what module they are handled, and in what parts of the configuration they are allowed. Used for httpd -h.

(void);
Show the preloaded module names. Used for httpd -l.

(const char *);
Show the MPM name. Used in reporting modules such as mod_info to provide extra information to the user

(server_rec *);
Read all config files and setup the server

Parameters
processThe process running the server
temp_poolA pool to allocate temporary data from.
config_nameThe name of the config file
conftreePlace to store the root of the config tree
Return Value
The setup server_rec list.

(void);
Run all rewrite args hooks for loaded modules

Parameters
processThe process currently running the server
(void);
Run the register hooks function for a specified module

Parameters
mThe module to run the register hooks function fo
pThe pool valid for the lifetime of the module
(void);
Setup all virtual hosts

Parameters
pThe pool to allocate from
main_serverThe head of the server_rec list
(apr_status_t);
Win32 Only: Close the registry key opened or created by ap_regkey_open().

Parameters
keyThe registry key to close
(ap_conf_vector_t*);
Setup the config vector for a request_rec

Parameters
pThe pool to allocate the config vector from
Return Value
The config vector

(ap_conf_vector_t *);
Setup the config vector for per dir module configs

Parameters
pThe pool to allocate the config vector from
Return Value
The config vector

(ap_conf_vector_t*);
Run all of the modules merge per dir config functions

Parameters
pThe pool to pass to the merge functions
baseThe base directory config structure
new_confThe new directory config structure
(ap_conf_vector_t*);
Setup the config vector for a connection_rec

Parameters
pThe pool to allocate the config vector from
Return Value
The config vector

(int);
parse an htaccess file

Parameters
resultinghtaccess_result
rThe request currently being served
overrideWhich overrides are active
pathThe path to the htaccess file
access_nameThe list of possible names for .htaccess files int The status of the current request
(const char *);
Setup a virtual host

Parameters
pThe pool to allocate all memory from
hostnameThe hostname of the virtual hsot
main_serverThe main server for this Apache configuration
psPlace to store the new server_rec return Error string on error, NULL on success
(void);
Process the config file for Apache

Parameters
sThe server rec to use for the command parms
fnameThe name of the config file
conftreeThe root node of the created config tree
pPool for general allocation
ptemPool for temporary allocation
(void);
Process all directives in the config tree

Parameters
sThe server rec to use in the command parms
conftreeThe config tree to process
pThe pool for general allocation
ptempThe pool for temporary allocations
(int);
Run the handler phase of each module until a module accepts the responsibility of serving the request

Parameters
rThe current request
Return Value
The status of the current request

(const command_rec *);
Find a given directive in a command_rec table

Parameters
nameThe directive to search for
cmdsThe table to search
Return Value
The directive definition of the specified directive

(apr_status_t);
Win32 Only: Remove the given registry key. @remark ap_regkey_remove() is not recursive, although it removes all values within the given keyname, it will not remove a key containing subkeys.

Parameters
parentkeyThe open registry key of the parent, or one of
          AP_REGKEY_CLASSES_ROOT
          AP_REGKEY_CURRENT_CONFIG
          AP_REGKEY_CURRENT_USER
          AP_REGKEY_LOCAL_MACHINE
          AP_REGKEY_USERS
          AP_REGKEY_PERFORMANCE_DATA 
          AP_REGKEY_DYN_DATA 
keynameThe path of the key relative to the parent key
poolThe pool used for temp allocations
(const command_rec *);
Find a given directive in a list module

Parameters
cmd_nameThe directive to search for
modThe module list to search
Return Value
The directive definition of the specified directive

(void *);
Ask a module to create per-server and per-section (dir/loc/file) configs (if it hasn't happened already). The results are stored in the server's config, and the specified per-section config vector.

Parameters
serverThe server to operate upon.
section_vectorThe per-section config vector.
sectionWhich section to create a config for.
modThe module which is defining the config data.
pconfA pool for all configuration allocations.
Return Value
The (new) per-section config data.

(int,header_parser,(request_rec *r));
Run the header parser functions for each module

Parameters
rThe current request
Return Value
OK or DECLINED

(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp));
Run the pre_config function for each module

Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
Return Value
OK or DECLINED on success anything else is a error

(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s));
Run the post_config function for each module

Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
sThe list of server_recs
Return Value
OK or DECLINED on success anything else is a error

(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s));
Run the open_logs functions for each module

Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
sThe list of server_recs
Return Value
OK or DECLINED on success anything else is a error

(void,child_init,(apr_pool_t *pchild, server_rec *s));
Run the child_init functions for each module

Parameters
pchildThe child pool
sThe list of server_recs in this server
(int,handler,(request_rec *r));
Run the handler functions for each module @remark non-wildcard handlers should HOOK_MIDDLE, wildcard HOOK_LAST

Parameters
rThe request_rec
(int,quick_handler,(request_rec *r, int lookup_uri));
Run the quick handler functions for each module. The quick_handler is run before any other requests hooks are called (location_walk, directory_walk, access checking, et. al.). This hook was added to provide a quick way to serve content from a URI keyed cache.

Parameters
rThe request_rec
lookup_uriControls whether the caller actually wants content or not. lookup is set when the quick_handler is called out of ap_sub_req_lookup_uri()
(void,optional_fn_retrieve,(void));
Retrieve the optional functions for each module. This is run immediately before the server starts. Optional functions should be registered during the hook registration phase.

(apr_status_t);
Win32 Only: Retrieve a registry value string from an open key. @remark There is no toggle to prevent environment variable expansion if the registry value is set with AP_REG_EXPAND (REG_EXPAND_SZ), such expansions are always performed.

Parameters
resultThe string value retrieved
keyThe registry key to retrieve the value from
valuenameThe named value to retrieve (pass "" for the default)
poolThe pool used to store the result
(apr_status_t);
Win32 Only: Store a registry value string into an open key.

Parameters
keyThe registry key to store the value into
valuenameThe named value to store (pass "" for the default)
valueThe string to store for the named value
flagsThe option AP_REGKEY_EXPAND or 0, where AP_REGKEY_EXPAND values will find all %foo% variables expanded from the environment.
poolThe pool used for temp allocations
(int);
@file http_request.h @brief Apache Request library An internal handler used by the ap_process_request, all subrequest mechanisms and the redirect mechanism.

Parameters
rThe request, subrequest or internal redirect to pre-process
Return Value
The return code for the request

(apr_status_t);
Win32 Only: Retrieve a raw byte value from an open key.

Parameters
resultThe raw bytes value retrieved
resultsizePointer to a variable to store the number raw bytes retrieved
keyThe registry key to retrieve the value from
valuenameThe named value to retrieve (pass "" for the default)
poolThe pool used to store the result
(request_rec *);

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. The file info passed must include the name, and must have the same relative directory as the current request.

(void);

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!

(int,create_request,(request_rec *r));
Gives modules a chance to create their request_config entry when the request is created. @ingroup hooks

Parameters
rThe current request
(int,translate_name,(request_rec *r));
This hook allow modules an opportunity to translate the URI into an actual filename. If no modules do anything special, the server's default rules will be followed. @ingroup hooks

Parameters
rThe current request
Return Value
OK, DECLINED, or HTTP_...

(int,map_to_storage,(request_rec *r));
This hook allow modules to set the per_dir_config based on their own context (such as sections) and responds to contextless requests such as TRACE that need no security or filesystem mapping. based on the filesystem. @ingroup hooks

Parameters
rThe current request
Return Value
DONE (or HTTP_) if this contextless request was just fulfilled (such as TRACE), OK if this is not a file, and DECLINED if this is a file. The core map_to_storage (HOOK_RUN_REALLY_LAST) will directory_walk and file_walk the r->filename.

(int,check_user_id,(request_rec *r));
This hook is used to analyze the request headers, authenticate the user, and set the user information in the request record (r->user and r->ap_auth_type). This hook is only run when Apache determines that authentication/authorization is required for this resource (as determined by the 'Require' directive). It runs after the access_checker hook, and before the auth_checker hook. @ingroup hooks

Parameters
rThe current request
Return Value
OK, DECLINED, or HTTP_...

(int,fixups,(request_rec *r));
Allows modules to perform module-specific fixing of header fields. This is invoked just before any content-handler @ingroup hooks

Parameters
rThe current request
Return Value
OK, DECLINED, or HTTP_...

(int,type_checker,(request_rec *r));
This routine is called to determine and/or set the various document type information bits, like Content-type (via r->content_type), language, et cetera. @ingroup hooks

Parameters
rthe current request
Return Value
OK, DECLINED, or HTTP_...

(int,access_checker,(request_rec *r));
This hook is used to apply additional access control to this resource. It runs *before* a user is authenticated, so this hook is really to apply additional restrictions independent of a user. It also runs independent of 'Require' directive usage. @ingroup hooks

Parameters
rthe current request
Return Value
OK, DECLINED, or HTTP_...

(int,auth_checker,(request_rec *r));
This hook is used to check to see if the resource being requested is available for the authenticated user (r->user and r->ap_auth_type). It runs after the access_checker and check_user_id hooks. Note that it will *only* be called if Apache determines that access control has been applied to this resource (through a 'Require' directive). @ingroup hooks

Parameters
rthe current request
Return Value
OK, DECLINED, or HTTP_...

char *ap_get_local_host(apr_pool_t *p);
Determine the local host name for the current machine

Parameters
pThe pool to allocate from
Return Value
A copy of the local host name

apr_status_tap_sub_req_output_filter(ap_filter_t *f, apr_bucket_brigade *bb);
An output filter to strip EOS buckets from sub-requests. This always has to be inserted at the end of a sub-requests filter stack.

Parameters
fThe current filter
bbThe brigade to filter
apr_status_tutil_ldap_connection_unbind(util_ldap_connection_t *ldc);
Unbind a connection to an LDAP server

This function unbinds the LDAP connection, and disconnects from the server. It is used during error conditions, to bring the LDAP connection back to a known state.

Parameters
ldcA structure containing the expanded details of the server that was connected.
apr_status_tutil_ldap_connection_cleanup(util_ldap_connection_t *ldc);
Cleanup a connection to an LDAP server

This function is registered with the pool cleanup to close down the LDAP connections when the server is finished with them.

Parameters
ldcA structure containing the expanded details of the server that was connected.
char*util_ald_cache_display(apr_pool_t *pool, util_ldap_state_t *st);
Display formatted stats for cache

This function returns a string allocated from the provided pool that describes various stats about the cache.

Parameters
Thepool to allocate the returned string from
intap_run_sub_req(request_rec *r);
Run the handler for the subrequest

Parameters
rThe subrequest to run
Return Value
The return code for the subrequest

intap_some_auth_required(request_rec *r);
Can be used within any handler to determine if any authentication is required for the current request

Parameters
rThe current request
Return Value
1 if authentication is required, 0 otherwise

intap_is_initial_req(request_rec *r);
Determine if the current request is the main request or a subrequest

Parameters
rThe current request
Return Value
1 if this is the main request, 0 otherwise

intutil_ldap_connection_open(request_rec *r,;
Open a connection to an LDAP server

This function connects to the LDAP server and binds. It does not connect if already connected (ldc->ldap != NULL). Does not bind if already bound.

Parameters
ldcA structure containing the expanded details of the server to connect to. The handle to the LDAP connection is returned as ldc->ldap.
Return Value
If successful LDAP_SUCCESS is returned.

intutil_ldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,;
Compare two DNs for sameness

Two DNs can be equal and still fail a string comparison. Eg "dc=example,dc=com" and "dc=example, dc=com". Use the compare_dn_on_server unless there are serious performance issues.

Parameters
rThe request record
ldcThe LDAP connection being used.
urlThe URL of the LDAP connection - used for deciding which cache to use.
dnThe first DN to compare.
reqdnThe DN to compare the first DN to.
compare_dn_on_serverFlag to determine whether the DNs should be checked using LDAP calls or with a direct string comparision. A direct string comparison is faster, but not as accurate - false negative comparisons are possible.
intutil_ldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,;
A generic LDAP compare function

Use this function to determine whether an attribute/value pair exists within an object. Typically this would be used to determine LDAP group membership.

Parameters
rThe request record
ldcThe LDAP connection being used.
urlThe URL of the LDAP connection - used for deciding which cache to use.
dnThe DN of the object in which we do the compare.
attribThe attribute within the object we are comparing for.
valueThe value of the attribute we are trying to compare for.
intutil_ldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,;
Checks a username/password combination by binding to the LDAP server

The filter supplied will be searched for. If a single entry is returned, an attempt is made to bind as that user. If this bind succeeds, the user is not validated.

Parameters
rThe request record
ldcThe LDAP connection being used.
urlThe URL of the LDAP connection - used for deciding which cache to use.
basednThe Base DN to search for the user in.
scopeLDAP scope of the search.
attrsLDAP attributes to return in search.
filterThe user to search for in the form of an LDAP filter. This filter must return exactly one user for the check to be successful.
bindpwThe user password to bind as.
binddnThe DN of the user will be returned in this variable.
retvalsThe values corresponding to the attributes requested in the attrs array.
intutil_ldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,;
Retrieves the LDAP DN of the user without the need to know user password

The filter supplied will be searched for. A single entry matching the search is returned.

Parameters
rThe request record
ldcThe LDAP connection being used.
urlThe URL of the LDAP connection - used for deciding which cache to use.
basednThe Base DN to search for the user in.
scopeLDAP scope of the search.
attrsLDAP attributes to return in search.
filterThe user to search for in the form of an LDAP filter. This filter must return exactly one user for the check to be successful.
binddnThe DN of the user will be returned in this variable.
retvalsThe values corresponding to the attributes requested in the attrs array.
intutil_ldap_ssl_supported(request_rec *r);
Checks if SSL support is available in mod_ldap

request_rec* ap_sub_req_lookup_uri(const char *new_uri, const request_rec *r);
Create a subrequest from the given URI. This subrequest can be inspected to find information about the requested URI

Parameters
new_uriThe URI to lookup
rThe current request
next_filterThe first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request
Return Value
The new request record

request_rec* ap_sub_req_lookup_file(const char *new_file, const request_rec *r);
Create a subrequest for the given file. This subrequest can be inspected to find information about the requested file

Parameters
new_fileThe file to lookup
rThe current request
next_filterThe first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request
Return Value
The new request record

request_rec* ap_sub_req_lookup_dirent(apr_finfo_t *finfo, int subtype, const request_rec *r);
Create a subrequest for the given apr_dir_read result. This subrequest can be inspected to find information about the requested file

Parameters
finfoThe apr_dir_read result to lookup
rThe current request
subtypeWhat type of subrequest to perform, one of;
     AP_SUBREQ_NO_ARGS     ignore r->args and r->path_info
     AP_SUBREQ_MERGE_ARGS  merge r->args and r->path_info
next_filterThe first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request
Return Value
The new request record

request_rec* ap_sub_req_method_uri(const char *method, const char *new_uri, const request_rec *r);
Create a subrequest for the given URI using a specific method. This subrequest can be inspected to find information about the requested URI

Parameters
methodThe method to use in the new subrequest
new_uriThe URI to lookup
rThe current request
next_filterThe first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request
Return Value
The new request record

apr_status_t util_ldap_cache_init(apr_pool_t *pool, util_ldap_state_t *st);

Return Value
The status code returned is the status code of the apr_smmem_init() call. Regardless of the status, the cache will be set up at least for in-process or in-thread operation.

util_ldap_close_connection(util_ldap_connection_t*ldc);
Close a connection to an LDAP server

This function unbinds from the LDAP server, and clears ldc->ldap. It is possible to rebind to this server again using the same ldc structure, using apr_ldap_open_connection().

Parameters
ldcA structure containing the expanded details of the server that was connected.
util_ldap_connection_t*util_ldap_connection_find(request_rec *r, const char *host, int port,;
Find a connection in a list of connections

Once a connection is found and returned, a lock will be acquired to lock that particular connection, so that another thread does not try and use this connection while it is busy. Once you are finished with a connection, apr_ldap_connection_close() must be called to release this connection.

Parameters
rThe request record
hostThe hostname to connect to (multiple hosts space separated)
portThe port to connect to
binddnThe DN to bind with
bindpwThe password to bind with
derefThe dereferencing behavior
secureuse SSL on the connection
voidap_destroy_sub_req(request_rec *r);
Free the memory associated with a subrequest

Parameters
rThe subrequest to finish
voidap_internal_redirect(const char *new_uri, request_rec *r);
Redirect the current request to some other uri

Parameters
new_uriThe URI to replace the current request with
rThe current request
voidap_internal_redirect_handler(const char *new_uri, request_rec *r);
This function is designed for things like actions or CGI scripts, when using AddHandler, and you want to preserve the content type across an internal redirect.

Parameters
new_uriThe URI to replace the current request with.
rThe current request
voidap_internal_fast_redirect(request_rec *sub_req, request_rec *r);
Redirect the current request to a sub_req, merging the pools

Parameters
sub_reqA subrequest created from this request
rThe current request
voidap_update_mtime(request_rec *r, apr_time_t dependency_mtime);
Function to set the r->mtime field to the specified value if it's later than what's already there.

Parameters
rThe current request
dependency_timeTime to set the mtime to
voidap_allow_methods(request_rec *r, int reset, ...);
Add one or more methods to the list permitted to access the resource. Usually executed by the content handler before the response header is sent, but sometimes invoked at an earlier phase if a module knows it can set the list authoritatively. Note that the methods are ADDED to any already permitted unless the reset flag is non-zero. The list is used to generate the Allow response header field when it is needed.

Parameters
rThe pointer to the request identifying the resource.
resetBoolean flag indicating whether this list should completely replace any current settings. ... A NULL-terminated list of strings, each identifying a method name to add.
Return Value
None.

voidap_allow_standard_methods(request_rec *r, int reset, ...);
Add one or more methods to the list permitted to access the resource. Usually executed by the content handler before the response header is sent, but sometimes invoked at an earlier phase if a module knows it can set the list authoritatively. Note that the methods are ADDED to any already permitted unless the reset flag is non-zero. The list is used to generate the Allow response header field when it is needed.

Parameters
rThe pointer to the request identifying the resource.
resetBoolean flag indicating whether this list should completely replace any current settings. ... A list of method identifiers, from the "M_" series defined in httpd.h, terminated with a value of -1 (e.g., "M_GET, M_POST, M_OPTIONS, -1")
Return Value
None.

voidap_die(int type, request_rec *r);
Kill the current request

Parameters
typeWhy the request is dieing
rThe current request
voidutil_ldap_cache_init(apr_pool_t *p, util_ldap_state_t *st);
Init the LDAP cache

Parameters
poolThe pool to use to initialise the cache
reqsizeThe size of the shared memory segement to request. A size of zero requests the max size possible from apr_shmem_init()

© 2000 [Apache Software Foundation]
Generated by ScanDoc 0.14
Last Updated: Fri Apr 14 12:43:20 2006