]> granicus.if.org Git - apache/blob - include/http_core.h
cleanup handle_set function
[apache] / include / http_core.h
1 /* ====================================================================
2  * The Apache Software License, Version 1.1
3  *
4  * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
5  * reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in
16  *    the documentation and/or other materials provided with the
17  *    distribution.
18  *
19  * 3. The end-user documentation included with the redistribution,
20  *    if any, must include the following acknowledgment:
21  *       "This product includes software developed by the
22  *        Apache Software Foundation (http://www.apache.org/)."
23  *    Alternately, this acknowledgment may appear in the software itself,
24  *    if and wherever such third-party acknowledgments normally appear.
25  *
26  * 4. The names "Apache" and "Apache Software Foundation" must
27  *    not be used to endorse or promote products derived from this
28  *    software without prior written permission. For written
29  *    permission, please contact apache@apache.org.
30  *
31  * 5. Products derived from this software may not be called "Apache",
32  *    nor may "Apache" appear in their name, without prior written
33  *    permission of the Apache Software Foundation.
34  *
35  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46  * SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the Apache Software Foundation.  For more
51  * information on the Apache Software Foundation, please see
52  * <http://www.apache.org/>.
53  *
54  * Portions of this software are based upon public domain software
55  * originally written at the National Center for Supercomputing Applications,
56  * University of Illinois, Urbana-Champaign.
57  */
58
59 #ifndef APACHE_HTTP_CORE_H
60 #define APACHE_HTTP_CORE_H
61
62 #include "apr.h"
63 #include "apr_hash.h"
64 #include "apr_optional.h"
65 #include "util_filter.h"
66
67 #if APR_HAVE_STRUCT_RLIMIT
68 #include <sys/time.h>
69 #include <sys/resource.h>
70 #endif
71
72
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76
77 /**
78  * @package CORE HTTP Daemon
79  */
80
81 /* ****************************************************************
82  *
83  * The most basic server code is encapsulated in a single module
84  * known as the core, which is just *barely* functional enough to
85  * serve documents, though not terribly well.
86  *
87  * Largely for NCSA back-compatibility reasons, the core needs to
88  * make pieces of its config structures available to other modules.
89  * The accessors are declared here, along with the interpretation
90  * of one of them (allow_options).
91  */
92
93 #define OPT_NONE 0
94 #define OPT_INDEXES 1
95 #define OPT_INCLUDES 2
96 #define OPT_SYM_LINKS 4
97 #define OPT_EXECCGI 8
98 #define OPT_UNSET 16
99 #define OPT_INCNOEXEC 32
100 #define OPT_SYM_OWNER 64
101 #define OPT_MULTI 128
102 #define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI)
103
104 /* options for get_remote_host() */
105 /* REMOTE_HOST returns the hostname, or NULL if the hostname
106  * lookup fails.  It will force a DNS lookup according to the
107  * HostnameLookups setting.
108  */
109 #define REMOTE_HOST (0)
110
111 /* REMOTE_NAME returns the hostname, or the dotted quad if the
112  * hostname lookup fails.  It will force a DNS lookup according
113  * to the HostnameLookups setting.
114  */
115 #define REMOTE_NAME (1)
116
117 /* REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is
118  * never forced.
119  */
120 #define REMOTE_NOLOOKUP (2)
121
122 /* REMOTE_DOUBLE_REV will always force a DNS lookup, and also force
123  * a double reverse lookup, regardless of the HostnameLookups
124  * setting.  The result is the (double reverse checked) hostname,
125  * or NULL if any of the lookups fail.
126  */
127 #define REMOTE_DOUBLE_REV (3)
128
129 #define SATISFY_ALL 0
130 #define SATISFY_ANY 1
131 #define SATISFY_NOSPEC 2
132
133 /* Make sure we don't write less than 8000 bytes at any one time.
134  */
135 #define AP_MIN_BYTES_TO_WRITE  8000
136
137 /* default maximum of internal redirects */
138 # define AP_DEFAULT_MAX_INTERNAL_REDIRECTS 10
139
140 /* default maximum subrequest nesting level */
141 # define AP_DEFAULT_MAX_SUBREQ_DEPTH 10
142
143 /**
144  * Retrieve the value of Options for this request
145  * @param r The current request
146  * @return the Options bitmask
147  * @deffunc int ap_allow_options(request_rec *r)
148  */
149 AP_DECLARE(int) ap_allow_options(request_rec *r);
150
151 /**
152  * Retrieve the value of the AllowOverride for this request
153  * @param r The current request
154  * @return the overrides bitmask
155  * @deffunc int ap_allow_overrides(request_rec *r)
156  */
157 AP_DECLARE(int) ap_allow_overrides(request_rec *r);
158
159 /**
160  * Retrieve the value of the DefaultType directive, or text/plain if not set
161  * @param r The current request
162  * @return The default type
163  * @deffunc const char *ap_default_type(request_rec *r)
164  */
165 AP_DECLARE(const char *) ap_default_type(request_rec *r);     
166
167 /**
168  * Retrieve the document root for this server
169  * @param r The current request
170  * @warning Don't use this!  If your request went through a Userdir, or 
171  * something like that, it'll screw you.  But it's back-compatible...
172  * @return The document root
173  * @deffunc const char *ap_document_root(request_rec *r)
174  */
175 AP_DECLARE(const char *) ap_document_root(request_rec *r);
176
177 /**
178  * Lookup the remote client's DNS name or IP address
179  * @param conn The current connection
180  * @param dir_config The directory config vector from the request
181  * @param type The type of lookup to perform.  One of:
182  * <pre>
183  *     REMOTE_HOST returns the hostname, or NULL if the hostname
184  *                 lookup fails.  It will force a DNS lookup according to the
185  *                 HostnameLookups setting.
186  *     REMOTE_NAME returns the hostname, or the dotted quad if the
187  *                 hostname lookup fails.  It will force a DNS lookup according
188  *                 to the HostnameLookups setting.
189  *     REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is
190  *                     never forced.
191  *     REMOTE_DOUBLE_REV will always force a DNS lookup, and also force
192  *                   a double reverse lookup, regardless of the HostnameLookups
193  *                   setting.  The result is the (double reverse checked) 
194  *                   hostname, or NULL if any of the lookups fail.
195  * </pre>
196  * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address 
197  *        string is returned
198  * @return The remote hostname
199  * @deffunc const char *ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip)
200  */
201 AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
202
203 /**
204  * Retrieve the login name of the remote user.  Undef if it could not be
205  * determined
206  * @param r The current request
207  * @return The user logged in to the client machine
208  * @deffunc const char *ap_get_remote_logname(request_rec *r)
209  */
210 AP_DECLARE(const char *) ap_get_remote_logname(request_rec *r);
211
212 /* Used for constructing self-referencing URLs, and things like SERVER_PORT,
213  * and SERVER_NAME.
214  */
215 /**
216  * build a fully qualified URL from the uri and information in the request rec
217  * @param p The pool to allocate the URL from
218  * @param uri The path to the requested file
219  * @param r The current request
220  * @return A fully qualified URL
221  * @deffunc char *ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r)
222  */
223 AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r);
224
225 /**
226  * Get the current server name from the request
227  * @param r The current request
228  * @return the server name
229  * @deffunc const char *ap_get_server_name(request_rec *r)
230  */
231 AP_DECLARE(const char *) ap_get_server_name(request_rec *r);
232
233 /**
234  * Get the current server port
235  * @param The current request
236  * @return The server's port
237  * @deffunc apr_port_t ap_get_server_port(const request_rec *r)
238  */
239 AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r);
240
241 /**
242  * Return the limit on bytes in request msg body 
243  * @param r The current request
244  * @return the maximum number of bytes in the request msg body
245  * @deffunc apr_off_t ap_get_limit_req_body(const request_rec *r)
246  */
247 AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r);
248
249 /**
250  * Return the limit on bytes in XML request msg body
251  * @param r The current request
252  * @return the maximum number of bytes in XML request msg body
253  * @deffunc size_t ap_get_limit_xml_body(const request_rec *r)
254  */
255 AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r);
256
257 /**
258  * Install a custom response handler for a given status
259  * @param r The current request
260  * @param status The status for which the custom response should be used
261  * @param string The custom response.  This can be a static string, a file
262  *               or a URL
263  */
264 AP_DECLARE(void) ap_custom_response(request_rec *r, int status, const char *string);
265
266 /**
267  * Check if the current request is beyond the configured max. number of redirects or subrequests
268  * @param r The current request
269  * @return true (is exceeded) or false
270  * @deffunc int ap_is_recursion_limit_exceeded(const request_rec *r)
271  */
272 AP_DECLARE(int) ap_is_recursion_limit_exceeded(const request_rec *r);
273
274 /**
275  * Check for a definition from the server command line
276  * @param name The define to check for
277  * @return 1 if defined, 0 otherwise
278  * @deffunc int ap_exists_config_define(const char *name)
279  */
280 AP_DECLARE(int) ap_exists_config_define(const char *name);
281 /* FIXME! See STATUS about how */
282 AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r);
283
284 /* Authentication stuff.  This is one of the places where compatibility
285  * with the old config files *really* hurts; they don't discriminate at
286  * all between different authentication schemes, meaning that we need
287  * to maintain common state for all of them in the core, and make it
288  * available to the other modules through interfaces.
289  */
290 typedef struct require_line require_line;
291
292 /** A structure to keep track of authorization requirements */
293 struct require_line {
294     /** Where the require line is in the config file. */
295     apr_int64_t method_mask;
296     /** The complete string from the command line */
297     char *requirement;
298 };
299      
300 /**
301  * Return the type of authorization required for this request
302  * @param r The current request
303  * @return The authorization required
304  * @deffunc const char *ap_auth_type(request_rec *r)
305  */
306 AP_DECLARE(const char *) ap_auth_type(request_rec *r);
307
308 /**
309  * Return the current Authorization realm
310  * @param r The current request
311  * @return The current authorization realm
312  * @deffunc const char *ap_auth_name(request_rec *r)
313  */
314 AP_DECLARE(const char *) ap_auth_name(request_rec *r);     
315
316 /**
317  * How the requires lines must be met.
318  * @param r The current request
319  * @return How the requirements must be met.  One of:
320  * <pre>
321  *      SATISFY_ANY    -- any of the requirements must be met.
322  *      SATISFY_ALL    -- all of the requirements must be met.
323  *      SATISFY_NOSPEC -- There are no applicable satisfy lines
324  * </pre>
325  * @deffunc int ap_satisfies(request_rec *r)
326  */
327 AP_DECLARE(int) ap_satisfies(request_rec *r);
328
329 /**
330  * Retrieve information about all of the requires directives for this request
331  * @param r The current request
332  * @return An array of all requires directives for this request
333  * @deffunc const apr_array_header_t *ap_requires(request_rec *r)
334  */
335 AP_DECLARE(const apr_array_header_t *) ap_requires(request_rec *r);    
336
337 #ifdef CORE_PRIVATE
338
339 /*
340  * Core is also unlike other modules in being implemented in more than
341  * one file... so, data structures are declared here, even though most of
342  * the code that cares really is in http_core.c.  Also, another accessor.
343  */
344
345 AP_DECLARE_DATA extern module core_module;
346
347 /* Per-request configuration */
348
349 typedef struct {
350     /* bucket brigade used by getline for look-ahead and 
351      * ap_get_client_block for holding left-over request body */
352     struct apr_bucket_brigade *bb;
353
354     /* an array of per-request working data elements, accessed
355      * by ID using ap_get_request_note()
356      * (Use ap_register_request_note() during initialization
357      * to add elements)
358      */
359     void **notes;
360
361     /* There is a script processor installed on the output filter chain,
362      * so it needs the default_handler to deliver a (script) file into
363      * the chain so it can process it. Normally, default_handler only
364      * serves files on a GET request (assuming the file is actual content),
365      * since other methods are not content-retrieval. This flag overrides
366      * that behavior, stating that the "content" is actually a script and
367      * won't actually be delivered as the response for the non-GET method.
368      */
369     int deliver_script;
370 } core_request_config;
371
372 /* Standard entries that are guaranteed to be accessible via
373  * ap_get_request_note() for each request (additional entries
374  * can be added with ap_register_request_note())
375  */
376 #define AP_NOTE_DIRECTORY_WALK 0
377 #define AP_NOTE_LOCATION_WALK  1
378 #define AP_NOTE_FILE_WALK      2
379 #define AP_NUM_STD_NOTES       3
380
381 /**
382  * Reserve an element in the core_request_config->notes array
383  * for some application-specific data
384  * @return An integer key that can be passed to ap_get_request_note()
385  *         during request processing to access this element for the
386  *         current request.
387  */
388 AP_DECLARE(apr_size_t) ap_register_request_note(void);
389
390 /**
391  * Retrieve a pointer to an element in the core_request_config->notes array
392  * @param r The request
393  * @param note_num  A key for the element: either a value obtained from
394  *        ap_register_request_note() or one of the predefined AP_NOTE_*
395  *        values.
396  * @return NULL if the note_num is invalid, otherwise a pointer to the
397  *         requested note element.
398  * @remark At the start of a request, each note element is NULL.  The
399  *         handle provided by ap_get_request_note() is a pointer-to-pointer
400  *         so that the caller can point the element to some app-specific
401  *         data structure.  The caller should guarantee that any such
402  *         structure will last as long as the request itself.
403  */
404 AP_DECLARE(void **) ap_get_request_note(request_rec *r, apr_size_t note_num);
405
406 /* Per-directory configuration */
407
408 typedef unsigned char allow_options_t;
409 typedef unsigned char overrides_t;
410
411 /*
412  * Bits of info that go into making an ETag for a file
413  * document.  Why a long?  Because char historically
414  * proved too short for Options, and int can be different
415  * sizes on different platforms.
416  */
417 typedef unsigned long etag_components_t;
418
419 #define ETAG_UNSET 0
420 #define ETAG_NONE  (1 << 0)
421 #define ETAG_MTIME (1 << 1)
422 #define ETAG_INODE (1 << 2)
423 #define ETAG_SIZE  (1 << 3)
424 #define ETAG_BACKWARD (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
425 #define ETAG_ALL   (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
426
427 typedef enum {
428     srv_sig_unset,
429     srv_sig_off,
430     srv_sig_on,
431     srv_sig_withmail
432 } server_signature_e;
433
434 typedef struct {
435     /* path of the directory/regex/etc. see also d_is_fnmatch/absolute below */
436     char *d;
437     /* the number of slashes in d */
438     unsigned d_components;
439
440     /* If (opts & OPT_UNSET) then no absolute assignment to options has
441      * been made.
442      * invariant: (opts_add & opts_remove) == 0
443      * Which said another way means that the last relative (options + or -)
444      * assignment made to each bit is recorded in exactly one of opts_add
445      * or opts_remove.
446      */
447     allow_options_t opts;
448     allow_options_t opts_add;
449     allow_options_t opts_remove;
450     overrides_t override;
451     
452     /* MIME typing --- the core doesn't do anything at all with this,
453      * but it does know what to slap on a request for a document which
454      * goes untyped by other mechanisms before it slips out the door...
455      */
456     
457     char *ap_default_type;
458   
459     /* Authentication stuff.  Groan... */
460     
461     int satisfy;
462     char *ap_auth_type;
463     char *ap_auth_name;
464     apr_array_header_t *ap_requires;
465
466     /* Custom response config. These can contain text or a URL to redirect to.
467      * if response_code_strings is NULL then there are none in the config,
468      * if it's not null then it's allocated to sizeof(char*)*RESPONSE_CODES.
469      * This lets us do quick merges in merge_core_dir_configs().
470      */
471   
472     char **response_code_strings;
473
474     /* Hostname resolution etc */
475 #define HOSTNAME_LOOKUP_OFF     0
476 #define HOSTNAME_LOOKUP_ON      1
477 #define HOSTNAME_LOOKUP_DOUBLE  2
478 #define HOSTNAME_LOOKUP_UNSET   3
479     unsigned int hostname_lookups : 4;
480
481     signed int content_md5 : 2;  /* calculate Content-MD5? */
482
483 #define USE_CANONICAL_NAME_OFF   (0)
484 #define USE_CANONICAL_NAME_ON    (1)
485 #define USE_CANONICAL_NAME_DNS   (2)
486 #define USE_CANONICAL_NAME_UNSET (3)
487     unsigned use_canonical_name : 2;
488
489     /* since is_fnmatch(conf->d) was being called so frequently in
490      * directory_walk() and its relatives, this field was created and
491      * is set to the result of that call.
492      */
493     unsigned d_is_fnmatch : 1;
494
495     /* should we force a charset on any outgoing parameterless content-type?
496      * if so, which charset?
497      */
498 #define ADD_DEFAULT_CHARSET_OFF   (0)
499 #define ADD_DEFAULT_CHARSET_ON    (1)
500 #define ADD_DEFAULT_CHARSET_UNSET (2)
501     unsigned add_default_charset : 2;
502     const char *add_default_charset_name;
503
504     /* System Resource Control */
505 #ifdef RLIMIT_CPU
506     struct rlimit *limit_cpu;
507 #endif
508 #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
509     struct rlimit *limit_mem;
510 #endif
511 #ifdef RLIMIT_NPROC
512     struct rlimit *limit_nproc;
513 #endif
514     apr_off_t limit_req_body;      /* limit on bytes in request msg body */
515     long limit_xml_body;           /* limit on bytes in XML request msg body */
516
517     /* logging options */
518
519     server_signature_e server_signature;
520
521     int loglevel;
522     
523     /* Access control */
524     apr_array_header_t *sec_file;
525     regex_t *r;
526
527     const char *mime_type;       /* forced with ForceType  */
528     const char *handler;         /* forced with SetHandler */
529     const char *output_filters;  /* forced with SetOutputFilters */
530     const char *input_filters;   /* forced with SetInputFilters */
531     int accept_path_info;        /* forced with AcceptPathInfo */
532
533     apr_hash_t *ct_output_filters; /* added with AddOutputFilterByType */
534
535     /*
536      * What attributes/data should be included in ETag generation?
537      */
538     etag_components_t etag_bits;
539     etag_components_t etag_add;
540     etag_components_t etag_remove;
541
542     /*
543      * Run-time performance tuning
544      */
545 #define ENABLE_MMAP_OFF    (0)
546 #define ENABLE_MMAP_ON     (1)
547 #define ENABLE_MMAP_UNSET  (2)
548     unsigned int enable_mmap : 2;  /* whether files in this dir can be mmap'ed */
549
550 #define ENABLE_SENDFILE_OFF    (0)
551 #define ENABLE_SENDFILE_ON     (1)
552 #define ENABLE_SENDFILE_UNSET  (2)
553     unsigned int enable_sendfile : 2;  /* files in this dir can be mmap'ed */
554     unsigned int allow_encoded_slashes : 1; /* URLs may contain %2f w/o being
555                                              * pitched indiscriminately */
556 } core_dir_config;
557
558 /* Per-server core configuration */
559
560 typedef struct {
561   
562 #ifdef GPROF
563     char *gprof_dir;
564 #endif
565
566     /* Name translations --- we want the core to be able to do *something*
567      * so it's at least a minimally functional web server on its own (and
568      * can be tested that way).  But let's keep it to the bare minimum:
569      */
570     const char *ap_document_root;
571   
572     /* Access control */
573
574     char *access_name;
575     apr_array_header_t *sec_dir;
576     apr_array_header_t *sec_url;
577
578     /* recursion backstopper */
579     int redirect_limit; /* maximum number of internal redirects */
580     int subreq_limit;   /* maximum nesting level of subrequests */
581 } core_server_config;
582
583 /* for AddOutputFiltersByType in core.c */
584 void ap_add_output_filters_by_type(request_rec *r);
585
586 /* for http_config.c */
587 void ap_core_reorder_directories(apr_pool_t *, server_rec *);
588
589 /* for mod_perl */
590 AP_CORE_DECLARE(void) ap_add_per_dir_conf(server_rec *s, void *dir_config);
591 AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config);
592 AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config);
593 AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);
594
595 #endif /* CORE_PRIVATE */
596
597
598 /* ----------------------------------------------------------------------
599  *
600  * Runtime status/management
601  */
602
603 typedef enum {
604     ap_mgmt_type_string,
605     ap_mgmt_type_long,
606     ap_mgmt_type_hash
607 } ap_mgmt_type_e;
608
609 typedef union {
610     const char *s_value;
611     long i_value;
612     apr_hash_t *h_value;
613 } ap_mgmt_value;
614
615 typedef struct {
616     const char *description;
617     const char *name;
618     ap_mgmt_type_e vtype;
619     ap_mgmt_value v;
620 } ap_mgmt_item_t;
621
622 /* Handles for core filters */
623 extern AP_DECLARE_DATA ap_filter_rec_t *ap_subreq_core_filter_handle;
624 extern AP_DECLARE_DATA ap_filter_rec_t *ap_core_output_filter_handle;
625 extern AP_DECLARE_DATA ap_filter_rec_t *ap_content_length_filter_handle;
626 extern AP_DECLARE_DATA ap_filter_rec_t *ap_net_time_filter_handle;
627 extern AP_DECLARE_DATA ap_filter_rec_t *ap_core_input_filter_handle;
628
629 /**
630  * This hook provdes a way for modules to provide metrics/statistics about
631  * their operational status.
632  *
633  * @param p A pool to use to create entries in the hash table
634  * @param val The name of the parameter(s) that is wanted. This is
635  *            tree-structured would be in the form ('*' is all the tree,
636  *            'module.*' all of the module , 'module.foo.*', or
637  *            'module.foo.bar' )
638  * @param ht The hash table to store the results. Keys are item names, and
639  *           the values point to ap_mgmt_item_t structures.
640  * @ingroup hooks
641  */
642 AP_DECLARE_HOOK(int, get_mgmt_items,
643                 (apr_pool_t *p, const char * val, apr_hash_t *ht))
644
645 /* ---------------------------------------------------------------------- */
646
647 /* ----------------------------------------------------------------------
648  *
649  * I/O logging with mod_logio
650  */
651
652 APR_DECLARE_OPTIONAL_FN(void, ap_logio_add_bytes_out,
653                         (conn_rec *c, apr_off_t bytes));
654
655 /* ----------------------------------------------------------------------
656  *
657  * ident lookups with mod_ident
658  */
659
660 APR_DECLARE_OPTIONAL_FN(const char *, ap_ident_lookup,
661                         (request_rec *r));
662
663 /* ---------------------------------------------------------------------- */
664
665 #ifdef __cplusplus
666 }
667 #endif
668
669 #endif  /* !APACHE_HTTP_CORE_H */