You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by je...@apache.org on 2005/02/08 00:12:05 UTC

svn commit: r151768 [26/47] - in apr/site/trunk/docs/docs/apr: ./ iconv/ util/

Modified: apr/site/trunk/docs/docs/apr/apr__network__io_8h-source.html
URL: http://svn.apache.org/viewcvs/apr/site/trunk/docs/docs/apr/apr__network__io_8h-source.html?view=diff&r1=151767&r2=151768
==============================================================================
--- apr/site/trunk/docs/docs/apr/apr__network__io_8h-source.html (original)
+++ apr/site/trunk/docs/docs/apr/apr__network__io_8h-source.html Mon Feb  7 15:10:17 2005
@@ -3,752 +3,831 @@
 <title>Apache Portable Runtime: apr_network_io.h Source File</title>
 <link href="doxygen.css" rel="stylesheet" type="text/css">
 </head><body>
-<!-- Generated by Doxygen 1.3.8 -->
+<!-- Generated by Doxygen 1.3.7 -->
 <div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
-<h1>apr_network_io.h</h1><a href="apr__network__io_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span>
-00002 <span class="comment"> *</span>
-00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
-00004 <span class="comment"> * you may not use this file except in compliance with the License.</span>
-00005 <span class="comment"> * You may obtain a copy of the License at</span>
-00006 <span class="comment"> *</span>
-00007 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
-00008 <span class="comment"> *</span>
-00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
-00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
-00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
-00012 <span class="comment"> * See the License for the specific language governing permissions and</span>
-00013 <span class="comment"> * limitations under the License.</span>
-00014 <span class="comment"> */</span>
-00015 
-00016 <span class="preprocessor">#ifndef APR_NETWORK_IO_H</span>
-00017 <span class="preprocessor"></span><span class="preprocessor">#define APR_NETWORK_IO_H</span>
-00018 <span class="preprocessor"></span><span class="comment">/**</span>
-00019 <span class="comment"> * @file apr_network_io.h</span>
-00020 <span class="comment"> * @brief APR Network library</span>
-00021 <span class="comment"> */</span>
-00022 
-00023 <span class="preprocessor">#include "apr.h"</span>
-00024 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
-00025 <span class="preprocessor">#include "<a class="code" href="apr__file__io_8h.html">apr_file_io.h</a>"</span>
-00026 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
-00027 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span> 
-00028 
-00029 <span class="preprocessor">#if APR_HAVE_NETINET_IN_H</span>
-00030 <span class="preprocessor"></span><span class="preprocessor">#include &lt;netinet/in.h&gt;</span>
-00031 <span class="preprocessor">#endif</span>
-00032 <span class="preprocessor"></span>
-00033 <span class="preprocessor">#ifdef __cplusplus</span>
-00034 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
-00035 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-00036 <span class="comment"></span>
-00037 <span class="comment">/**</span>
-00038 <span class="comment"> * @defgroup apr_network_io Network Routines</span>
-00039 <span class="comment"> * @ingroup APR </span>
-00040 <span class="comment"> * @{</span>
-00041 <span class="comment"> */</span>
-00042 
-00043 <span class="preprocessor">#ifndef APR_MAX_SECS_TO_LINGER</span>
-00044 <span class="preprocessor"></span><span class="comment">/** Maximum seconds to linger */</span>
-<a name="l00045"></a><a class="code" href="group__apr__network__io.html#ga41">00045</a> <span class="preprocessor">#define APR_MAX_SECS_TO_LINGER 30</span>
-00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00047 <span class="preprocessor"></span>
-00048 <span class="preprocessor">#ifndef APRMAXHOSTLEN</span>
-00049 <span class="preprocessor"></span><span class="comment">/** Maximum hostname length */</span>
-<a name="l00050"></a><a class="code" href="group__apr__network__io.html#ga42">00050</a> <span class="preprocessor">#define APRMAXHOSTLEN 256</span>
-00051 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00052 <span class="preprocessor"></span>
-00053 <span class="preprocessor">#ifndef APR_ANYADDR</span>
-00054 <span class="preprocessor"></span><span class="comment">/** Default 'any' address */</span>
-<a name="l00055"></a><a class="code" href="group__apr__network__io.html#ga43">00055</a> <span class="preprocessor">#define APR_ANYADDR "0.0.0.0"</span>
-00056 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00057 <span class="preprocessor"></span><span class="comment"></span>
-00058 <span class="comment">/**</span>
-00059 <span class="comment"> * @defgroup apr_sockopt Socket option definitions</span>
-00060 <span class="comment"> * @{</span>
-00061 <span class="comment"> */</span>
-<a name="l00062"></a><a class="code" href="group__apr__sockopt.html#ga0">00062</a> <span class="preprocessor">#define APR_SO_LINGER        1    </span><span class="comment">/**&lt; Linger */</span>
-<a name="l00063"></a><a class="code" href="group__apr__sockopt.html#ga1">00063</a> <span class="preprocessor">#define APR_SO_KEEPALIVE     2    </span><span class="comment">/**&lt; Keepalive */</span>
-<a name="l00064"></a><a class="code" href="group__apr__sockopt.html#ga2">00064</a> <span class="preprocessor">#define APR_SO_DEBUG         4    </span><span class="comment">/**&lt; Debug */</span>
-<a name="l00065"></a><a class="code" href="group__apr__sockopt.html#ga3">00065</a> <span class="preprocessor">#define APR_SO_NONBLOCK      8    </span><span class="comment">/**&lt; Non-blocking IO */</span>
-<a name="l00066"></a><a class="code" href="group__apr__sockopt.html#ga4">00066</a> <span class="preprocessor">#define APR_SO_REUSEADDR     16   </span><span class="comment">/**&lt; Reuse addresses */</span>
-<a name="l00067"></a><a class="code" href="group__apr__sockopt.html#ga5">00067</a> <span class="preprocessor">#define APR_SO_SNDBUF        64   </span><span class="comment">/**&lt; Send buffer */</span>
-<a name="l00068"></a><a class="code" href="group__apr__sockopt.html#ga6">00068</a> <span class="preprocessor">#define APR_SO_RCVBUF        128  </span><span class="comment">/**&lt; Receive buffer */</span>
-<a name="l00069"></a><a class="code" href="group__apr__sockopt.html#ga7">00069</a> <span class="preprocessor">#define APR_SO_DISCONNECTED  256  </span><span class="comment">/**&lt; Disconnected */</span>
-<a name="l00070"></a><a class="code" href="group__apr__sockopt.html#ga8">00070</a> <span class="preprocessor">#define APR_TCP_NODELAY      512  </span><span class="comment">/**&lt; For SCTP sockets, this is mapped</span>
-00071 <span class="comment">                                   * to STCP_NODELAY internally.</span>
-00072 <span class="comment">                                   */</span>
-<a name="l00073"></a><a class="code" href="group__apr__sockopt.html#ga9">00073</a> <span class="preprocessor">#define APR_TCP_NOPUSH       1024 </span><span class="comment">/**&lt; No push */</span>
-<a name="l00074"></a><a class="code" href="group__apr__sockopt.html#ga10">00074</a> <span class="preprocessor">#define APR_RESET_NODELAY    2048 </span><span class="comment">/**&lt; This flag is ONLY set internally</span>
-00075 <span class="comment">                                   * when we set APR_TCP_NOPUSH with</span>
-00076 <span class="comment">                                   * APR_TCP_NODELAY set to tell us that</span>
-00077 <span class="comment">                                   * APR_TCP_NODELAY should be turned on</span>
-00078 <span class="comment">                                   * again when NOPUSH is turned off</span>
-00079 <span class="comment">                                   */</span>
-<a name="l00080"></a><a class="code" href="group__apr__sockopt.html#ga11">00080</a> <span class="preprocessor">#define APR_INCOMPLETE_READ 4096  </span><span class="comment">/**&lt; Set on non-blocking sockets</span>
-00081 <span class="comment">                                   * (timeout != 0) on which the</span>
-00082 <span class="comment">                                   * previous read() did not fill a buffer</span>
-00083 <span class="comment">                                   * completely.  the next apr_socket_recv() </span>
-00084 <span class="comment">                                   * will first call select()/poll() rather than</span>
-00085 <span class="comment">                                   * going straight into read().  (Can also</span>
-00086 <span class="comment">                                   * be set by an application to force a</span>
-00087 <span class="comment">                                   * select()/poll() call before the next</span>
-00088 <span class="comment">                                   * read, in cases where the app expects</span>
-00089 <span class="comment">                                   * that an immediate read would fail.)</span>
-00090 <span class="comment">                                   */</span>
-<a name="l00091"></a><a class="code" href="group__apr__sockopt.html#ga12">00091</a> <span class="preprocessor">#define APR_INCOMPLETE_WRITE 8192 </span><span class="comment">/**&lt; like APR_INCOMPLETE_READ, but for write</span>
-00092 <span class="comment">                                   * @see APR_INCOMPLETE_READ</span>
-00093 <span class="comment">                                   */</span>
-<a name="l00094"></a><a class="code" href="group__apr__sockopt.html#ga13">00094</a> <span class="preprocessor">#define APR_IPV6_V6ONLY     16384 </span><span class="comment">/**&lt; Don't accept IPv4 connections on an</span>
-00095 <span class="comment">                                   * IPv6 listening socket.</span>
-00096 <span class="comment">                                   */</span>
-00097 <span class="comment"></span>
-00098 <span class="comment">/** @} */</span>
-00099 <span class="comment"></span>
-00100 <span class="comment">/** Define what type of socket shutdown should occur. */</span>
-<a name="l00101"></a><a class="code" href="group__apr__network__io.html#ga49">00101</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-00102     <a class="code" href="group__apr__network__io.html#gga49a31">APR_SHUTDOWN_READ</a>,          <span class="comment">/**&lt; no longer allow read request */</span>
-00103     <a class="code" href="group__apr__network__io.html#gga49a32">APR_SHUTDOWN_WRITE</a>,         <span class="comment">/**&lt; no longer allow write requests */</span>
-00104     <a class="code" href="group__apr__network__io.html#gga49a33">APR_SHUTDOWN_READWRITE</a>      <span class="comment">/**&lt; no longer allow read or write requests */</span>
-00105 } <a class="code" href="group__apr__network__io.html#ga49">apr_shutdown_how_e</a>;
-00106 
-<a name="l00107"></a><a class="code" href="group__apr__network__io.html#ga44">00107</a> <span class="preprocessor">#define APR_IPV4_ADDR_OK  0x01  </span><span class="comment">/**&lt; @see apr_sockaddr_info_get() */</span>
-<a name="l00108"></a><a class="code" href="group__apr__network__io.html#ga45">00108</a> <span class="preprocessor">#define APR_IPV6_ADDR_OK  0x02  </span><span class="comment">/**&lt; @see apr_sockaddr_info_get() */</span>
-00109 
-00110 <span class="preprocessor">#if (!APR_HAVE_IN_ADDR)</span>
-00111 <span class="preprocessor"></span><span class="comment">/**</span>
-00112 <span class="comment"> * We need to make sure we always have an in_addr type, so APR will just</span>
-00113 <span class="comment"> * define it ourselves, if the platform doesn't provide it.</span>
-00114 <span class="comment"> */</span>
-<a name="l00115"></a><a class="code" href="structin__addr.html">00115</a> <span class="keyword">struct </span><a class="code" href="structin__addr.html">in_addr</a> {
-<a name="l00116"></a><a class="code" href="structin__addr.html#o0">00116</a>     apr_uint32_t  <a class="code" href="structin__addr.html#o0">s_addr</a>; <span class="comment">/**&lt; storage to hold the IP# */</span>
-00117 };
-00118 <span class="preprocessor">#endif</span>
-00119 <span class="preprocessor"></span><span class="comment"></span>
-00120 <span class="comment">/** @def APR_INADDR_NONE</span>
-00121 <span class="comment"> * Not all platforms have a real INADDR_NONE.  This macro replaces</span>
-00122 <span class="comment"> * INADDR_NONE on all platforms.</span>
-00123 <span class="comment"> */</span>
-00124 <span class="preprocessor">#ifdef INADDR_NONE</span>
-00125 <span class="preprocessor"></span><span class="preprocessor">#define APR_INADDR_NONE INADDR_NONE</span>
-00126 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00127"></a><a class="code" href="group__apr__network__io.html#ga46">00127</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_INADDR_NONE ((unsigned int) 0xffffffff)</span>
-00128 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00129 <span class="preprocessor"></span><span class="comment"></span>
-00130 <span class="comment">/**</span>
-00131 <span class="comment"> * @def APR_INET</span>
-00132 <span class="comment"> * Not all platforms have these defined, so we'll define them here</span>
-00133 <span class="comment"> * The default values come from FreeBSD 4.1.1</span>
-00134 <span class="comment"> */</span>
-<a name="l00135"></a><a class="code" href="group__apr__network__io.html#ga47">00135</a> <span class="preprocessor">#define APR_INET     AF_INET</span>
-00136 <span class="preprocessor"></span><span class="comment">/** @def APR_UNSPEC</span>
-00137 <span class="comment"> * Let the system decide which address family to use</span>
-00138 <span class="comment"> */</span>
-00139 <span class="preprocessor">#ifdef AF_UNSPEC</span>
-00140 <span class="preprocessor"></span><span class="preprocessor">#define APR_UNSPEC   AF_UNSPEC</span>
-00141 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00142"></a><a class="code" href="group__apr__network__io.html#ga48">00142</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_UNSPEC   0</span>
-00143 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00144 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_IPV6</span>
-00145 <span class="preprocessor"></span><span class="comment">/** @def APR_INET6</span>
-00146 <span class="comment">* IPv6 Address Family. Not all platforms may have this defined.</span>
-00147 <span class="comment">*/</span>
-00148 
-00149 <span class="preprocessor">#define APR_INET6    AF_INET6</span>
-00150 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00151 <span class="preprocessor"></span><span class="comment"></span>
-00152 <span class="comment">/**</span>
-00153 <span class="comment"> * @defgroup IP_Proto IP Protocol Definitions for use when creating sockets</span>
-00154 <span class="comment"> * @{</span>
-00155 <span class="comment"> */</span>
-<a name="l00156"></a><a class="code" href="group___i_p___proto.html#ga0">00156</a> <span class="preprocessor">#define APR_PROTO_TCP       6   </span><span class="comment">/**&lt; TCP  */</span>
-<a name="l00157"></a><a class="code" href="group___i_p___proto.html#ga1">00157</a> <span class="preprocessor">#define APR_PROTO_UDP      17   </span><span class="comment">/**&lt; UDP  */</span>
-<a name="l00158"></a><a class="code" href="group___i_p___proto.html#ga2">00158</a> <span class="preprocessor">#define APR_PROTO_SCTP    132   </span><span class="comment">/**&lt; SCTP */</span>
-00159 <span class="comment">/** @} */</span>
-00160 <span class="comment"></span>
-00161 <span class="comment">/**</span>
-00162 <span class="comment"> * Enum to tell us if we're interested in remote or local socket</span>
-00163 <span class="comment"> */</span>
-<a name="l00164"></a><a class="code" href="group__apr__network__io.html#ga50">00164</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-00165     APR_LOCAL,
-00166     APR_REMOTE
-00167 } <a class="code" href="group__apr__network__io.html#ga50">apr_interface_e</a>;
-00168 <span class="comment"></span>
-00169 <span class="comment">/**</span>
-00170 <span class="comment"> * The specific declaration of inet_addr's ... some platforms fall back</span>
-00171 <span class="comment"> * inet_network (this is not good, but necessary)</span>
-00172 <span class="comment"> */</span>
-00173 
-00174 <span class="preprocessor">#if APR_HAVE_INET_ADDR</span>
-00175 <span class="preprocessor"></span><span class="preprocessor">#define apr_inet_addr    inet_addr</span>
-00176 <span class="preprocessor"></span><span class="preprocessor">#elif APR_HAVE_INET_NETWORK        </span><span class="comment">/* only DGUX, as far as I know */</span>
-00177 <span class="comment">/**</span>
-00178 <span class="comment"> * @warning</span>
-00179 <span class="comment"> * not generally safe... inet_network() and inet_addr() perform</span>
-00180 <span class="comment"> * different functions */</span>
-00181 <span class="preprocessor">#define apr_inet_addr    inet_network</span>
-00182 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00183 <span class="preprocessor"></span><span class="comment"></span>
-00184 <span class="comment">/** A structure to represent sockets */</span>
-<a name="l00185"></a><a class="code" href="group__apr__network__io.html#ga0">00185</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga0">apr_socket_t</a>     <a class="code" href="group__apr__network__io.html#ga0">apr_socket_t</a>;<span class="comment"></span>
-00186 <span class="comment">/**</span>
-00187 <span class="comment"> * A structure to encapsulate headers and trailers for apr_socket_sendfile</span>
-00188 <span class="comment"> */</span>
-<a name="l00189"></a><a class="code" href="group__apr__network__io.html#ga1">00189</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__hdtr__t.html">apr_hdtr_t</a>       <a class="code" href="group__apr__network__io.html#ga1">apr_hdtr_t</a>;<span class="comment"></span>
-00190 <span class="comment">/** A structure to represent in_addr */</span>
-<a name="l00191"></a><a class="code" href="group__apr__network__io.html#ga2">00191</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structin__addr.html">in_addr</a>          <a class="code" href="group__apr__network__io.html#ga2">apr_in_addr_t</a>;<span class="comment"></span>
-00192 <span class="comment">/** A structure to represent an IP subnet */</span>
-<a name="l00193"></a><a class="code" href="group__apr__network__io.html#ga3">00193</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga3">apr_ipsubnet_t</a> <a class="code" href="group__apr__network__io.html#ga3">apr_ipsubnet_t</a>;
-00194 <span class="comment"></span>
-00195 <span class="comment">/** @remark use apr_uint16_t just in case some system has a short that isn't 16 bits... */</span>
-<a name="l00196"></a><a class="code" href="group__apr__network__io.html#ga4">00196</a> <span class="keyword">typedef</span> apr_uint16_t            <a class="code" href="group__apr__network__io.html#ga4">apr_port_t</a>;
-00197 <span class="comment"></span>
-00198 <span class="comment">/** @remark It's defined here as I think it should all be platform safe...</span>
-00199 <span class="comment"> * @see apr_sockaddr_t</span>
-00200 <span class="comment"> */</span>
-<a name="l00201"></a><a class="code" href="group__apr__network__io.html#ga5">00201</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__sockaddr__t.html">apr_sockaddr_t</a> <a class="code" href="group__apr__network__io.html#ga5">apr_sockaddr_t</a>;<span class="comment"></span>
-00202 <span class="comment">/**</span>
-00203 <span class="comment"> * APRs socket address type, used to ensure protocol independence</span>
-00204 <span class="comment"> */</span>
-<a name="l00205"></a><a class="code" href="structapr__sockaddr__t.html">00205</a> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga5">apr_sockaddr_t</a> {<span class="comment"></span>
-00206 <span class="comment">    /** The pool to use... */</span>
-<a name="l00207"></a><a class="code" href="structapr__sockaddr__t.html#o0">00207</a>     <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *<a class="code" href="structapr__sockaddr__t.html#o0">pool</a>;<span class="comment"></span>
-00208 <span class="comment">    /** The hostname */</span>
-<a name="l00209"></a><a class="code" href="structapr__sockaddr__t.html#o1">00209</a>     <span class="keywordtype">char</span> *<a class="code" href="structapr__sockaddr__t.html#o1">hostname</a>;<span class="comment"></span>
-00210 <span class="comment">    /** Either a string of the port number or the service name for the port */</span>
-<a name="l00211"></a><a class="code" href="structapr__sockaddr__t.html#o2">00211</a>     <span class="keywordtype">char</span> *<a class="code" href="structapr__sockaddr__t.html#o2">servname</a>;<span class="comment"></span>
-00212 <span class="comment">    /** The numeric port */</span>
-<a name="l00213"></a><a class="code" href="structapr__sockaddr__t.html#o3">00213</a>     <a class="code" href="group__apr__network__io.html#ga4">apr_port_t</a> <a class="code" href="structapr__sockaddr__t.html#o3">port</a>;<span class="comment"></span>
-00214 <span class="comment">    /** The family */</span>
-<a name="l00215"></a><a class="code" href="structapr__sockaddr__t.html#o4">00215</a>     apr_int32_t <a class="code" href="structapr__sockaddr__t.html#o4">family</a>;<span class="comment"></span>
-00216 <span class="comment">    /** How big is the sockaddr we're using? */</span>
-<a name="l00217"></a><a class="code" href="structapr__sockaddr__t.html#o5">00217</a>     apr_socklen_t <a class="code" href="structapr__sockaddr__t.html#o5">salen</a>;<span class="comment"></span>
-00218 <span class="comment">    /** How big is the ip address structure we're using? */</span>
-<a name="l00219"></a><a class="code" href="structapr__sockaddr__t.html#o6">00219</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__sockaddr__t.html#o6">ipaddr_len</a>;<span class="comment"></span>
-00220 <span class="comment">    /** How big should the address buffer be?  16 for v4 or 46 for v6</span>
-00221 <span class="comment">     *  used in inet_ntop... */</span>
-<a name="l00222"></a><a class="code" href="structapr__sockaddr__t.html#o7">00222</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__sockaddr__t.html#o7">addr_str_len</a>;<span class="comment"></span>
-00223 <span class="comment">    /** This points to the IP address structure within the appropriate</span>
-00224 <span class="comment">     *  sockaddr structure.  */</span>
-<a name="l00225"></a><a class="code" href="structapr__sockaddr__t.html#o8">00225</a>     <span class="keywordtype">void</span> *<a class="code" href="structapr__sockaddr__t.html#o8">ipaddr_ptr</a>;<span class="comment"></span>
-00226 <span class="comment">    /** If multiple addresses were found by apr_sockaddr_info_get(), this </span>
-00227 <span class="comment">     *  points to a representation of the next address. */</span>
-<a name="l00228"></a><a class="code" href="structapr__sockaddr__t.html#o9">00228</a>     <a class="code" href="group__apr__network__io.html#ga5">apr_sockaddr_t</a> *<a class="code" href="structapr__sockaddr__t.html#o9">next</a>;<span class="comment"></span>
-00229 <span class="comment">    /** Union of either IPv4 or IPv6 sockaddr. */</span>
-00230     <span class="keyword">union </span>{<span class="comment"></span>
-00231 <span class="comment">        /** IPv4 sockaddr structure */</span>
-<a name="l00232"></a><a class="code" href="structapr__sockaddr__t.html#o10">00232</a>         <span class="keyword">struct </span>sockaddr_in sin;
-00233 <span class="preprocessor">#if APR_HAVE_IPV6</span>
-00234 <span class="preprocessor"></span><span class="comment">        /** IPv6 sockaddr structure */</span>
-00235         <span class="keyword">struct </span>sockaddr_in6 sin6;
-00236 <span class="preprocessor">#endif</span>
-00237 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_SA_STORAGE</span>
-00238 <span class="preprocessor"></span><span class="comment">        /** Placeholder to ensure that the size of this union is not</span>
-00239 <span class="comment">         * dependent on whether APR_HAVE_IPV6 is defined. */</span>
-00240         <span class="keyword">struct </span>sockaddr_storage sas;
+<h1>apr_network_io.h</h1><a href="apr__network__io_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span>
+00002 <span class="comment"> * applicable.</span>
+00003 <span class="comment"> *</span>
+00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
+00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
+00006 <span class="comment"> * You may obtain a copy of the License at</span>
+00007 <span class="comment"> *</span>
+00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
+00009 <span class="comment"> *</span>
+00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
+00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
+00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
+00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
+00014 <span class="comment"> * limitations under the License.</span>
+00015 <span class="comment"> */</span>
+00016 
+00017 <span class="preprocessor">#ifndef APR_NETWORK_IO_H</span>
+00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_NETWORK_IO_H</span>
+00019 <span class="preprocessor"></span><span class="comment">/**</span>
+00020 <span class="comment"> * @file apr_network_io.h</span>
+00021 <span class="comment"> * @brief APR Network library</span>
+00022 <span class="comment"> */</span>
+00023 
+00024 <span class="preprocessor">#include "apr.h"</span>
+00025 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
+00026 <span class="preprocessor">#include "<a class="code" href="apr__file__io_8h.html">apr_file_io.h</a>"</span>
+00027 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
+00028 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span> 
+00029 
+00030 <span class="preprocessor">#if APR_HAVE_NETINET_IN_H</span>
+00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;netinet/in.h&gt;</span>
+00032 <span class="preprocessor">#endif</span>
+00033 <span class="preprocessor"></span>
+00034 <span class="preprocessor">#ifdef __cplusplus</span>
+00035 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
+00036 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
+00037 <span class="comment"></span>
+00038 <span class="comment">/**</span>
+00039 <span class="comment"> * @defgroup apr_network_io Network Routines</span>
+00040 <span class="comment"> * @ingroup APR </span>
+00041 <span class="comment"> * @{</span>
+00042 <span class="comment"> */</span>
+00043 
+00044 <span class="preprocessor">#ifndef APR_MAX_SECS_TO_LINGER</span>
+00045 <span class="preprocessor"></span><span class="comment">/** Maximum seconds to linger */</span>
+<a name="l00046"></a><a class="code" href="group__apr__network__io.html#ga41">00046</a> <span class="preprocessor">#define APR_MAX_SECS_TO_LINGER 30</span>
+00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00048 <span class="preprocessor"></span>
+00049 <span class="preprocessor">#ifndef APRMAXHOSTLEN</span>
+00050 <span class="preprocessor"></span><span class="comment">/** Maximum hostname length */</span>
+<a name="l00051"></a><a class="code" href="group__apr__network__io.html#ga42">00051</a> <span class="preprocessor">#define APRMAXHOSTLEN 256</span>
+00052 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00053 <span class="preprocessor"></span>
+00054 <span class="preprocessor">#ifndef APR_ANYADDR</span>
+00055 <span class="preprocessor"></span><span class="comment">/** Default 'any' address */</span>
+<a name="l00056"></a><a class="code" href="group__apr__network__io.html#ga43">00056</a> <span class="preprocessor">#define APR_ANYADDR "0.0.0.0"</span>
+00057 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00058 <span class="preprocessor"></span><span class="comment"></span>
+00059 <span class="comment">/**</span>
+00060 <span class="comment"> * @defgroup apr_sockopt Socket option definitions</span>
+00061 <span class="comment"> * @{</span>
+00062 <span class="comment"> */</span>
+<a name="l00063"></a><a class="code" href="group__apr__sockopt.html#ga0">00063</a> <span class="preprocessor">#define APR_SO_LINGER        1    </span><span class="comment">/**&lt; Linger */</span>
+<a name="l00064"></a><a class="code" href="group__apr__sockopt.html#ga1">00064</a> <span class="preprocessor">#define APR_SO_KEEPALIVE     2    </span><span class="comment">/**&lt; Keepalive */</span>
+<a name="l00065"></a><a class="code" href="group__apr__sockopt.html#ga2">00065</a> <span class="preprocessor">#define APR_SO_DEBUG         4    </span><span class="comment">/**&lt; Debug */</span>
+<a name="l00066"></a><a class="code" href="group__apr__sockopt.html#ga3">00066</a> <span class="preprocessor">#define APR_SO_NONBLOCK      8    </span><span class="comment">/**&lt; Non-blocking IO */</span>
+<a name="l00067"></a><a class="code" href="group__apr__sockopt.html#ga4">00067</a> <span class="preprocessor">#define APR_SO_REUSEADDR     16   </span><span class="comment">/**&lt; Reuse addresses */</span>
+<a name="l00068"></a><a class="code" href="group__apr__sockopt.html#ga5">00068</a> <span class="preprocessor">#define APR_SO_SNDBUF        64   </span><span class="comment">/**&lt; Send buffer */</span>
+<a name="l00069"></a><a class="code" href="group__apr__sockopt.html#ga6">00069</a> <span class="preprocessor">#define APR_SO_RCVBUF        128  </span><span class="comment">/**&lt; Receive buffer */</span>
+<a name="l00070"></a><a class="code" href="group__apr__sockopt.html#ga7">00070</a> <span class="preprocessor">#define APR_SO_DISCONNECTED  256  </span><span class="comment">/**&lt; Disconnected */</span>
+<a name="l00071"></a><a class="code" href="group__apr__sockopt.html#ga8">00071</a> <span class="preprocessor">#define APR_TCP_NODELAY      512  </span><span class="comment">/**&lt; For SCTP sockets, this is mapped</span>
+00072 <span class="comment">                                   * to STCP_NODELAY internally.</span>
+00073 <span class="comment">                                   */</span>
+<a name="l00074"></a><a class="code" href="group__apr__sockopt.html#ga9">00074</a> <span class="preprocessor">#define APR_TCP_NOPUSH       1024 </span><span class="comment">/**&lt; No push */</span>
+<a name="l00075"></a><a class="code" href="group__apr__sockopt.html#ga10">00075</a> <span class="preprocessor">#define APR_RESET_NODELAY    2048 </span><span class="comment">/**&lt; This flag is ONLY set internally</span>
+00076 <span class="comment">                                   * when we set APR_TCP_NOPUSH with</span>
+00077 <span class="comment">                                   * APR_TCP_NODELAY set to tell us that</span>
+00078 <span class="comment">                                   * APR_TCP_NODELAY should be turned on</span>
+00079 <span class="comment">                                   * again when NOPUSH is turned off</span>
+00080 <span class="comment">                                   */</span>
+<a name="l00081"></a><a class="code" href="group__apr__sockopt.html#ga11">00081</a> <span class="preprocessor">#define APR_INCOMPLETE_READ 4096  </span><span class="comment">/**&lt; Set on non-blocking sockets</span>
+00082 <span class="comment">                                   * (timeout != 0) on which the</span>
+00083 <span class="comment">                                   * previous read() did not fill a buffer</span>
+00084 <span class="comment">                                   * completely.  the next apr_socket_recv() </span>
+00085 <span class="comment">                                   * will first call select()/poll() rather than</span>
+00086 <span class="comment">                                   * going straight into read().  (Can also</span>
+00087 <span class="comment">                                   * be set by an application to force a</span>
+00088 <span class="comment">                                   * select()/poll() call before the next</span>
+00089 <span class="comment">                                   * read, in cases where the app expects</span>
+00090 <span class="comment">                                   * that an immediate read would fail.)</span>
+00091 <span class="comment">                                   */</span>
+<a name="l00092"></a><a class="code" href="group__apr__sockopt.html#ga12">00092</a> <span class="preprocessor">#define APR_INCOMPLETE_WRITE 8192 </span><span class="comment">/**&lt; like APR_INCOMPLETE_READ, but for write</span>
+00093 <span class="comment">                                   * @see APR_INCOMPLETE_READ</span>
+00094 <span class="comment">                                   */</span>
+<a name="l00095"></a><a class="code" href="group__apr__sockopt.html#ga13">00095</a> <span class="preprocessor">#define APR_IPV6_V6ONLY     16384 </span><span class="comment">/**&lt; Don't accept IPv4 connections on an</span>
+00096 <span class="comment">                                   * IPv6 listening socket.</span>
+00097 <span class="comment">                                   */</span>
+<a name="l00098"></a><a class="code" href="group__apr__sockopt.html#ga14">00098</a> <span class="preprocessor">#define APR_TCP_DEFER_ACCEPT 32768 </span><span class="comment">/**&lt; Delay accepting of new connections </span>
+00099 <span class="comment">                                    * until data is available.</span>
+00100 <span class="comment">                                    * @see apr_socket_accept_filter</span>
+00101 <span class="comment">                                    */</span>
+00102 <span class="comment"></span>
+00103 <span class="comment">/** @} */</span>
+00104 <span class="comment"></span>
+00105 <span class="comment">/** Define what type of socket shutdown should occur. */</span>
+<a name="l00106"></a><a class="code" href="group__apr__network__io.html#ga49">00106</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+00107     <a class="code" href="group__apr__network__io.html#gga49a32">APR_SHUTDOWN_READ</a>,          <span class="comment">/**&lt; no longer allow read request */</span>
+00108     <a class="code" href="group__apr__network__io.html#gga49a33">APR_SHUTDOWN_WRITE</a>,         <span class="comment">/**&lt; no longer allow write requests */</span>
+00109     <a class="code" href="group__apr__network__io.html#gga49a34">APR_SHUTDOWN_READWRITE</a>      <span class="comment">/**&lt; no longer allow read or write requests */</span>
+00110 } <a class="code" href="group__apr__network__io.html#ga49">apr_shutdown_how_e</a>;
+00111 
+<a name="l00112"></a><a class="code" href="group__apr__network__io.html#ga44">00112</a> <span class="preprocessor">#define APR_IPV4_ADDR_OK  0x01  </span><span class="comment">/**&lt; @see apr_sockaddr_info_get() */</span>
+<a name="l00113"></a><a class="code" href="group__apr__network__io.html#ga45">00113</a> <span class="preprocessor">#define APR_IPV6_ADDR_OK  0x02  </span><span class="comment">/**&lt; @see apr_sockaddr_info_get() */</span>
+00114 
+00115 <span class="preprocessor">#if (!APR_HAVE_IN_ADDR)</span>
+00116 <span class="preprocessor"></span><span class="comment">/**</span>
+00117 <span class="comment"> * We need to make sure we always have an in_addr type, so APR will just</span>
+00118 <span class="comment"> * define it ourselves, if the platform doesn't provide it.</span>
+00119 <span class="comment"> */</span>
+<a name="l00120"></a><a class="code" href="structin__addr.html">00120</a> <span class="keyword">struct </span><a class="code" href="structin__addr.html">in_addr</a> {
+<a name="l00121"></a><a class="code" href="structin__addr.html#o0">00121</a>     apr_uint32_t  <a class="code" href="structin__addr.html#o0">s_addr</a>; <span class="comment">/**&lt; storage to hold the IP# */</span>
+00122 };
+00123 <span class="preprocessor">#endif</span>
+00124 <span class="preprocessor"></span><span class="comment"></span>
+00125 <span class="comment">/** @def APR_INADDR_NONE</span>
+00126 <span class="comment"> * Not all platforms have a real INADDR_NONE.  This macro replaces</span>
+00127 <span class="comment"> * INADDR_NONE on all platforms.</span>
+00128 <span class="comment"> */</span>
+00129 <span class="preprocessor">#ifdef INADDR_NONE</span>
+00130 <span class="preprocessor"></span><span class="preprocessor">#define APR_INADDR_NONE INADDR_NONE</span>
+00131 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00132"></a><a class="code" href="group__apr__network__io.html#ga46">00132</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_INADDR_NONE ((unsigned int) 0xffffffff)</span>
+00133 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00134 <span class="preprocessor"></span><span class="comment"></span>
+00135 <span class="comment">/**</span>
+00136 <span class="comment"> * @def APR_INET</span>
+00137 <span class="comment"> * Not all platforms have these defined, so we'll define them here</span>
+00138 <span class="comment"> * The default values come from FreeBSD 4.1.1</span>
+00139 <span class="comment"> */</span>
+<a name="l00140"></a><a class="code" href="group__apr__network__io.html#ga47">00140</a> <span class="preprocessor">#define APR_INET     AF_INET</span>
+00141 <span class="preprocessor"></span><span class="comment">/** @def APR_UNSPEC</span>
+00142 <span class="comment"> * Let the system decide which address family to use</span>
+00143 <span class="comment"> */</span>
+00144 <span class="preprocessor">#ifdef AF_UNSPEC</span>
+00145 <span class="preprocessor"></span><span class="preprocessor">#define APR_UNSPEC   AF_UNSPEC</span>
+00146 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00147"></a><a class="code" href="group__apr__network__io.html#ga48">00147</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_UNSPEC   0</span>
+00148 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00149 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_IPV6</span>
+00150 <span class="preprocessor"></span><span class="comment">/** @def APR_INET6</span>
+00151 <span class="comment">* IPv6 Address Family. Not all platforms may have this defined.</span>
+00152 <span class="comment">*/</span>
+00153 
+00154 <span class="preprocessor">#define APR_INET6    AF_INET6</span>
+00155 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00156 <span class="preprocessor"></span><span class="comment"></span>
+00157 <span class="comment">/**</span>
+00158 <span class="comment"> * @defgroup IP_Proto IP Protocol Definitions for use when creating sockets</span>
+00159 <span class="comment"> * @{</span>
+00160 <span class="comment"> */</span>
+<a name="l00161"></a><a class="code" href="group___i_p___proto.html#ga0">00161</a> <span class="preprocessor">#define APR_PROTO_TCP       6   </span><span class="comment">/**&lt; TCP  */</span>
+<a name="l00162"></a><a class="code" href="group___i_p___proto.html#ga1">00162</a> <span class="preprocessor">#define APR_PROTO_UDP      17   </span><span class="comment">/**&lt; UDP  */</span>
+<a name="l00163"></a><a class="code" href="group___i_p___proto.html#ga2">00163</a> <span class="preprocessor">#define APR_PROTO_SCTP    132   </span><span class="comment">/**&lt; SCTP */</span>
+00164 <span class="comment">/** @} */</span>
+00165 <span class="comment"></span>
+00166 <span class="comment">/**</span>
+00167 <span class="comment"> * Enum to tell us if we're interested in remote or local socket</span>
+00168 <span class="comment"> */</span>
+<a name="l00169"></a><a class="code" href="group__apr__network__io.html#ga50">00169</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+00170     APR_LOCAL,
+00171     APR_REMOTE
+00172 } <a class="code" href="group__apr__network__io.html#ga50">apr_interface_e</a>;
+00173 <span class="comment"></span>
+00174 <span class="comment">/**</span>
+00175 <span class="comment"> * The specific declaration of inet_addr's ... some platforms fall back</span>
+00176 <span class="comment"> * inet_network (this is not good, but necessary)</span>
+00177 <span class="comment"> */</span>
+00178 
+00179 <span class="preprocessor">#if APR_HAVE_INET_ADDR</span>
+00180 <span class="preprocessor"></span><span class="preprocessor">#define apr_inet_addr    inet_addr</span>
+00181 <span class="preprocessor"></span><span class="preprocessor">#elif APR_HAVE_INET_NETWORK        </span><span class="comment">/* only DGUX, as far as I know */</span>
+00182 <span class="comment">/**</span>
+00183 <span class="comment"> * @warning</span>
+00184 <span class="comment"> * not generally safe... inet_network() and inet_addr() perform</span>
+00185 <span class="comment"> * different functions */</span>
+00186 <span class="preprocessor">#define apr_inet_addr    inet_network</span>
+00187 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00188 <span class="preprocessor"></span><span class="comment"></span>
+00189 <span class="comment">/** A structure to represent sockets */</span>
+<a name="l00190"></a><a class="code" href="group__apr__network__io.html#ga0">00190</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga0">apr_socket_t</a>     <a class="code" href="group__apr__network__io.html#ga0">apr_socket_t</a>;<span class="comment"></span>
+00191 <span class="comment">/**</span>
+00192 <span class="comment"> * A structure to encapsulate headers and trailers for apr_socket_sendfile</span>
+00193 <span class="comment"> */</span>
+<a name="l00194"></a><a class="code" href="group__apr__network__io.html#ga1">00194</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__hdtr__t.html">apr_hdtr_t</a>       <a class="code" href="group__apr__network__io.html#ga1">apr_hdtr_t</a>;<span class="comment"></span>
+00195 <span class="comment">/** A structure to represent in_addr */</span>
+<a name="l00196"></a><a class="code" href="group__apr__network__io.html#ga2">00196</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structin__addr.html">in_addr</a>          <a class="code" href="group__apr__network__io.html#ga2">apr_in_addr_t</a>;<span class="comment"></span>
+00197 <span class="comment">/** A structure to represent an IP subnet */</span>
+<a name="l00198"></a><a class="code" href="group__apr__network__io.html#ga3">00198</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga3">apr_ipsubnet_t</a> <a class="code" href="group__apr__network__io.html#ga3">apr_ipsubnet_t</a>;
+00199 <span class="comment"></span>
+00200 <span class="comment">/** @remark use apr_uint16_t just in case some system has a short that isn't 16 bits... */</span>
+<a name="l00201"></a><a class="code" href="group__apr__network__io.html#ga4">00201</a> <span class="keyword">typedef</span> apr_uint16_t            <a class="code" href="group__apr__network__io.html#ga4">apr_port_t</a>;
+00202 <span class="comment"></span>
+00203 <span class="comment">/** @remark It's defined here as I think it should all be platform safe...</span>
+00204 <span class="comment"> * @see apr_sockaddr_t</span>
+00205 <span class="comment"> */</span>
+<a name="l00206"></a><a class="code" href="group__apr__network__io.html#ga5">00206</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__sockaddr__t.html">apr_sockaddr_t</a> <a class="code" href="group__apr__network__io.html#ga5">apr_sockaddr_t</a>;<span class="comment"></span>
+00207 <span class="comment">/**</span>
+00208 <span class="comment"> * APRs socket address type, used to ensure protocol independence</span>
+00209 <span class="comment"> */</span>
+<a name="l00210"></a><a class="code" href="structapr__sockaddr__t.html">00210</a> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga5">apr_sockaddr_t</a> {<span class="comment"></span>
+00211 <span class="comment">    /** The pool to use... */</span>
+<a name="l00212"></a><a class="code" href="structapr__sockaddr__t.html#o0">00212</a>     <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *<a class="code" href="structapr__sockaddr__t.html#o0">pool</a>;<span class="comment"></span>
+00213 <span class="comment">    /** The hostname */</span>
+<a name="l00214"></a><a class="code" href="structapr__sockaddr__t.html#o1">00214</a>     <span class="keywordtype">char</span> *<a class="code" href="structapr__sockaddr__t.html#o1">hostname</a>;<span class="comment"></span>
+00215 <span class="comment">    /** Either a string of the port number or the service name for the port */</span>
+<a name="l00216"></a><a class="code" href="structapr__sockaddr__t.html#o2">00216</a>     <span class="keywordtype">char</span> *<a class="code" href="structapr__sockaddr__t.html#o2">servname</a>;<span class="comment"></span>
+00217 <span class="comment">    /** The numeric port */</span>
+<a name="l00218"></a><a class="code" href="structapr__sockaddr__t.html#o3">00218</a>     <a class="code" href="group__apr__network__io.html#ga4">apr_port_t</a> <a class="code" href="structapr__sockaddr__t.html#o3">port</a>;<span class="comment"></span>
+00219 <span class="comment">    /** The family */</span>
+<a name="l00220"></a><a class="code" href="structapr__sockaddr__t.html#o4">00220</a>     apr_int32_t <a class="code" href="structapr__sockaddr__t.html#o4">family</a>;<span class="comment"></span>
+00221 <span class="comment">    /** How big is the sockaddr we're using? */</span>
+<a name="l00222"></a><a class="code" href="structapr__sockaddr__t.html#o5">00222</a>     apr_socklen_t <a class="code" href="structapr__sockaddr__t.html#o5">salen</a>;<span class="comment"></span>
+00223 <span class="comment">    /** How big is the ip address structure we're using? */</span>
+<a name="l00224"></a><a class="code" href="structapr__sockaddr__t.html#o6">00224</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__sockaddr__t.html#o6">ipaddr_len</a>;<span class="comment"></span>
+00225 <span class="comment">    /** How big should the address buffer be?  16 for v4 or 46 for v6</span>
+00226 <span class="comment">     *  used in inet_ntop... */</span>
+<a name="l00227"></a><a class="code" href="structapr__sockaddr__t.html#o7">00227</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__sockaddr__t.html#o7">addr_str_len</a>;<span class="comment"></span>
+00228 <span class="comment">    /** This points to the IP address structure within the appropriate</span>
+00229 <span class="comment">     *  sockaddr structure.  */</span>
+<a name="l00230"></a><a class="code" href="structapr__sockaddr__t.html#o8">00230</a>     <span class="keywordtype">void</span> *<a class="code" href="structapr__sockaddr__t.html#o8">ipaddr_ptr</a>;<span class="comment"></span>
+00231 <span class="comment">    /** If multiple addresses were found by apr_sockaddr_info_get(), this </span>
+00232 <span class="comment">     *  points to a representation of the next address. */</span>
+<a name="l00233"></a><a class="code" href="structapr__sockaddr__t.html#o9">00233</a>     <a class="code" href="group__apr__network__io.html#ga5">apr_sockaddr_t</a> *<a class="code" href="structapr__sockaddr__t.html#o9">next</a>;<span class="comment"></span>
+00234 <span class="comment">    /** Union of either IPv4 or IPv6 sockaddr. */</span>
+00235     <span class="keyword">union </span>{<span class="comment"></span>
+00236 <span class="comment">        /** IPv4 sockaddr structure */</span>
+<a name="l00237"></a><a class="code" href="structapr__sockaddr__t.html#o10">00237</a>         <span class="keyword">struct </span>sockaddr_in sin;
+00238 <span class="preprocessor">#if APR_HAVE_IPV6</span>
+00239 <span class="preprocessor"></span><span class="comment">        /** IPv6 sockaddr structure */</span>
+00240         <span class="keyword">struct </span>sockaddr_in6 sin6;
 00241 <span class="preprocessor">#endif</span>
-00242 <span class="preprocessor"></span>    } sa;
-00243 };
-00244 
-00245 <span class="preprocessor">#if APR_HAS_SENDFILE</span>
-00246 <span class="preprocessor"></span><span class="comment">/** </span>
-00247 <span class="comment"> * Support reusing the socket on platforms which support it (from disconnect,</span>
-00248 <span class="comment"> * specifically Win32.</span>
-00249 <span class="comment"> * @remark Optional flag passed into apr_socket_sendfile() </span>
-00250 <span class="comment"> */</span>
-00251 <span class="preprocessor">#define APR_SENDFILE_DISCONNECT_SOCKET      1</span>
-00252 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-00253 <span class="preprocessor"></span><span class="comment"></span>
-00254 <span class="comment">/** A structure to encapsulate headers and trailers for apr_socket_sendfile */</span>
-<a name="l00255"></a><a class="code" href="structapr__hdtr__t.html">00255</a> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga1">apr_hdtr_t</a> {<span class="comment"></span>
-00256 <span class="comment">    /** An iovec to store the headers sent before the file. */</span>
-<a name="l00257"></a><a class="code" href="structapr__hdtr__t.html#o0">00257</a>     <span class="keyword">struct </span>iovec* <a class="code" href="structapr__hdtr__t.html#o0">headers</a>;<span class="comment"></span>
-00258 <span class="comment">    /** number of headers in the iovec */</span>
-<a name="l00259"></a><a class="code" href="structapr__hdtr__t.html#o1">00259</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__hdtr__t.html#o1">numheaders</a>;<span class="comment"></span>
-00260 <span class="comment">    /** An iovec to store the trailers sent after the file. */</span>
-<a name="l00261"></a><a class="code" href="structapr__hdtr__t.html#o2">00261</a>     <span class="keyword">struct </span>iovec* <a class="code" href="structapr__hdtr__t.html#o2">trailers</a>;<span class="comment"></span>
-00262 <span class="comment">    /** number of trailers in the iovec */</span>
-<a name="l00263"></a><a class="code" href="structapr__hdtr__t.html#o3">00263</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__hdtr__t.html#o3">numtrailers</a>;
-00264 };
-00265 
-00266 <span class="comment">/* function definitions */</span>
-00267 <span class="comment"></span>
-00268 <span class="comment">/**</span>
-00269 <span class="comment"> * Create a socket.</span>
-00270 <span class="comment"> * @param new_sock The new socket that has been set up.</span>
-00271 <span class="comment"> * @param family The address family of the socket (e.g., APR_INET).</span>
-00272 <span class="comment"> * @param type The type of the socket (e.g., SOCK_STREAM).</span>
-00273 <span class="comment"> * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).</span>
-00274 <span class="comment"> * @param cont The pool to use</span>
-00275 <span class="comment"> */</span>
-00276 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_create(apr_socket_t **new_sock, 
-00277                                             <span class="keywordtype">int</span> family, <span class="keywordtype">int</span> type,
-00278                                             <span class="keywordtype">int</span> protocol,
-00279                                             <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *cont);
-00280 <span class="comment"></span>
-00281 <span class="comment">/**</span>
-00282 <span class="comment"> * Shutdown either reading, writing, or both sides of a socket.</span>
-00283 <span class="comment"> * @param thesocket The socket to close </span>
-00284 <span class="comment"> * @param how How to shutdown the socket.  One of:</span>
-00285 <span class="comment"> * &lt;PRE&gt;</span>
-00286 <span class="comment"> *            APR_SHUTDOWN_READ         no longer allow read requests</span>
-00287 <span class="comment"> *            APR_SHUTDOWN_WRITE        no longer allow write requests</span>
-00288 <span class="comment"> *            APR_SHUTDOWN_READWRITE    no longer allow read or write requests </span>
-00289 <span class="comment"> * &lt;/PRE&gt;</span>
-00290 <span class="comment"> * @see apr_shutdown_how_e</span>
-00291 <span class="comment"> * @remark This does not actually close the socket descriptor, it just</span>
-00292 <span class="comment"> *      controls which calls are still valid on the socket.</span>
-00293 <span class="comment"> */</span>
-00294 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_shutdown(apr_socket_t *thesocket,
-00295                                               apr_shutdown_how_e how);
-00296 <span class="comment"></span>
-00297 <span class="comment">/**</span>
-00298 <span class="comment"> * Close a socket.</span>
-00299 <span class="comment"> * @param thesocket The socket to close </span>
-00300 <span class="comment"> */</span>
-00301 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_close(apr_socket_t *thesocket);
-00302 <span class="comment"></span>
-00303 <span class="comment">/**</span>
-00304 <span class="comment"> * Bind the socket to its associated port</span>
-00305 <span class="comment"> * @param sock The socket to bind </span>
-00306 <span class="comment"> * @param sa The socket address to bind to</span>
-00307 <span class="comment"> * @remark This may be where we will find out if there is any other process</span>
-00308 <span class="comment"> *      using the selected port.</span>
-00309 <span class="comment"> */</span>
-00310 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_bind(apr_socket_t *sock, 
-00311                                           apr_sockaddr_t *sa);
-00312 <span class="comment"></span>
-00313 <span class="comment">/**</span>
-00314 <span class="comment"> * Listen to a bound socket for connections.</span>
-00315 <span class="comment"> * @param sock The socket to listen on </span>
-00316 <span class="comment"> * @param backlog The number of outstanding connections allowed in the sockets</span>
-00317 <span class="comment"> *                listen queue.  If this value is less than zero, the listen</span>
-00318 <span class="comment"> *                queue size is set to zero.  </span>
-00319 <span class="comment"> */</span>
-00320 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_listen(apr_socket_t *sock, 
-00321                                             apr_int32_t backlog);
-00322 <span class="comment"></span>
-00323 <span class="comment">/**</span>
-00324 <span class="comment"> * Accept a new connection request</span>
-00325 <span class="comment"> * @param new_sock A copy of the socket that is connected to the socket that</span>
-00326 <span class="comment"> *                 made the connection request.  This is the socket which should</span>
-00327 <span class="comment"> *                 be used for all future communication.</span>
-00328 <span class="comment"> * @param sock The socket we are listening on.</span>
-00329 <span class="comment"> * @param connection_pool The pool for the new socket.</span>
-00330 <span class="comment"> */</span>
-00331 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_accept(apr_socket_t **new_sock, 
-00332                                             apr_socket_t *sock,
-00333                                             <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *connection_pool);
-00334 <span class="comment"></span>
-00335 <span class="comment">/**</span>
-00336 <span class="comment"> * Issue a connection request to a socket either on the same machine </span>
-00337 <span class="comment"> * or a different one.</span>
-00338 <span class="comment"> * @param sock The socket we wish to use for our side of the connection </span>
-00339 <span class="comment"> * @param sa The address of the machine we wish to connect to.</span>
-00340 <span class="comment"> */</span>
-00341 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_connect(apr_socket_t *sock,
-00342                                              apr_sockaddr_t *sa);
-00343 <span class="comment"></span>
-00344 <span class="comment">/**</span>
-00345 <span class="comment"> * Create apr_sockaddr_t from hostname, address family, and port.</span>
-00346 <span class="comment"> * @param sa The new apr_sockaddr_t.</span>
-00347 <span class="comment"> * @param hostname The hostname or numeric address string to resolve/parse, or</span>
-00348 <span class="comment"> *               NULL to build an address that corresponds to 0.0.0.0 or ::</span>
-00349 <span class="comment"> * @param family The address family to use, or APR_UNSPEC if the system should </span>
-00350 <span class="comment"> *               decide.</span>
-00351 <span class="comment"> * @param port The port number.</span>
-00352 <span class="comment"> * @param flags Special processing flags:</span>
-00353 <span class="comment"> * &lt;PRE&gt;</span>
-00354 <span class="comment"> *       APR_IPV4_ADDR_OK          first query for IPv4 addresses; only look</span>
-00355 <span class="comment"> *                                 for IPv6 addresses if the first query failed;</span>
-00356 <span class="comment"> *                                 only valid if family is APR_UNSPEC and hostname</span>
-00357 <span class="comment"> *                                 isn't NULL; mutually exclusive with</span>
-00358 <span class="comment"> *                                 APR_IPV6_ADDR_OK</span>
-00359 <span class="comment"> *       APR_IPV6_ADDR_OK          first query for IPv6 addresses; only look</span>
-00360 <span class="comment"> *                                 for IPv4 addresses if the first query failed;</span>
+00242 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_SA_STORAGE</span>
+00243 <span class="preprocessor"></span><span class="comment">        /** Placeholder to ensure that the size of this union is not</span>
+00244 <span class="comment">         * dependent on whether APR_HAVE_IPV6 is defined. */</span>
+00245         <span class="keyword">struct </span>sockaddr_storage sas;
+00246 <span class="preprocessor">#endif</span>
+00247 <span class="preprocessor"></span>    } sa;
+00248 };
+00249 
+00250 <span class="preprocessor">#if APR_HAS_SENDFILE</span>
+00251 <span class="preprocessor"></span><span class="comment">/** </span>
+00252 <span class="comment"> * Support reusing the socket on platforms which support it (from disconnect,</span>
+00253 <span class="comment"> * specifically Win32.</span>
+00254 <span class="comment"> * @remark Optional flag passed into apr_socket_sendfile() </span>
+00255 <span class="comment"> */</span>
+00256 <span class="preprocessor">#define APR_SENDFILE_DISCONNECT_SOCKET      1</span>
+00257 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+00258 <span class="preprocessor"></span><span class="comment"></span>
+00259 <span class="comment">/** A structure to encapsulate headers and trailers for apr_socket_sendfile */</span>
+<a name="l00260"></a><a class="code" href="structapr__hdtr__t.html">00260</a> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#ga1">apr_hdtr_t</a> {<span class="comment"></span>
+00261 <span class="comment">    /** An iovec to store the headers sent before the file. */</span>
+<a name="l00262"></a><a class="code" href="structapr__hdtr__t.html#o0">00262</a>     <span class="keyword">struct </span>iovec* <a class="code" href="structapr__hdtr__t.html#o0">headers</a>;<span class="comment"></span>
+00263 <span class="comment">    /** number of headers in the iovec */</span>
+<a name="l00264"></a><a class="code" href="structapr__hdtr__t.html#o1">00264</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__hdtr__t.html#o1">numheaders</a>;<span class="comment"></span>
+00265 <span class="comment">    /** An iovec to store the trailers sent after the file. */</span>
+<a name="l00266"></a><a class="code" href="structapr__hdtr__t.html#o2">00266</a>     <span class="keyword">struct </span>iovec* <a class="code" href="structapr__hdtr__t.html#o2">trailers</a>;<span class="comment"></span>
+00267 <span class="comment">    /** number of trailers in the iovec */</span>
+<a name="l00268"></a><a class="code" href="structapr__hdtr__t.html#o3">00268</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__hdtr__t.html#o3">numtrailers</a>;
+00269 };
+00270 
+00271 <span class="comment">/* function definitions */</span>
+00272 <span class="comment"></span>
+00273 <span class="comment">/**</span>
+00274 <span class="comment"> * Create a socket.</span>
+00275 <span class="comment"> * @param new_sock The new socket that has been set up.</span>
+00276 <span class="comment"> * @param family The address family of the socket (e.g., APR_INET).</span>
+00277 <span class="comment"> * @param type The type of the socket (e.g., SOCK_STREAM).</span>
+00278 <span class="comment"> * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).</span>
+00279 <span class="comment"> * @param cont The pool to use</span>
+00280 <span class="comment"> */</span>
+00281 APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new_sock, 
+00282                                             <span class="keywordtype">int</span> family, <span class="keywordtype">int</span> type,
+00283                                             <span class="keywordtype">int</span> protocol,
+00284                                             apr_pool_t *cont);
+00285 <span class="comment"></span>
+00286 <span class="comment">/**</span>
+00287 <span class="comment"> * Shutdown either reading, writing, or both sides of a socket.</span>
+00288 <span class="comment"> * @param thesocket The socket to close </span>
+00289 <span class="comment"> * @param how How to shutdown the socket.  One of:</span>
+00290 <span class="comment"> * &lt;PRE&gt;</span>
+00291 <span class="comment"> *            APR_SHUTDOWN_READ         no longer allow read requests</span>
+00292 <span class="comment"> *            APR_SHUTDOWN_WRITE        no longer allow write requests</span>
+00293 <span class="comment"> *            APR_SHUTDOWN_READWRITE    no longer allow read or write requests </span>
+00294 <span class="comment"> * &lt;/PRE&gt;</span>
+00295 <span class="comment"> * @see apr_shutdown_how_e</span>
+00296 <span class="comment"> * @remark This does not actually close the socket descriptor, it just</span>
+00297 <span class="comment"> *      controls which calls are still valid on the socket.</span>
+00298 <span class="comment"> */</span>
+00299 APR_DECLARE(apr_status_t) apr_socket_shutdown(apr_socket_t *thesocket,
+00300                                               apr_shutdown_how_e how);
+00301 <span class="comment"></span>
+00302 <span class="comment">/**</span>
+00303 <span class="comment"> * Close a socket.</span>
+00304 <span class="comment"> * @param thesocket The socket to close </span>
+00305 <span class="comment"> */</span>
+00306 APR_DECLARE(apr_status_t) apr_socket_close(apr_socket_t *thesocket);
+00307 <span class="comment"></span>
+00308 <span class="comment">/**</span>
+00309 <span class="comment"> * Bind the socket to its associated port</span>
+00310 <span class="comment"> * @param sock The socket to bind </span>
+00311 <span class="comment"> * @param sa The socket address to bind to</span>
+00312 <span class="comment"> * @remark This may be where we will find out if there is any other process</span>
+00313 <span class="comment"> *      using the selected port.</span>
+00314 <span class="comment"> */</span>
+00315 APR_DECLARE(apr_status_t) apr_socket_bind(apr_socket_t *sock, 
+00316                                           apr_sockaddr_t *sa);
+00317 <span class="comment"></span>
+00318 <span class="comment">/**</span>
+00319 <span class="comment"> * Listen to a bound socket for connections.</span>
+00320 <span class="comment"> * @param sock The socket to listen on </span>
+00321 <span class="comment"> * @param backlog The number of outstanding connections allowed in the sockets</span>
+00322 <span class="comment"> *                listen queue.  If this value is less than zero, the listen</span>
+00323 <span class="comment"> *                queue size is set to zero.  </span>
+00324 <span class="comment"> */</span>
+00325 APR_DECLARE(apr_status_t) apr_socket_listen(apr_socket_t *sock, 
+00326                                             apr_int32_t backlog);
+00327 <span class="comment"></span>
+00328 <span class="comment">/**</span>
+00329 <span class="comment"> * Accept a new connection request</span>
+00330 <span class="comment"> * @param new_sock A copy of the socket that is connected to the socket that</span>
+00331 <span class="comment"> *                 made the connection request.  This is the socket which should</span>
+00332 <span class="comment"> *                 be used for all future communication.</span>
+00333 <span class="comment"> * @param sock The socket we are listening on.</span>
+00334 <span class="comment"> * @param connection_pool The pool for the new socket.</span>
+00335 <span class="comment"> */</span>
+00336 APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new_sock, 
+00337                                             apr_socket_t *sock,
+00338                                             apr_pool_t *connection_pool);
+00339 <span class="comment"></span>
+00340 <span class="comment">/**</span>
+00341 <span class="comment"> * Issue a connection request to a socket either on the same machine </span>
+00342 <span class="comment"> * or a different one.</span>
+00343 <span class="comment"> * @param sock The socket we wish to use for our side of the connection </span>
+00344 <span class="comment"> * @param sa The address of the machine we wish to connect to.</span>
+00345 <span class="comment"> */</span>
+00346 APR_DECLARE(apr_status_t) apr_socket_connect(apr_socket_t *sock,
+00347                                              apr_sockaddr_t *sa);
+00348 <span class="comment"></span>
+00349 <span class="comment">/**</span>
+00350 <span class="comment"> * Create apr_sockaddr_t from hostname, address family, and port.</span>
+00351 <span class="comment"> * @param sa The new apr_sockaddr_t.</span>
+00352 <span class="comment"> * @param hostname The hostname or numeric address string to resolve/parse, or</span>
+00353 <span class="comment"> *               NULL to build an address that corresponds to 0.0.0.0 or ::</span>
+00354 <span class="comment"> * @param family The address family to use, or APR_UNSPEC if the system should </span>
+00355 <span class="comment"> *               decide.</span>
+00356 <span class="comment"> * @param port The port number.</span>
+00357 <span class="comment"> * @param flags Special processing flags:</span>
+00358 <span class="comment"> * &lt;PRE&gt;</span>
+00359 <span class="comment"> *       APR_IPV4_ADDR_OK          first query for IPv4 addresses; only look</span>
+00360 <span class="comment"> *                                 for IPv6 addresses if the first query failed;</span>
 00361 <span class="comment"> *                                 only valid if family is APR_UNSPEC and hostname</span>
-00362 <span class="comment"> *                                 isn't NULL and APR_HAVE_IPV6; mutually exclusive</span>
-00363 <span class="comment"> *                                 with APR_IPV4_ADDR_OK</span>
-00364 <span class="comment"> * &lt;/PRE&gt;</span>
-00365 <span class="comment"> * @param p The pool for the apr_sockaddr_t and associated storage.</span>
-00366 <span class="comment"> */</span>
-00367 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_sockaddr_info_get(apr_sockaddr_t **sa,
-00368                                           const <span class="keywordtype">char</span> *hostname,
-00369                                           apr_int32_t family,
-00370                                           apr_port_t port,
-00371                                           apr_int32_t flags,
-00372                                           <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p);
-00373 <span class="comment"></span>
-00374 <span class="comment">/**</span>
-00375 <span class="comment"> * Look up the host name from an apr_sockaddr_t.</span>
-00376 <span class="comment"> * @param hostname The hostname.</span>
-00377 <span class="comment"> * @param sa The apr_sockaddr_t.</span>
-00378 <span class="comment"> * @param flags Special processing flags.</span>
-00379 <span class="comment"> */</span>
-00380 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_getnameinfo(<span class="keywordtype">char</span> **hostname,
-00381                                           apr_sockaddr_t *sa,
-00382                                           apr_int32_t flags);
-00383 <span class="comment"></span>
-00384 <span class="comment">/**</span>
-00385 <span class="comment"> * Parse hostname/IP address with scope id and port.</span>
-00386 <span class="comment"> *</span>
-00387 <span class="comment"> * Any of the following strings are accepted:</span>
-00388 <span class="comment"> *   8080                  (just the port number)</span>
-00389 <span class="comment"> *   www.apache.org        (just the hostname)</span>
-00390 <span class="comment"> *   www.apache.org:8080   (hostname and port number)</span>
-00391 <span class="comment"> *   [fe80::1]:80          (IPv6 numeric address string only)</span>
-00392 <span class="comment"> *   [fe80::1%eth0]        (IPv6 numeric address string and scope id)</span>
-00393 <span class="comment"> *</span>
-00394 <span class="comment"> * Invalid strings:</span>
-00395 <span class="comment"> *                         (empty string)</span>
-00396 <span class="comment"> *   [abc]                 (not valid IPv6 numeric address string)</span>
-00397 <span class="comment"> *   abc:65536             (invalid port number)</span>
+00362 <span class="comment"> *                                 isn't NULL; mutually exclusive with</span>
+00363 <span class="comment"> *                                 APR_IPV6_ADDR_OK</span>
+00364 <span class="comment"> *       APR_IPV6_ADDR_OK          first query for IPv6 addresses; only look</span>
+00365 <span class="comment"> *                                 for IPv4 addresses if the first query failed;</span>
+00366 <span class="comment"> *                                 only valid if family is APR_UNSPEC and hostname</span>
+00367 <span class="comment"> *                                 isn't NULL and APR_HAVE_IPV6; mutually exclusive</span>
+00368 <span class="comment"> *                                 with APR_IPV4_ADDR_OK</span>
+00369 <span class="comment"> * &lt;/PRE&gt;</span>
+00370 <span class="comment"> * @param p The pool for the apr_sockaddr_t and associated storage.</span>
+00371 <span class="comment"> */</span>
+00372 APR_DECLARE(apr_status_t) apr_sockaddr_info_get(apr_sockaddr_t **sa,
+00373                                           const <span class="keywordtype">char</span> *hostname,
+00374                                           apr_int32_t family,
+00375                                           apr_port_t port,
+00376                                           apr_int32_t flags,
+00377                                           apr_pool_t *p);
+00378 <span class="comment"></span>
+00379 <span class="comment">/**</span>
+00380 <span class="comment"> * Look up the host name from an apr_sockaddr_t.</span>
+00381 <span class="comment"> * @param hostname The hostname.</span>
+00382 <span class="comment"> * @param sa The apr_sockaddr_t.</span>
+00383 <span class="comment"> * @param flags Special processing flags.</span>
+00384 <span class="comment"> */</span>
+00385 APR_DECLARE(apr_status_t) apr_getnameinfo(<span class="keywordtype">char</span> **hostname,
+00386                                           apr_sockaddr_t *sa,
+00387                                           apr_int32_t flags);
+00388 <span class="comment"></span>
+00389 <span class="comment">/**</span>
+00390 <span class="comment"> * Parse hostname/IP address with scope id and port.</span>
+00391 <span class="comment"> *</span>
+00392 <span class="comment"> * Any of the following strings are accepted:</span>
+00393 <span class="comment"> *   8080                  (just the port number)</span>
+00394 <span class="comment"> *   www.apache.org        (just the hostname)</span>
+00395 <span class="comment"> *   www.apache.org:8080   (hostname and port number)</span>
+00396 <span class="comment"> *   [fe80::1]:80          (IPv6 numeric address string only)</span>
+00397 <span class="comment"> *   [fe80::1%eth0]        (IPv6 numeric address string and scope id)</span>
 00398 <span class="comment"> *</span>
-00399 <span class="comment"> * @param addr The new buffer containing just the hostname.  On output, *addr </span>
-00400 <span class="comment"> *             will be NULL if no hostname/IP address was specfied.</span>
-00401 <span class="comment"> * @param scope_id The new buffer containing just the scope id.  On output, </span>
-00402 <span class="comment"> *                 *scope_id will be NULL if no scope id was specified.</span>
-00403 <span class="comment"> * @param port The port number.  On output, *port will be 0 if no port was </span>
-00404 <span class="comment"> *             specified.</span>
-00405 <span class="comment"> *             ### FIXME: 0 is a legal port (per RFC 1700). this should</span>
-00406 <span class="comment"> *             ### return something besides zero if the port is missing.</span>
-00407 <span class="comment"> * @param str The input string to be parsed.</span>
-00408 <span class="comment"> * @param p The pool from which *addr and *scope_id are allocated.</span>
-00409 <span class="comment"> * @remark If scope id shouldn't be allowed, check for scope_id != NULL in </span>
-00410 <span class="comment"> *         addition to checking the return code.  If addr/hostname should be </span>
-00411 <span class="comment"> *         required, check for addr == NULL in addition to checking the </span>
-00412 <span class="comment"> *         return code.</span>
-00413 <span class="comment"> */</span>
-00414 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_parse_addr_port(<span class="keywordtype">char</span> **addr,
-00415                                               <span class="keywordtype">char</span> **scope_id,
-00416                                               apr_port_t *port,
-00417                                               const <span class="keywordtype">char</span> *str,
-00418                                               <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *p);
-00419 <span class="comment"></span>
-00420 <span class="comment">/**</span>
-00421 <span class="comment"> * Get name of the current machine</span>
-00422 <span class="comment"> * @param buf A buffer to store the hostname in.</span>
-00423 <span class="comment"> * @param len The maximum length of the hostname that can be stored in the</span>
-00424 <span class="comment"> *            buffer provided.  The suggested length is APRMAXHOSTLEN + 1.</span>
-00425 <span class="comment"> * @param cont The pool to use.</span>
-00426 <span class="comment"> * @remark If the buffer was not large enough, an error will be returned.</span>
-00427 <span class="comment"> */</span>
-00428 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_gethostname(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *cont);
-00429 <span class="comment"></span>
-00430 <span class="comment">/**</span>
-00431 <span class="comment"> * Return the data associated with the current socket</span>
-00432 <span class="comment"> * @param data The user data associated with the socket.</span>
-00433 <span class="comment"> * @param key The key to associate with the user data.</span>
-00434 <span class="comment"> * @param sock The currently open socket.</span>
-00435 <span class="comment"> */</span>
-00436 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_data_get(<span class="keywordtype">void</span> **data, const <span class="keywordtype">char</span> *key,
-00437                                               apr_socket_t *sock);
-00438 <span class="comment"></span>
-00439 <span class="comment">/**</span>
-00440 <span class="comment"> * Set the data associated with the current socket.</span>
-00441 <span class="comment"> * @param sock The currently open socket.</span>
-00442 <span class="comment"> * @param data The user data to associate with the socket.</span>
-00443 <span class="comment"> * @param key The key to associate with the data.</span>
-00444 <span class="comment"> * @param cleanup The cleanup to call when the socket is destroyed.</span>
-00445 <span class="comment"> */</span>
-00446 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_data_set(apr_socket_t *sock, <span class="keywordtype">void</span> *data,
-00447                                               const <span class="keywordtype">char</span> *key,
-00448                                               <a class="code" href="group__apr__errno.html#ga0">apr_status_t</a> (*cleanup)(<span class="keywordtype">void</span>*));
-00449 <span class="comment"></span>
-00450 <span class="comment">/**</span>
-00451 <span class="comment"> * Send data over a network.</span>
-00452 <span class="comment"> * @param sock The socket to send the data over.</span>
-00453 <span class="comment"> * @param buf The buffer which contains the data to be sent. </span>
-00454 <span class="comment"> * @param len On entry, the number of bytes to send; on exit, the number</span>
-00455 <span class="comment"> *            of bytes sent.</span>
-00456 <span class="comment"> * @remark</span>
-00457 <span class="comment"> * &lt;PRE&gt;</span>
-00458 <span class="comment"> * This functions acts like a blocking write by default.  To change </span>
-00459 <span class="comment"> * this behavior, use apr_socket_timeout_set().</span>
-00460 <span class="comment"> *</span>
-00461 <span class="comment"> * It is possible for both bytes to be sent and an error to be returned.</span>
-00462 <span class="comment"> *</span>
-00463 <span class="comment"> * APR_EINTR is never returned.</span>
-00464 <span class="comment"> * &lt;/PRE&gt;</span>
-00465 <span class="comment"> */</span>
-00466 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_send(apr_socket_t *sock, const <span class="keywordtype">char</span> *buf, 
-00467                                           apr_size_t *len);
-00468 <span class="comment"></span>
-00469 <span class="comment">/**</span>
-00470 <span class="comment"> * Send multiple packets of data over a network.</span>
-00471 <span class="comment"> * @param sock The socket to send the data over.</span>
-00472 <span class="comment"> * @param vec The array of iovec structs containing the data to send </span>
-00473 <span class="comment"> * @param nvec The number of iovec structs in the array</span>
-00474 <span class="comment"> * @param len Receives the number of bytes actually written</span>
-00475 <span class="comment"> * @remark</span>
-00476 <span class="comment"> * &lt;PRE&gt;</span>
-00477 <span class="comment"> * This functions acts like a blocking write by default.  To change </span>
-00478 <span class="comment"> * this behavior, use apr_socket_timeout_set().</span>
-00479 <span class="comment"> * The number of bytes actually sent is stored in argument 3.</span>
-00480 <span class="comment"> *</span>
-00481 <span class="comment"> * It is possible for both bytes to be sent and an error to be returned.</span>
-00482 <span class="comment"> *</span>
-00483 <span class="comment"> * APR_EINTR is never returned.</span>
-00484 <span class="comment"> * &lt;/PRE&gt;</span>
-00485 <span class="comment"> */</span>
-00486 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_sendv(apr_socket_t *sock, 
-00487                                            const struct iovec *vec,
-00488                                            apr_int32_t nvec, apr_size_t *len);
-00489 <span class="comment"></span>
-00490 <span class="comment">/**</span>
-00491 <span class="comment"> * @param sock The socket to send from</span>
-00492 <span class="comment"> * @param where The apr_sockaddr_t describing where to send the data</span>
-00493 <span class="comment"> * @param flags The flags to use</span>
-00494 <span class="comment"> * @param buf  The data to send</span>
-00495 <span class="comment"> * @param len  The length of the data to send</span>
-00496 <span class="comment"> */</span>
-00497 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_sendto(apr_socket_t *sock, 
-00498                                             apr_sockaddr_t *where,
-00499                                             apr_int32_t flags, const <span class="keywordtype">char</span> *buf, 
-00500                                             apr_size_t *len);
-00501 <span class="comment"></span>
-00502 <span class="comment">/**</span>
-00503 <span class="comment"> * @param from The apr_sockaddr_t to fill in the recipient info</span>
-00504 <span class="comment"> * @param sock The socket to use</span>
-00505 <span class="comment"> * @param flags The flags to use</span>
-00506 <span class="comment"> * @param buf  The buffer to use</span>
-00507 <span class="comment"> * @param len  The length of the available buffer</span>
-00508 <span class="comment"> */</span>
-00509 
-00510 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_recvfrom(apr_sockaddr_t *from, 
-00511                                               apr_socket_t *sock,
-00512                                               apr_int32_t flags, <span class="keywordtype">char</span> *buf, 
-00513                                               apr_size_t *len);
-00514  
-00515 #if APR_HAS_SENDFILE || defined(DOXYGEN)
-00516 <span class="comment"></span>
-00517 <span class="comment">/**</span>
-00518 <span class="comment"> * Send a file from an open file descriptor to a socket, along with </span>
-00519 <span class="comment"> * optional headers and trailers</span>
-00520 <span class="comment"> * @param sock The socket to which we're writing</span>
-00521 <span class="comment"> * @param file The open file from which to read</span>
-00522 <span class="comment"> * @param hdtr A structure containing the headers and trailers to send</span>
-00523 <span class="comment"> * @param offset Offset into the file where we should begin writing</span>
-00524 <span class="comment"> * @param len (input)  - Number of bytes to send from the file </span>
-00525 <span class="comment"> *            (output) - Number of bytes actually sent, </span>
-00526 <span class="comment"> *                       including headers, file, and trailers</span>
-00527 <span class="comment"> * @param flags APR flags that are mapped to OS specific flags</span>
-00528 <span class="comment"> * @remark This functions acts like a blocking write by default.  To change </span>
-00529 <span class="comment"> *         this behavior, use apr_socket_timeout_set().</span>
-00530 <span class="comment"> *         The number of bytes actually sent is stored in argument 5.</span>
-00531 <span class="comment"> */</span>
-00532 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_sendfile(apr_socket_t *sock, 
-00533                                               <a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a> *file,
-00534                                               apr_hdtr_t *hdtr,
-00535                                               apr_off_t *offset,
-00536                                               apr_size_t *len,
-00537                                               apr_int32_t flags);
-00538 
-00539 #endif <span class="comment">/* APR_HAS_SENDFILE */</span>
-00540 <span class="comment"></span>
-00541 <span class="comment">/**</span>
-00542 <span class="comment"> * Read data from a network.</span>
-00543 <span class="comment"> * @param sock The socket to read the data from.</span>
-00544 <span class="comment"> * @param buf The buffer to store the data in. </span>
-00545 <span class="comment"> * @param len On entry, the number of bytes to receive; on exit, the number</span>
-00546 <span class="comment"> *            of bytes received.</span>
-00547 <span class="comment"> * @remark</span>
-00548 <span class="comment"> * &lt;PRE&gt;</span>
-00549 <span class="comment"> * This functions acts like a blocking read by default.  To change </span>
-00550 <span class="comment"> * this behavior, use apr_socket_timeout_set().</span>
-00551 <span class="comment"> * The number of bytes actually sent is stored in argument 3.</span>
-00552 <span class="comment"> *</span>
-00553 <span class="comment"> * It is possible for both bytes to be received and an APR_EOF or</span>
-00554 <span class="comment"> * other error to be returned.</span>
-00555 <span class="comment"> *</span>
-00556 <span class="comment"> * APR_EINTR is never returned.</span>
-00557 <span class="comment"> * &lt;/PRE&gt;</span>
-00558 <span class="comment"> */</span>
-00559 APR_DECLARE(<a class="code" href="group__apr__errno.html#ga0">apr_status_t</a>) apr_socket_recv(apr_socket_t *sock, 
-00560                                    <span class="keywordtype">char</span> *buf, apr_size_t *len);
-00561 <span class="comment"></span>
-00562 <span class="comment">/**</span>
-00563 <span class="comment"> * Setup socket options for the specified socket</span>
-00564 <span class="comment"> * @param sock The socket to set up.</span>
-00565 <span class="comment"> * @param opt The option we would like to configure.  One of:</span>
-00566 <span class="comment"> * &lt;PRE&gt;</span>
-00567 <span class="comment"> *            APR_SO_DEBUG      --  turn on debugging information </span>
-00568 <span class="comment"> *            APR_SO_KEEPALIVE  --  keep connections active</span>
-00569 <span class="comment"> *            APR_SO_LINGER     --  lingers on close if data is present</span>
-00570 <span class="comment"> *            APR_SO_NONBLOCK   --  Turns blocking on/off for socket</span>
-00571 <span class="comment"> *            APR_SO_REUSEADDR  --  The rules used in validating addresses</span>
-00572 <span class="comment"> *                                  supplied to bind should allow reuse</span>

[... 600 lines stripped ...]