summaryrefslogtreecommitdiffstats
path: root/include/http_vhost.h
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2005-04-25 07:23:18 +0200
committerPaul Querna <pquerna@apache.org>2005-04-25 07:23:18 +0200
commit03c53e0a5b820a75eb3dcdb4e88eed65fbf6b47c (patch)
tree3bde970b89d65487426e9a8cb4c7be6e636bea25 /include/http_vhost.h
parentRemove ap_method_list_do and ap_method_list_vdo as previously mentioned dev@h... (diff)
downloadapache2-03c53e0a5b820a75eb3dcdb4e88eed65fbf6b47c.tar.xz
apache2-03c53e0a5b820a75eb3dcdb4e88eed65fbf6b47c.zip
Add ap_vhost_iterate_given_conn() as I had previously mentioned on the mailing list.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@164538 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/http_vhost.h')
-rw-r--r--include/http_vhost.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/http_vhost.h b/include/http_vhost.h
index ffd2a89a97..1459441246 100644
--- a/include/http_vhost.h
+++ b/include/http_vhost.h
@@ -53,6 +53,30 @@ const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy,
const char *arg);
/**
+ * Callback function for every Name Based Virtual Host.
+ * @param baton Opaque user object
+ * @param conn The current Connection
+ * @param s The current Server
+ * @see ap_vhost_iterate_given_conn
+ * @return 0 on success, any non-zero return will stop the iteration.
+ */
+typedef int(*ap_vhost_iterate_conn_cb)(void* baton, conn_rec* conn, server_rec* s);
+
+/**
+ * For every virtual host on this connection, call func_cb.
+ * @param conn The current connection
+ * @param func_cb Function called for every Name Based Virtual Host for this
+ * connection.
+ * @param baton Opaque object passed to func_cb.
+ * @return The return value from func_cb.
+ * @note If func_cb returns non-zero, the function will return at this point,
+ * and not continue iterating the virtual hosts.
+ */
+AP_DECLARE(int) ap_vhost_iterate_given_conn(conn_rec *conn,
+ ap_vhost_iterate_conn_cb func_cb,
+ void* baton);
+
+/**
* given an ip address only, give our best guess as to what vhost it is
* @param conn The current connection
*/