diff options
Diffstat (limited to 'include/http_core.h')
-rw-r--r-- | include/http_core.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/include/http_core.h b/include/http_core.h index 85354552..d39546f7 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -159,6 +159,32 @@ AP_DECLARE(int) ap_allow_overrides(request_rec *r); AP_DECLARE(const char *) ap_document_root(request_rec *r); /** + * Lookup the remote user agent's DNS name or IP address + * @ingroup get_remote_hostname + * @param req The current request + * @param type The type of lookup to perform. One of: + * <pre> + * REMOTE_HOST returns the hostname, or NULL if the hostname + * lookup fails. It will force a DNS lookup according to the + * HostnameLookups setting. + * REMOTE_NAME returns the hostname, or the dotted quad if the + * hostname lookup fails. It will force a DNS lookup according + * to the HostnameLookups setting. + * REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is + * never forced. + * REMOTE_DOUBLE_REV will always force a DNS lookup, and also force + * a double reverse lookup, regardless of the HostnameLookups + * setting. The result is the (double reverse checked) + * hostname, or NULL if any of the lookups fail. + * </pre> + * @param str_is_ip unless NULL is passed, this will be set to non-zero on + * output when an IP address string is returned + * @return The remote hostname (based on the request useragent_ip) + */ +AP_DECLARE(const char *) ap_get_useragent_host(request_rec *req, int type, + int *str_is_ip); + +/** * Lookup the remote client's DNS name or IP address * @ingroup get_remote_host * @param conn The current connection @@ -180,7 +206,7 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r); * </pre> * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address * string is returned - * @return The remote hostname + * @return The remote hostname (based on the connection client_ip) */ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip); @@ -565,7 +591,7 @@ typedef struct { ap_regex_t *r; const char *mime_type; /* forced with ForceType */ - const char *handler; /* forced with SetHandler */ + const char *handler; /* forced by something other than SetHandler */ const char *output_filters; /* forced with SetOutputFilters */ const char *input_filters; /* forced with SetInputFilters */ int accept_path_info; /* forced with AcceptPathInfo */ @@ -642,7 +668,7 @@ typedef struct { */ unsigned int cgi_pass_auth : 2; unsigned int qualify_redirect_url :2; - + ap_expr_info_t *expr_handler; /* forced with SetHandler */ } core_dir_config; /* macro to implement off by default behaviour */ |