]> granicus.if.org Git - apache/blob - include/http_vhost.h
Added a new LDAPConnectionTimeout directive to util_ldap so that the socket connectio...
[apache] / include / http_vhost.h
1 /* Copyright 1999-2004 The Apache Software Foundation
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 #ifndef APACHE_HTTP_VHOST_H
17 #define APACHE_HTTP_VHOST_H
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /**
24  * @package Virtual Host package
25  */
26
27 /**
28  * called before any config is read
29  * @param p Pool to allocate out of
30  */
31 AP_DECLARE(void) ap_init_vhost_config(apr_pool_t *p);
32
33 /**
34  * called after the config has been read to compile the tables needed to do 
35  * the run-time vhost lookups
36  * @param p The pool to allocate out of
37  * @param main_server The start of the virtual host list
38  * @deffunc ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server)
39  */
40 AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server);
41
42 /**
43  * handle addresses in <VirtualHost> statement
44  * @param p The pool to allocate out of
45  * @param hostname The hostname in the VirtualHost statement
46  * @param s The list of Virtual Hosts.
47  */
48 const char *ap_parse_vhost_addrs(apr_pool_t *p, const char *hostname, server_rec *s);
49
50 /* handle NameVirtualHost directive */
51 const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy,
52                                       const char *arg);
53
54 /**
55  * given an ip address only, give our best guess as to what vhost it is 
56  * @param conn The current connection
57  */
58 AP_DECLARE(void) ap_update_vhost_given_ip(conn_rec *conn);
59
60 /**
61  * ap_update_vhost_given_ip is never enough, and this is always called after 
62  * the headers have been read.  It may change r->server.
63  * @param r The current request
64  */
65 AP_DECLARE(void) ap_update_vhost_from_headers(request_rec *r);
66
67 /**
68  * Match the host in the header with the hostname of the server for this
69  * request.
70  * @param r The current request
71  * @param host The hostname in the headers
72  * @param port The port from the headers
73  * @return return 1 if the host:port matches any of the aliases of r->server,
74  * return 0 otherwise
75  * @deffunc int ap_matches_request_vhost(request_rec *r, const char *host, apr_port_t port)
76  */
77 AP_DECLARE(int) ap_matches_request_vhost(request_rec *r, const char *host,
78     apr_port_t port);
79
80 #ifdef __cplusplus
81 }
82 #endif
83
84 #endif  /* !APACHE_HTTP_VHOST_H */