Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > bdbf07027827e6ad7d9208f8a9eaea97 > files > 40

apr-docs-1.2.7-11.el5_6.5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: apr_network_io.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>apr_network_io.h</h1><a href="apr__network__io_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span>
<a name="l00002"></a>00002 <span class="comment"> * applicable.</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
<a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
<a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"> */</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef APR_NETWORK_IO_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_NETWORK_IO_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00020"></a>00020 <span class="comment"> * @file apr_network_io.h</span>
<a name="l00021"></a>00021 <span class="comment"> * @brief APR Network library</span>
<a name="l00022"></a>00022 <span class="comment"> */</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="apr_8h.html">apr.h</a>"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="apr__file__io_8h.html">apr_file_io.h</a>"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span> 
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#if APR_HAVE_NETINET_IN_H</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;netinet/in.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#endif</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00036"></a>00036 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00037"></a>00037 <span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">/**</span>
<a name="l00039"></a>00039 <span class="comment"> * @defgroup apr_network_io Network Routines</span>
<a name="l00040"></a>00040 <span class="comment"> * @ingroup APR </span>
<a name="l00041"></a>00041 <span class="comment"> * @{</span>
<a name="l00042"></a>00042 <span class="comment"> */</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="preprocessor">#ifndef APR_MAX_SECS_TO_LINGER</span>
<a name="l00045"></a>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#g42d0a5ab421ae7f92f8cdab2f2f552fb">00046</a> <span class="preprocessor">#define APR_MAX_SECS_TO_LINGER 30</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="preprocessor">#ifndef APRMAXHOSTLEN</span>
<a name="l00050"></a>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#g1f71a4c5dbc7201f041d7f6ac79f89e6">00051</a> <span class="preprocessor">#define APRMAXHOSTLEN 256</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054 <span class="preprocessor">#ifndef APR_ANYADDR</span>
<a name="l00055"></a>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#g5b403a4ea11b16b88ef81099ec0ce9b2">00056</a> <span class="preprocessor">#define APR_ANYADDR "0.0.0.0"</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">/**</span>
<a name="l00060"></a>00060 <span class="comment"> * @defgroup apr_sockopt Socket option definitions</span>
<a name="l00061"></a>00061 <span class="comment"> * @{</span>
<a name="l00062"></a>00062 <span class="comment"> */</span>
<a name="l00063"></a><a class="code" href="group__apr__sockopt.html#gaebce2c04e59410c080534b91c8bae39">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#g38d51a7562e2202d04265b56f3dbef3d">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#gfe40b49a46e2a36bb1dca5142971a19d">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#gcf5ded8af4edf4798f042627198ead2e">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#g9e46a476abea9d4a055cb8830ff56ffd">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#g02acde647c7fc5c71e36c871c6b6230b">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#gd4064e971e72ebe5a981628ff127db1a">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#g90a4e0a5fa34db537cb505fd8fccbd04">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#g61c09299cb385d299de6d54acad84ec2">00071</a> <span class="preprocessor">#define APR_TCP_NODELAY      512  </span><span class="comment">/**&lt; For SCTP sockets, this is mapped</span>
<a name="l00072"></a>00072 <span class="comment">                                   * to STCP_NODELAY internally.</span>
<a name="l00073"></a>00073 <span class="comment">                                   */</span>
<a name="l00074"></a><a class="code" href="group__apr__sockopt.html#gaa252ad69d4f6593bd6dcb3c4513d77e">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#g73d73b5278777f328092168df4f72611">00075</a> <span class="preprocessor">#define APR_RESET_NODELAY    2048 </span><span class="comment">/**&lt; This flag is ONLY set internally</span>
<a name="l00076"></a>00076 <span class="comment">                                   * when we set APR_TCP_NOPUSH with</span>
<a name="l00077"></a>00077 <span class="comment">                                   * APR_TCP_NODELAY set to tell us that</span>
<a name="l00078"></a>00078 <span class="comment">                                   * APR_TCP_NODELAY should be turned on</span>
<a name="l00079"></a>00079 <span class="comment">                                   * again when NOPUSH is turned off</span>
<a name="l00080"></a>00080 <span class="comment">                                   */</span>
<a name="l00081"></a><a class="code" href="group__apr__sockopt.html#ga983dfa4be221c5c4a08443ae80c4cc6">00081</a> <span class="preprocessor">#define APR_INCOMPLETE_READ 4096  </span><span class="comment">/**&lt; Set on non-blocking sockets</span>
<a name="l00082"></a>00082 <span class="comment">                                   * (timeout != 0) on which the</span>
<a name="l00083"></a>00083 <span class="comment">                                   * previous read() did not fill a buffer</span>
<a name="l00084"></a>00084 <span class="comment">                                   * completely.  the next apr_socket_recv() </span>
<a name="l00085"></a>00085 <span class="comment">                                   * will first call select()/poll() rather than</span>
<a name="l00086"></a>00086 <span class="comment">                                   * going straight into read().  (Can also</span>
<a name="l00087"></a>00087 <span class="comment">                                   * be set by an application to force a</span>
<a name="l00088"></a>00088 <span class="comment">                                   * select()/poll() call before the next</span>
<a name="l00089"></a>00089 <span class="comment">                                   * read, in cases where the app expects</span>
<a name="l00090"></a>00090 <span class="comment">                                   * that an immediate read would fail.)</span>
<a name="l00091"></a>00091 <span class="comment">                                   */</span>
<a name="l00092"></a><a class="code" href="group__apr__sockopt.html#g808b82b936d356bc5d895d8a52bad561">00092</a> <span class="preprocessor">#define APR_INCOMPLETE_WRITE 8192 </span><span class="comment">/**&lt; like APR_INCOMPLETE_READ, but for write</span>
<a name="l00093"></a>00093 <span class="comment">                                   * @see APR_INCOMPLETE_READ</span>
<a name="l00094"></a>00094 <span class="comment">                                   */</span>
<a name="l00095"></a><a class="code" href="group__apr__sockopt.html#g42455ada513f8a3208c5865b264eb7db">00095</a> <span class="preprocessor">#define APR_IPV6_V6ONLY     16384 </span><span class="comment">/**&lt; Don't accept IPv4 connections on an</span>
<a name="l00096"></a>00096 <span class="comment">                                   * IPv6 listening socket.</span>
<a name="l00097"></a>00097 <span class="comment">                                   */</span>
<a name="l00098"></a><a class="code" href="group__apr__sockopt.html#ged29c86c58f201a66281287729d92891">00098</a> <span class="preprocessor">#define APR_TCP_DEFER_ACCEPT 32768 </span><span class="comment">/**&lt; Delay accepting of new connections </span>
<a name="l00099"></a>00099 <span class="comment">                                    * until data is available.</span>
<a name="l00100"></a>00100 <span class="comment">                                    * @see apr_socket_accept_filter</span>
<a name="l00101"></a>00101 <span class="comment">                                    */</span>
<a name="l00102"></a>00102 <span class="comment"></span>
<a name="l00103"></a>00103 <span class="comment">/** @} */</span>
<a name="l00104"></a>00104 <span class="comment"></span>
<a name="l00105"></a>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#g8a24b2cc219e3daa52ba4465f3525d71">00106</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00107"></a>00107     <a class="code" href="group__apr__network__io.html#gg8a24b2cc219e3daa52ba4465f3525d7134a218411ee808936d34053e10cffde9">APR_SHUTDOWN_READ</a>,          <span class="comment">/**&lt; no longer allow read request */</span>
<a name="l00108"></a>00108     <a class="code" href="group__apr__network__io.html#gg8a24b2cc219e3daa52ba4465f3525d71ff92a544e657833d5af9f80603e2c1ac">APR_SHUTDOWN_WRITE</a>,         <span class="comment">/**&lt; no longer allow write requests */</span>
<a name="l00109"></a><a class="code" href="group__apr__network__io.html#gg8a24b2cc219e3daa52ba4465f3525d71900746ebf9aa9a1e796f298a3e172a12">00109</a>     <a class="code" href="group__apr__network__io.html#gg8a24b2cc219e3daa52ba4465f3525d71900746ebf9aa9a1e796f298a3e172a12">APR_SHUTDOWN_READWRITE</a>      <span class="comment">/**&lt; no longer allow read or write requests */</span>
<a name="l00110"></a>00110 } <a class="code" href="group__apr__network__io.html#g8a24b2cc219e3daa52ba4465f3525d71">apr_shutdown_how_e</a>;
<a name="l00111"></a>00111 
<a name="l00112"></a><a class="code" href="group__apr__network__io.html#g406d199da5d037936a3438bc5fdeef43">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#gad8ea06ed84f58620a0f512c7c1c09af">00113</a> <span class="preprocessor">#define APR_IPV6_ADDR_OK  0x02  </span><span class="comment">/**&lt; @see apr_sockaddr_info_get() */</span>
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 <span class="preprocessor">#if (!APR_HAVE_IN_ADDR)</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00117"></a>00117 <span class="comment"> * We need to make sure we always have an in_addr type, so APR will just</span>
<a name="l00118"></a>00118 <span class="comment"> * define it ourselves, if the platform doesn't provide it.</span>
<a name="l00119"></a>00119 <span class="comment"> */</span>
<a name="l00120"></a>00120 <span class="keyword">struct </span>in_addr {
<a name="l00121"></a>00121     apr_uint32_t  s_addr; <span class="comment">/**&lt; storage to hold the IP# */</span>
<a name="l00122"></a>00122 };
<a name="l00123"></a>00123 <span class="preprocessor">#endif</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00125"></a>00125 <span class="comment">/** @def APR_INADDR_NONE</span>
<a name="l00126"></a>00126 <span class="comment"> * Not all platforms have a real INADDR_NONE.  This macro replaces</span>
<a name="l00127"></a>00127 <span class="comment"> * INADDR_NONE on all platforms.</span>
<a name="l00128"></a>00128 <span class="comment"> */</span>
<a name="l00129"></a>00129 <span class="preprocessor">#ifdef INADDR_NONE</span>
<a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#define APR_INADDR_NONE INADDR_NONE</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00132"></a><a class="code" href="group__apr__network__io.html#g4bd1c72aafb2160edc2d0ab8d5de8a37">00132</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_INADDR_NONE ((unsigned int) 0xffffffff)</span>
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00135"></a>00135 <span class="comment">/**</span>
<a name="l00136"></a>00136 <span class="comment"> * @def APR_INET</span>
<a name="l00137"></a>00137 <span class="comment"> * Not all platforms have these defined, so we'll define them here</span>
<a name="l00138"></a>00138 <span class="comment"> * The default values come from FreeBSD 4.1.1</span>
<a name="l00139"></a>00139 <span class="comment"> */</span>
<a name="l00140"></a><a class="code" href="group__apr__network__io.html#gdcc6fe9fed9f0093ad14cc154ea34647">00140</a> <span class="preprocessor">#define APR_INET     AF_INET</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="comment">/** @def APR_UNSPEC</span>
<a name="l00142"></a>00142 <span class="comment"> * Let the system decide which address family to use</span>
<a name="l00143"></a>00143 <span class="comment"> */</span>
<a name="l00144"></a>00144 <span class="preprocessor">#ifdef AF_UNSPEC</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define APR_UNSPEC   AF_UNSPEC</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00147"></a><a class="code" href="group__apr__network__io.html#g97738d1abced27103b4a43e9bbe361c3">00147</a> <span class="preprocessor"></span><span class="preprocessor">#define APR_UNSPEC   0</span>
<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_IPV6</span>
<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="comment">/** @def APR_INET6</span>
<a name="l00151"></a>00151 <span class="comment">* IPv6 Address Family. Not all platforms may have this defined.</span>
<a name="l00152"></a>00152 <span class="comment">*/</span>
<a name="l00153"></a>00153 
<a name="l00154"></a><a class="code" href="group__apr__network__io.html#gac85bb39c620cf891dc31f333fada8c2">00154</a> <span class="preprocessor">#define APR_INET6    AF_INET6</span>
<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00157"></a>00157 <span class="comment">/**</span>
<a name="l00158"></a>00158 <span class="comment"> * @defgroup IP_Proto IP Protocol Definitions for use when creating sockets</span>
<a name="l00159"></a>00159 <span class="comment"> * @{</span>
<a name="l00160"></a>00160 <span class="comment"> */</span>
<a name="l00161"></a><a class="code" href="group___i_p___proto.html#gcec0dc73f15bd862c291c60d17bf6818">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#g87d62a680278c005843f662f9de5a7c9">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#g17507990b11d3cb857a7a283b53cc520">00163</a> <span class="preprocessor">#define APR_PROTO_SCTP    132   </span><span class="comment">/**&lt; SCTP */</span>
<a name="l00164"></a>00164 <span class="comment">/** @} */</span>
<a name="l00165"></a>00165 <span class="comment"></span>
<a name="l00166"></a>00166 <span class="comment">/**</span>
<a name="l00167"></a>00167 <span class="comment"> * Enum to tell us if we're interested in remote or local socket</span>
<a name="l00168"></a>00168 <span class="comment"> */</span>
<a name="l00169"></a><a class="code" href="group__apr__network__io.html#g390acaaf1dbc5fd4fb2cb49e86f43537">00169</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00170"></a>00170     APR_LOCAL,
<a name="l00171"></a>00171     APR_REMOTE
<a name="l00172"></a>00172 } <a class="code" href="group__apr__network__io.html#g390acaaf1dbc5fd4fb2cb49e86f43537">apr_interface_e</a>;
<a name="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">/**</span>
<a name="l00175"></a>00175 <span class="comment"> * The specific declaration of inet_addr's ... some platforms fall back</span>
<a name="l00176"></a>00176 <span class="comment"> * inet_network (this is not good, but necessary)</span>
<a name="l00177"></a>00177 <span class="comment"> */</span>
<a name="l00178"></a>00178 
<a name="l00179"></a>00179 <span class="preprocessor">#if APR_HAVE_INET_ADDR</span>
<a name="l00180"></a><a class="code" href="group__apr__network__io.html#g03d6d899e1af1a7a1a0965b3f78f7d2b">00180</a> <span class="preprocessor"></span><span class="preprocessor">#define apr_inet_addr    inet_addr</span>
<a name="l00181"></a>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>
<a name="l00182"></a>00182 <span class="comment">/**</span>
<a name="l00183"></a>00183 <span class="comment"> * @warning</span>
<a name="l00184"></a>00184 <span class="comment"> * not generally safe... inet_network() and inet_addr() perform</span>
<a name="l00185"></a>00185 <span class="comment"> * different functions */</span>
<a name="l00186"></a>00186 <span class="preprocessor">#define apr_inet_addr    inet_network</span>
<a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00189"></a>00189 <span class="comment">/** A structure to represent sockets */</span>
<a name="l00190"></a><a class="code" href="group__apr__network__io.html#gc6c71c07bdd54fd756f6bee50ae9e6ad">00190</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#gc6c71c07bdd54fd756f6bee50ae9e6ad">apr_socket_t</a>     apr_socket_t;<span class="comment"></span>
<a name="l00191"></a>00191 <span class="comment">/**</span>
<a name="l00192"></a>00192 <span class="comment"> * A structure to encapsulate headers and trailers for apr_socket_sendfile</span>
<a name="l00193"></a>00193 <span class="comment"> */</span>
<a name="l00194"></a><a class="code" href="group__apr__network__io.html#ge910b6cca441e05a23831a0893879cb2">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#ge910b6cca441e05a23831a0893879cb2">apr_hdtr_t</a>;<span class="comment"></span>
<a name="l00195"></a>00195 <span class="comment">/** A structure to represent in_addr */</span>
<a name="l00196"></a><a class="code" href="group__apr__network__io.html#g6f93f2943b20505fd60e5d092031dd85">00196</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>in_addr          <a class="code" href="group__apr__network__io.html#g6f93f2943b20505fd60e5d092031dd85">apr_in_addr_t</a>;<span class="comment"></span>
<a name="l00197"></a>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#gd6c94bf4e5f2ad65e326ab6017ed2534">00198</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__network__io.html#gd6c94bf4e5f2ad65e326ab6017ed2534">apr_ipsubnet_t</a> apr_ipsubnet_t;
<a name="l00199"></a>00199 <span class="comment"></span>
<a name="l00200"></a>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#g31acf01d399b8084d07c9b2dd8ba55c5">00201</a> <span class="keyword">typedef</span> apr_uint16_t            <a class="code" href="group__apr__network__io.html#g31acf01d399b8084d07c9b2dd8ba55c5">apr_port_t</a>;
<a name="l00202"></a>00202 <span class="comment"></span>
<a name="l00203"></a>00203 <span class="comment">/** @remark It's defined here as I think it should all be platform safe...</span>
<a name="l00204"></a>00204 <span class="comment"> * @see apr_sockaddr_t</span>
<a name="l00205"></a>00205 <span class="comment"> */</span>
<a name="l00206"></a><a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">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#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a>;<span class="comment"></span>
<a name="l00207"></a>00207 <span class="comment">/**</span>
<a name="l00208"></a>00208 <span class="comment"> * APRs socket address type, used to ensure protocol independence</span>
<a name="l00209"></a>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#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> {<span class="comment"></span>
<a name="l00211"></a>00211 <span class="comment">    /** The pool to use... */</span>
<a name="l00212"></a><a class="code" href="structapr__sockaddr__t.html#f5a165dd19efcfe5909ccece92904682">00212</a>     <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *<a class="code" href="structapr__sockaddr__t.html#f5a165dd19efcfe5909ccece92904682">pool</a>;<span class="comment"></span>
<a name="l00213"></a>00213 <span class="comment">    /** The hostname */</span>
<a name="l00214"></a><a class="code" href="structapr__sockaddr__t.html#bbfc8c787f6697a425a65fcefcdc0949">00214</a>     <span class="keywordtype">char</span> *<a class="code" href="structapr__sockaddr__t.html#bbfc8c787f6697a425a65fcefcdc0949">hostname</a>;<span class="comment"></span>
<a name="l00215"></a>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#43a032bdea49d117e12fec8be3b9afc5">00216</a>     <span class="keywordtype">char</span> *<a class="code" href="structapr__sockaddr__t.html#43a032bdea49d117e12fec8be3b9afc5">servname</a>;<span class="comment"></span>
<a name="l00217"></a>00217 <span class="comment">    /** The numeric port */</span>
<a name="l00218"></a><a class="code" href="structapr__sockaddr__t.html#18d7c8fd845d062be1e1f5fb0c9b85a5">00218</a>     apr_port_t <a class="code" href="structapr__sockaddr__t.html#18d7c8fd845d062be1e1f5fb0c9b85a5">port</a>;<span class="comment"></span>
<a name="l00219"></a>00219 <span class="comment">    /** The family */</span>
<a name="l00220"></a><a class="code" href="structapr__sockaddr__t.html#1198c82f999b33aff97c7678c83e2ef8">00220</a>     apr_int32_t <a class="code" href="structapr__sockaddr__t.html#1198c82f999b33aff97c7678c83e2ef8">family</a>;<span class="comment"></span>
<a name="l00221"></a>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#08caeb83304c35cf2dfb367aefba3712">00222</a>     apr_socklen_t <a class="code" href="structapr__sockaddr__t.html#08caeb83304c35cf2dfb367aefba3712">salen</a>;<span class="comment"></span>
<a name="l00223"></a>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#cafee0dca466aac4d2481df6a105c971">00224</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__sockaddr__t.html#cafee0dca466aac4d2481df6a105c971">ipaddr_len</a>;<span class="comment"></span>
<a name="l00225"></a>00225 <span class="comment">    /** How big should the address buffer be?  16 for v4 or 46 for v6</span>
<a name="l00226"></a>00226 <span class="comment">     *  used in inet_ntop... */</span>
<a name="l00227"></a><a class="code" href="structapr__sockaddr__t.html#45770dd66efbb0a59bd6c86e89af78fa">00227</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__sockaddr__t.html#45770dd66efbb0a59bd6c86e89af78fa">addr_str_len</a>;<span class="comment"></span>
<a name="l00228"></a>00228 <span class="comment">    /** This points to the IP address structure within the appropriate</span>
<a name="l00229"></a>00229 <span class="comment">     *  sockaddr structure.  */</span>
<a name="l00230"></a><a class="code" href="structapr__sockaddr__t.html#467065b3f28cae5581930a1a7f1f02db">00230</a>     <span class="keywordtype">void</span> *<a class="code" href="structapr__sockaddr__t.html#467065b3f28cae5581930a1a7f1f02db">ipaddr_ptr</a>;<span class="comment"></span>
<a name="l00231"></a>00231 <span class="comment">    /** If multiple addresses were found by apr_sockaddr_info_get(), this </span>
<a name="l00232"></a>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#43d18100668f3c21514b76ece97eee66">00233</a>     <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *<a class="code" href="structapr__sockaddr__t.html#43d18100668f3c21514b76ece97eee66">next</a>;<span class="comment"></span>
<a name="l00234"></a>00234 <span class="comment">    /** Union of either IPv4 or IPv6 sockaddr. */</span>
<a name="l00235"></a>00235     <span class="keyword">union </span>{<span class="comment"></span>
<a name="l00236"></a>00236 <span class="comment">        /** IPv4 sockaddr structure */</span>
<a name="l00237"></a><a class="code" href="structapr__sockaddr__t.html#c96a708410afebec443765b1d3cfdc2a">00237</a>         <span class="keyword">struct </span>sockaddr_in sin;
<a name="l00238"></a>00238 <span class="preprocessor">#if APR_HAVE_IPV6</span>
<a name="l00239"></a>00239 <span class="preprocessor"></span><span class="comment">        /** IPv6 sockaddr structure */</span>
<a name="l00240"></a><a class="code" href="structapr__sockaddr__t.html#2d76180bf4848e888fafdbe28126f56b">00240</a>         <span class="keyword">struct </span>sockaddr_in6 sin6;
<a name="l00241"></a>00241 <span class="preprocessor">#endif</span>
<a name="l00242"></a>00242 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_SA_STORAGE</span>
<a name="l00243"></a>00243 <span class="preprocessor"></span><span class="comment">        /** Placeholder to ensure that the size of this union is not</span>
<a name="l00244"></a>00244 <span class="comment">         * dependent on whether APR_HAVE_IPV6 is defined. */</span>
<a name="l00245"></a><a class="code" href="structapr__sockaddr__t.html#bab87f289608312e991139392c1d6b91">00245</a>         <span class="keyword">struct </span>sockaddr_storage sas;
<a name="l00246"></a>00246 <span class="preprocessor">#endif</span>
<a name="l00247"></a>00247 <span class="preprocessor"></span>    } <a class="code" href="structapr__sockaddr__t.html#331540b5e476088e7714b537c90f3927">sa</a>;
<a name="l00248"></a>00248 };
<a name="l00249"></a>00249 
<a name="l00250"></a>00250 <span class="preprocessor">#if APR_HAS_SENDFILE</span>
<a name="l00251"></a>00251 <span class="preprocessor"></span><span class="comment">/** </span>
<a name="l00252"></a>00252 <span class="comment"> * Support reusing the socket on platforms which support it (from disconnect,</span>
<a name="l00253"></a>00253 <span class="comment"> * specifically Win32.</span>
<a name="l00254"></a>00254 <span class="comment"> * @remark Optional flag passed into apr_socket_sendfile() </span>
<a name="l00255"></a>00255 <span class="comment"> */</span>
<a name="l00256"></a><a class="code" href="group__apr__network__io.html#ge2c638cfaa5bfdc17a18a49dddace257">00256</a> <span class="preprocessor">#define APR_SENDFILE_DISCONNECT_SOCKET      1</span>
<a name="l00257"></a>00257 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00258"></a>00258 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00259"></a>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#ge910b6cca441e05a23831a0893879cb2">apr_hdtr_t</a> {<span class="comment"></span>
<a name="l00261"></a>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#95bd1b11884f3c2fbd63345e1b42f459">00262</a>     <span class="keyword">struct </span>iovec* <a class="code" href="structapr__hdtr__t.html#95bd1b11884f3c2fbd63345e1b42f459">headers</a>;<span class="comment"></span>
<a name="l00263"></a>00263 <span class="comment">    /** number of headers in the iovec */</span>
<a name="l00264"></a><a class="code" href="structapr__hdtr__t.html#78c42131fe0f98abbe939e58e121aed1">00264</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__hdtr__t.html#78c42131fe0f98abbe939e58e121aed1">numheaders</a>;<span class="comment"></span>
<a name="l00265"></a>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#2f059cf2f750d57a1556cf23f435589b">00266</a>     <span class="keyword">struct </span>iovec* <a class="code" href="structapr__hdtr__t.html#2f059cf2f750d57a1556cf23f435589b">trailers</a>;<span class="comment"></span>
<a name="l00267"></a>00267 <span class="comment">    /** number of trailers in the iovec */</span>
<a name="l00268"></a><a class="code" href="structapr__hdtr__t.html#4a8a0098476d257f85dc65756da9dffe">00268</a>     <span class="keywordtype">int</span> <a class="code" href="structapr__hdtr__t.html#4a8a0098476d257f85dc65756da9dffe">numtrailers</a>;
<a name="l00269"></a>00269 };
<a name="l00270"></a>00270 
<a name="l00271"></a>00271 <span class="comment">/* function definitions */</span>
<a name="l00272"></a>00272 <span class="comment"></span>
<a name="l00273"></a>00273 <span class="comment">/**</span>
<a name="l00274"></a>00274 <span class="comment"> * Create a socket.</span>
<a name="l00275"></a>00275 <span class="comment"> * @param new_sock The new socket that has been set up.</span>
<a name="l00276"></a>00276 <span class="comment"> * @param family The address family of the socket (e.g., APR_INET).</span>
<a name="l00277"></a>00277 <span class="comment"> * @param type The type of the socket (e.g., SOCK_STREAM).</span>
<a name="l00278"></a>00278 <span class="comment"> * @param protocol The protocol of the socket (e.g., APR_PROTO_TCP).</span>
<a name="l00279"></a>00279 <span class="comment"> * @param cont The pool to use</span>
<a name="l00280"></a>00280 <span class="comment"> */</span>
<a name="l00281"></a>00281 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#gd1e01b82fe737d41be5a0c4e8fd5a478">apr_socket_create</a>(apr_socket_t **new_sock, 
<a name="l00282"></a>00282                                             <span class="keywordtype">int</span> family, <span class="keywordtype">int</span> type,
<a name="l00283"></a>00283                                             <span class="keywordtype">int</span> protocol,
<a name="l00284"></a>00284                                             <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *cont);
<a name="l00285"></a>00285 <span class="comment"></span>
<a name="l00286"></a>00286 <span class="comment">/**</span>
<a name="l00287"></a>00287 <span class="comment"> * Shutdown either reading, writing, or both sides of a socket.</span>
<a name="l00288"></a>00288 <span class="comment"> * @param thesocket The socket to close </span>
<a name="l00289"></a>00289 <span class="comment"> * @param how How to shutdown the socket.  One of:</span>
<a name="l00290"></a>00290 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00291"></a>00291 <span class="comment"> *            APR_SHUTDOWN_READ         no longer allow read requests</span>
<a name="l00292"></a>00292 <span class="comment"> *            APR_SHUTDOWN_WRITE        no longer allow write requests</span>
<a name="l00293"></a>00293 <span class="comment"> *            APR_SHUTDOWN_READWRITE    no longer allow read or write requests </span>
<a name="l00294"></a>00294 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00295"></a>00295 <span class="comment"> * @see apr_shutdown_how_e</span>
<a name="l00296"></a>00296 <span class="comment"> * @remark This does not actually close the socket descriptor, it just</span>
<a name="l00297"></a>00297 <span class="comment"> *      controls which calls are still valid on the socket.</span>
<a name="l00298"></a>00298 <span class="comment"> */</span>
<a name="l00299"></a>00299 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g72a1b8fbb069d94ac39af87df4997420">apr_socket_shutdown</a>(apr_socket_t *thesocket,
<a name="l00300"></a>00300                                               apr_shutdown_how_e how);
<a name="l00301"></a>00301 <span class="comment"></span>
<a name="l00302"></a>00302 <span class="comment">/**</span>
<a name="l00303"></a>00303 <span class="comment"> * Close a socket.</span>
<a name="l00304"></a>00304 <span class="comment"> * @param thesocket The socket to close </span>
<a name="l00305"></a>00305 <span class="comment"> */</span>
<a name="l00306"></a>00306 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#ge72146d525a12675dc764843eb4cd1e2">apr_socket_close</a>(apr_socket_t *thesocket);
<a name="l00307"></a>00307 <span class="comment"></span>
<a name="l00308"></a>00308 <span class="comment">/**</span>
<a name="l00309"></a>00309 <span class="comment"> * Bind the socket to its associated port</span>
<a name="l00310"></a>00310 <span class="comment"> * @param sock The socket to bind </span>
<a name="l00311"></a>00311 <span class="comment"> * @param sa The socket address to bind to</span>
<a name="l00312"></a>00312 <span class="comment"> * @remark This may be where we will find out if there is any other process</span>
<a name="l00313"></a>00313 <span class="comment"> *      using the selected port.</span>
<a name="l00314"></a>00314 <span class="comment"> */</span>
<a name="l00315"></a>00315 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#gd0a29af75ae61d3f4fb634baf0abbcb5">apr_socket_bind</a>(apr_socket_t *sock, 
<a name="l00316"></a>00316                                           <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *sa);
<a name="l00317"></a>00317 <span class="comment"></span>
<a name="l00318"></a>00318 <span class="comment">/**</span>
<a name="l00319"></a>00319 <span class="comment"> * Listen to a bound socket for connections.</span>
<a name="l00320"></a>00320 <span class="comment"> * @param sock The socket to listen on </span>
<a name="l00321"></a>00321 <span class="comment"> * @param backlog The number of outstanding connections allowed in the sockets</span>
<a name="l00322"></a>00322 <span class="comment"> *                listen queue.  If this value is less than zero, the listen</span>
<a name="l00323"></a>00323 <span class="comment"> *                queue size is set to zero.  </span>
<a name="l00324"></a>00324 <span class="comment"> */</span>
<a name="l00325"></a>00325 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g9a139f59f8a9dff9606fb02715b23421">apr_socket_listen</a>(apr_socket_t *sock, 
<a name="l00326"></a>00326                                             apr_int32_t backlog);
<a name="l00327"></a>00327 <span class="comment"></span>
<a name="l00328"></a>00328 <span class="comment">/**</span>
<a name="l00329"></a>00329 <span class="comment"> * Accept a new connection request</span>
<a name="l00330"></a>00330 <span class="comment"> * @param new_sock A copy of the socket that is connected to the socket that</span>
<a name="l00331"></a>00331 <span class="comment"> *                 made the connection request.  This is the socket which should</span>
<a name="l00332"></a>00332 <span class="comment"> *                 be used for all future communication.</span>
<a name="l00333"></a>00333 <span class="comment"> * @param sock The socket we are listening on.</span>
<a name="l00334"></a>00334 <span class="comment"> * @param connection_pool The pool for the new socket.</span>
<a name="l00335"></a>00335 <span class="comment"> */</span>
<a name="l00336"></a>00336 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#gfdf2bfb1461c4c5fb10c147b1415e8a3">apr_socket_accept</a>(apr_socket_t **new_sock, 
<a name="l00337"></a>00337                                             apr_socket_t *sock,
<a name="l00338"></a>00338                                             <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *connection_pool);
<a name="l00339"></a>00339 <span class="comment"></span>
<a name="l00340"></a>00340 <span class="comment">/**</span>
<a name="l00341"></a>00341 <span class="comment"> * Issue a connection request to a socket either on the same machine </span>
<a name="l00342"></a>00342 <span class="comment"> * or a different one.</span>
<a name="l00343"></a>00343 <span class="comment"> * @param sock The socket we wish to use for our side of the connection </span>
<a name="l00344"></a>00344 <span class="comment"> * @param sa The address of the machine we wish to connect to.</span>
<a name="l00345"></a>00345 <span class="comment"> */</span>
<a name="l00346"></a>00346 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g2fafd009ab83ff00b3945575d432fdb0">apr_socket_connect</a>(apr_socket_t *sock,
<a name="l00347"></a>00347                                              <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *sa);
<a name="l00348"></a>00348 <span class="comment"></span>
<a name="l00349"></a>00349 <span class="comment">/**</span>
<a name="l00350"></a>00350 <span class="comment"> * Create apr_sockaddr_t from hostname, address family, and port.</span>
<a name="l00351"></a>00351 <span class="comment"> * @param sa The new apr_sockaddr_t.</span>
<a name="l00352"></a>00352 <span class="comment"> * @param hostname The hostname or numeric address string to resolve/parse, or</span>
<a name="l00353"></a>00353 <span class="comment"> *               NULL to build an address that corresponds to 0.0.0.0 or ::</span>
<a name="l00354"></a>00354 <span class="comment"> * @param family The address family to use, or APR_UNSPEC if the system should </span>
<a name="l00355"></a>00355 <span class="comment"> *               decide.</span>
<a name="l00356"></a>00356 <span class="comment"> * @param port The port number.</span>
<a name="l00357"></a>00357 <span class="comment"> * @param flags Special processing flags:</span>
<a name="l00358"></a>00358 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00359"></a>00359 <span class="comment"> *       APR_IPV4_ADDR_OK          first query for IPv4 addresses; only look</span>
<a name="l00360"></a>00360 <span class="comment"> *                                 for IPv6 addresses if the first query failed;</span>
<a name="l00361"></a>00361 <span class="comment"> *                                 only valid if family is APR_UNSPEC and hostname</span>
<a name="l00362"></a>00362 <span class="comment"> *                                 isn't NULL; mutually exclusive with</span>
<a name="l00363"></a>00363 <span class="comment"> *                                 APR_IPV6_ADDR_OK</span>
<a name="l00364"></a>00364 <span class="comment"> *       APR_IPV6_ADDR_OK          first query for IPv6 addresses; only look</span>
<a name="l00365"></a>00365 <span class="comment"> *                                 for IPv4 addresses if the first query failed;</span>
<a name="l00366"></a>00366 <span class="comment"> *                                 only valid if family is APR_UNSPEC and hostname</span>
<a name="l00367"></a>00367 <span class="comment"> *                                 isn't NULL and APR_HAVE_IPV6; mutually exclusive</span>
<a name="l00368"></a>00368 <span class="comment"> *                                 with APR_IPV4_ADDR_OK</span>
<a name="l00369"></a>00369 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00370"></a>00370 <span class="comment"> * @param p The pool for the apr_sockaddr_t and associated storage.</span>
<a name="l00371"></a>00371 <span class="comment"> */</span>
<a name="l00372"></a>00372 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g5ecd1bacd0bd48ed8c34cce3904f7434">apr_sockaddr_info_get</a>(<a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> **sa,
<a name="l00373"></a>00373                                           const <span class="keywordtype">char</span> *hostname,
<a name="l00374"></a>00374                                           apr_int32_t family,
<a name="l00375"></a>00375                                           apr_port_t port,
<a name="l00376"></a>00376                                           apr_int32_t flags,
<a name="l00377"></a>00377                                           <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p);
<a name="l00378"></a>00378 <span class="comment"></span>
<a name="l00379"></a>00379 <span class="comment">/**</span>
<a name="l00380"></a>00380 <span class="comment"> * Look up the host name from an apr_sockaddr_t.</span>
<a name="l00381"></a>00381 <span class="comment"> * @param hostname The hostname.</span>
<a name="l00382"></a>00382 <span class="comment"> * @param sa The apr_sockaddr_t.</span>
<a name="l00383"></a>00383 <span class="comment"> * @param flags Special processing flags.</span>
<a name="l00384"></a>00384 <span class="comment"> */</span>
<a name="l00385"></a>00385 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g946dcacb1e23b4d5e04de6b0662cf66a">apr_getnameinfo</a>(<span class="keywordtype">char</span> **hostname,
<a name="l00386"></a>00386                                           <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *sa,
<a name="l00387"></a>00387                                           apr_int32_t flags);
<a name="l00388"></a>00388 <span class="comment"></span>
<a name="l00389"></a>00389 <span class="comment">/**</span>
<a name="l00390"></a>00390 <span class="comment"> * Parse hostname/IP address with scope id and port.</span>
<a name="l00391"></a>00391 <span class="comment"> *</span>
<a name="l00392"></a>00392 <span class="comment"> * Any of the following strings are accepted:</span>
<a name="l00393"></a>00393 <span class="comment"> *   8080                  (just the port number)</span>
<a name="l00394"></a>00394 <span class="comment"> *   www.apache.org        (just the hostname)</span>
<a name="l00395"></a>00395 <span class="comment"> *   www.apache.org:8080   (hostname and port number)</span>
<a name="l00396"></a>00396 <span class="comment"> *   [fe80::1]:80          (IPv6 numeric address string only)</span>
<a name="l00397"></a>00397 <span class="comment"> *   [fe80::1%eth0]        (IPv6 numeric address string and scope id)</span>
<a name="l00398"></a>00398 <span class="comment"> *</span>
<a name="l00399"></a>00399 <span class="comment"> * Invalid strings:</span>
<a name="l00400"></a>00400 <span class="comment"> *                         (empty string)</span>
<a name="l00401"></a>00401 <span class="comment"> *   [abc]                 (not valid IPv6 numeric address string)</span>
<a name="l00402"></a>00402 <span class="comment"> *   abc:65536             (invalid port number)</span>
<a name="l00403"></a>00403 <span class="comment"> *</span>
<a name="l00404"></a>00404 <span class="comment"> * @param addr The new buffer containing just the hostname.  On output, *addr </span>
<a name="l00405"></a>00405 <span class="comment"> *             will be NULL if no hostname/IP address was specfied.</span>
<a name="l00406"></a>00406 <span class="comment"> * @param scope_id The new buffer containing just the scope id.  On output, </span>
<a name="l00407"></a>00407 <span class="comment"> *                 *scope_id will be NULL if no scope id was specified.</span>
<a name="l00408"></a>00408 <span class="comment"> * @param port The port number.  On output, *port will be 0 if no port was </span>
<a name="l00409"></a>00409 <span class="comment"> *             specified.</span>
<a name="l00410"></a>00410 <span class="comment"> *             ### FIXME: 0 is a legal port (per RFC 1700). this should</span>
<a name="l00411"></a>00411 <span class="comment"> *             ### return something besides zero if the port is missing.</span>
<a name="l00412"></a>00412 <span class="comment"> * @param str The input string to be parsed.</span>
<a name="l00413"></a>00413 <span class="comment"> * @param p The pool from which *addr and *scope_id are allocated.</span>
<a name="l00414"></a>00414 <span class="comment"> * @remark If scope id shouldn't be allowed, check for scope_id != NULL in </span>
<a name="l00415"></a>00415 <span class="comment"> *         addition to checking the return code.  If addr/hostname should be </span>
<a name="l00416"></a>00416 <span class="comment"> *         required, check for addr == NULL in addition to checking the </span>
<a name="l00417"></a>00417 <span class="comment"> *         return code.</span>
<a name="l00418"></a>00418 <span class="comment"> */</span>
<a name="l00419"></a>00419 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g031bc828842d5f24fcb01a19104fc03e">apr_parse_addr_port</a>(<span class="keywordtype">char</span> **addr,
<a name="l00420"></a>00420                                               <span class="keywordtype">char</span> **scope_id,
<a name="l00421"></a>00421                                               apr_port_t *port,
<a name="l00422"></a>00422                                               const <span class="keywordtype">char</span> *str,
<a name="l00423"></a>00423                                               <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p);
<a name="l00424"></a>00424 <span class="comment"></span>
<a name="l00425"></a>00425 <span class="comment">/**</span>
<a name="l00426"></a>00426 <span class="comment"> * Get name of the current machine</span>
<a name="l00427"></a>00427 <span class="comment"> * @param buf A buffer to store the hostname in.</span>
<a name="l00428"></a>00428 <span class="comment"> * @param len The maximum length of the hostname that can be stored in the</span>
<a name="l00429"></a>00429 <span class="comment"> *            buffer provided.  The suggested length is APRMAXHOSTLEN + 1.</span>
<a name="l00430"></a>00430 <span class="comment"> * @param cont The pool to use.</span>
<a name="l00431"></a>00431 <span class="comment"> * @remark If the buffer was not large enough, an error will be returned.</span>
<a name="l00432"></a>00432 <span class="comment"> */</span>
<a name="l00433"></a>00433 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g6a27f5dbd7c60460eae3826d2e929c78">apr_gethostname</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len, <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *cont);
<a name="l00434"></a>00434 <span class="comment"></span>
<a name="l00435"></a>00435 <span class="comment">/**</span>
<a name="l00436"></a>00436 <span class="comment"> * Return the data associated with the current socket</span>
<a name="l00437"></a>00437 <span class="comment"> * @param data The user data associated with the socket.</span>
<a name="l00438"></a>00438 <span class="comment"> * @param key The key to associate with the user data.</span>
<a name="l00439"></a>00439 <span class="comment"> * @param sock The currently open socket.</span>
<a name="l00440"></a>00440 <span class="comment"> */</span>
<a name="l00441"></a>00441 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#ge05038902cf70c5957765c704acc1be8">apr_socket_data_get</a>(<span class="keywordtype">void</span> **data, const <span class="keywordtype">char</span> *key,
<a name="l00442"></a>00442                                               apr_socket_t *sock);
<a name="l00443"></a>00443 <span class="comment"></span>
<a name="l00444"></a>00444 <span class="comment">/**</span>
<a name="l00445"></a>00445 <span class="comment"> * Set the data associated with the current socket.</span>
<a name="l00446"></a>00446 <span class="comment"> * @param sock The currently open socket.</span>
<a name="l00447"></a>00447 <span class="comment"> * @param data The user data to associate with the socket.</span>
<a name="l00448"></a>00448 <span class="comment"> * @param key The key to associate with the data.</span>
<a name="l00449"></a>00449 <span class="comment"> * @param cleanup The cleanup to call when the socket is destroyed.</span>
<a name="l00450"></a>00450 <span class="comment"> */</span>
<a name="l00451"></a>00451 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g1a6df57d97e88eddbf9ec979dec8a1ac">apr_socket_data_set</a>(apr_socket_t *sock, <span class="keywordtype">void</span> *data,
<a name="l00452"></a>00452                                               const <span class="keywordtype">char</span> *key,
<a name="l00453"></a>00453                                               <a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> (*cleanup)(<span class="keywordtype">void</span>*));
<a name="l00454"></a>00454 <span class="comment"></span>
<a name="l00455"></a>00455 <span class="comment">/**</span>
<a name="l00456"></a>00456 <span class="comment"> * Send data over a network.</span>
<a name="l00457"></a>00457 <span class="comment"> * @param sock The socket to send the data over.</span>
<a name="l00458"></a>00458 <span class="comment"> * @param buf The buffer which contains the data to be sent. </span>
<a name="l00459"></a>00459 <span class="comment"> * @param len On entry, the number of bytes to send; on exit, the number</span>
<a name="l00460"></a>00460 <span class="comment"> *            of bytes sent.</span>
<a name="l00461"></a>00461 <span class="comment"> * @remark</span>
<a name="l00462"></a>00462 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00463"></a>00463 <span class="comment"> * This functions acts like a blocking write by default.  To change </span>
<a name="l00464"></a>00464 <span class="comment"> * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK</span>
<a name="l00465"></a>00465 <span class="comment"> * socket option.</span>
<a name="l00466"></a>00466 <span class="comment"> *</span>
<a name="l00467"></a>00467 <span class="comment"> * It is possible for both bytes to be sent and an error to be returned.</span>
<a name="l00468"></a>00468 <span class="comment"> *</span>
<a name="l00469"></a>00469 <span class="comment"> * APR_EINTR is never returned.</span>
<a name="l00470"></a>00470 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00471"></a>00471 <span class="comment"> */</span>
<a name="l00472"></a>00472 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g88e4db9a6bf0b7738ef4bdae62bf1f57">apr_socket_send</a>(apr_socket_t *sock, const <span class="keywordtype">char</span> *buf, 
<a name="l00473"></a>00473                                           apr_size_t *len);
<a name="l00474"></a>00474 <span class="comment"></span>
<a name="l00475"></a>00475 <span class="comment">/**</span>
<a name="l00476"></a>00476 <span class="comment"> * Send multiple packets of data over a network.</span>
<a name="l00477"></a>00477 <span class="comment"> * @param sock The socket to send the data over.</span>
<a name="l00478"></a>00478 <span class="comment"> * @param vec The array of iovec structs containing the data to send </span>
<a name="l00479"></a>00479 <span class="comment"> * @param nvec The number of iovec structs in the array</span>
<a name="l00480"></a>00480 <span class="comment"> * @param len Receives the number of bytes actually written</span>
<a name="l00481"></a>00481 <span class="comment"> * @remark</span>
<a name="l00482"></a>00482 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00483"></a>00483 <span class="comment"> * This functions acts like a blocking write by default.  To change </span>
<a name="l00484"></a>00484 <span class="comment"> * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK</span>
<a name="l00485"></a>00485 <span class="comment"> * socket option.</span>
<a name="l00486"></a>00486 <span class="comment"> * The number of bytes actually sent is stored in argument 3.</span>
<a name="l00487"></a>00487 <span class="comment"> *</span>
<a name="l00488"></a>00488 <span class="comment"> * It is possible for both bytes to be sent and an error to be returned.</span>
<a name="l00489"></a>00489 <span class="comment"> *</span>
<a name="l00490"></a>00490 <span class="comment"> * APR_EINTR is never returned.</span>
<a name="l00491"></a>00491 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00492"></a>00492 <span class="comment"> */</span>
<a name="l00493"></a>00493 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g7f959461a99ba9d98398a9153061f8bd">apr_socket_sendv</a>(apr_socket_t *sock, 
<a name="l00494"></a>00494                                            const struct iovec *vec,
<a name="l00495"></a>00495                                            apr_int32_t nvec, apr_size_t *len);
<a name="l00496"></a>00496 <span class="comment"></span>
<a name="l00497"></a>00497 <span class="comment">/**</span>
<a name="l00498"></a>00498 <span class="comment"> * @param sock The socket to send from</span>
<a name="l00499"></a>00499 <span class="comment"> * @param where The apr_sockaddr_t describing where to send the data</span>
<a name="l00500"></a>00500 <span class="comment"> * @param flags The flags to use</span>
<a name="l00501"></a>00501 <span class="comment"> * @param buf  The data to send</span>
<a name="l00502"></a>00502 <span class="comment"> * @param len  The length of the data to send</span>
<a name="l00503"></a>00503 <span class="comment"> */</span>
<a name="l00504"></a>00504 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g8138664b5b591b82453870336e44aa57">apr_socket_sendto</a>(apr_socket_t *sock, 
<a name="l00505"></a>00505                                             <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *where,
<a name="l00506"></a>00506                                             apr_int32_t flags, const <span class="keywordtype">char</span> *buf, 
<a name="l00507"></a>00507                                             apr_size_t *len);
<a name="l00508"></a>00508 <span class="comment"></span>
<a name="l00509"></a>00509 <span class="comment">/**</span>
<a name="l00510"></a>00510 <span class="comment"> * @param from The apr_sockaddr_t to fill in the recipient info</span>
<a name="l00511"></a>00511 <span class="comment"> * @param sock The socket to use</span>
<a name="l00512"></a>00512 <span class="comment"> * @param flags The flags to use</span>
<a name="l00513"></a>00513 <span class="comment"> * @param buf  The buffer to use</span>
<a name="l00514"></a>00514 <span class="comment"> * @param len  The length of the available buffer</span>
<a name="l00515"></a>00515 <span class="comment"> */</span>
<a name="l00516"></a>00516 
<a name="l00517"></a>00517 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g4669ee33b0a5ff0c56090ae937648a88">apr_socket_recvfrom</a>(<a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *from, 
<a name="l00518"></a>00518                                               apr_socket_t *sock,
<a name="l00519"></a>00519                                               apr_int32_t flags, <span class="keywordtype">char</span> *buf, 
<a name="l00520"></a>00520                                               apr_size_t *len);
<a name="l00521"></a>00521  
<a name="l00522"></a>00522 <span class="preprocessor">#if APR_HAS_SENDFILE || defined(DOXYGEN)</span>
<a name="l00523"></a>00523 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00524"></a>00524 <span class="comment">/**</span>
<a name="l00525"></a>00525 <span class="comment"> * Send a file from an open file descriptor to a socket, along with </span>
<a name="l00526"></a>00526 <span class="comment"> * optional headers and trailers</span>
<a name="l00527"></a>00527 <span class="comment"> * @param sock The socket to which we're writing</span>
<a name="l00528"></a>00528 <span class="comment"> * @param file The open file from which to read</span>
<a name="l00529"></a>00529 <span class="comment"> * @param hdtr A structure containing the headers and trailers to send</span>
<a name="l00530"></a>00530 <span class="comment"> * @param offset Offset into the file where we should begin writing</span>
<a name="l00531"></a>00531 <span class="comment"> * @param len (input)  - Number of bytes to send from the file </span>
<a name="l00532"></a>00532 <span class="comment"> *            (output) - Number of bytes actually sent, </span>
<a name="l00533"></a>00533 <span class="comment"> *                       including headers, file, and trailers</span>
<a name="l00534"></a>00534 <span class="comment"> * @param flags APR flags that are mapped to OS specific flags</span>
<a name="l00535"></a>00535 <span class="comment"> * @remark This functions acts like a blocking write by default.  To change </span>
<a name="l00536"></a>00536 <span class="comment"> *         this behavior, use apr_socket_timeout_set() or the</span>
<a name="l00537"></a>00537 <span class="comment"> *         APR_SO_NONBLOCK socket option.</span>
<a name="l00538"></a>00538 <span class="comment"> * The number of bytes actually sent is stored in the len parameter.</span>
<a name="l00539"></a>00539 <span class="comment"> * The offset parameter is passed by reference for no reason; its</span>
<a name="l00540"></a>00540 <span class="comment"> * value will never be modified by the apr_socket_sendfile() function.</span>
<a name="l00541"></a>00541 <span class="comment"> */</span>
<a name="l00542"></a>00542 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#gc887a7950a42138b31c24084d6685e4e">apr_socket_sendfile</a>(apr_socket_t *sock, 
<a name="l00543"></a>00543                                               <a class="code" href="group__apr__file__io.html#g804ab64a6f58ddcc3da8d9f54b6f51c2">apr_file_t</a> *file,
<a name="l00544"></a>00544                                               <a class="code" href="group__apr__network__io.html#ge910b6cca441e05a23831a0893879cb2">apr_hdtr_t</a> *hdtr,
<a name="l00545"></a>00545                                               apr_off_t *offset,
<a name="l00546"></a>00546                                               apr_size_t *len,
<a name="l00547"></a>00547                                               apr_int32_t flags);
<a name="l00548"></a>00548 
<a name="l00549"></a>00549 <span class="preprocessor">#endif </span><span class="comment">/* APR_HAS_SENDFILE */</span>
<a name="l00550"></a>00550 <span class="comment"></span>
<a name="l00551"></a>00551 <span class="comment">/**</span>
<a name="l00552"></a>00552 <span class="comment"> * Read data from a network.</span>
<a name="l00553"></a>00553 <span class="comment"> * @param sock The socket to read the data from.</span>
<a name="l00554"></a>00554 <span class="comment"> * @param buf The buffer to store the data in. </span>
<a name="l00555"></a>00555 <span class="comment"> * @param len On entry, the number of bytes to receive; on exit, the number</span>
<a name="l00556"></a>00556 <span class="comment"> *            of bytes received.</span>
<a name="l00557"></a>00557 <span class="comment"> * @remark</span>
<a name="l00558"></a>00558 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00559"></a>00559 <span class="comment"> * This functions acts like a blocking read by default.  To change </span>
<a name="l00560"></a>00560 <span class="comment"> * this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK</span>
<a name="l00561"></a>00561 <span class="comment"> * socket option.</span>
<a name="l00562"></a>00562 <span class="comment"> * The number of bytes actually received is stored in argument 3.</span>
<a name="l00563"></a>00563 <span class="comment"> *</span>
<a name="l00564"></a>00564 <span class="comment"> * It is possible for both bytes to be received and an APR_EOF or</span>
<a name="l00565"></a>00565 <span class="comment"> * other error to be returned.</span>
<a name="l00566"></a>00566 <span class="comment"> *</span>
<a name="l00567"></a>00567 <span class="comment"> * APR_EINTR is never returned.</span>
<a name="l00568"></a>00568 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00569"></a>00569 <span class="comment"> */</span>
<a name="l00570"></a>00570 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g953f621410a6552d4026b492a7594915">apr_socket_recv</a>(apr_socket_t *sock, 
<a name="l00571"></a>00571                                    <span class="keywordtype">char</span> *buf, apr_size_t *len);
<a name="l00572"></a>00572 <span class="comment"></span>
<a name="l00573"></a>00573 <span class="comment">/**</span>
<a name="l00574"></a>00574 <span class="comment"> * Setup socket options for the specified socket</span>
<a name="l00575"></a>00575 <span class="comment"> * @param sock The socket to set up.</span>
<a name="l00576"></a>00576 <span class="comment"> * @param opt The option we would like to configure.  One of:</span>
<a name="l00577"></a>00577 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00578"></a>00578 <span class="comment"> *            APR_SO_DEBUG      --  turn on debugging information </span>
<a name="l00579"></a>00579 <span class="comment"> *            APR_SO_KEEPALIVE  --  keep connections active</span>
<a name="l00580"></a>00580 <span class="comment"> *            APR_SO_LINGER     --  lingers on close if data is present</span>
<a name="l00581"></a>00581 <span class="comment"> *            APR_SO_NONBLOCK   --  Turns blocking on/off for socket</span>
<a name="l00582"></a>00582 <span class="comment"> *                                  When this option is enabled, use</span>
<a name="l00583"></a>00583 <span class="comment"> *                                  the APR_STATUS_IS_EAGAIN() macro to</span>
<a name="l00584"></a>00584 <span class="comment"> *                                  see if a send or receive function</span>
<a name="l00585"></a>00585 <span class="comment"> *                                  could not transfer data without</span>
<a name="l00586"></a>00586 <span class="comment"> *                                  blocking.</span>
<a name="l00587"></a>00587 <span class="comment"> *            APR_SO_REUSEADDR  --  The rules used in validating addresses</span>
<a name="l00588"></a>00588 <span class="comment"> *                                  supplied to bind should allow reuse</span>
<a name="l00589"></a>00589 <span class="comment"> *                                  of local addresses.</span>
<a name="l00590"></a>00590 <span class="comment"> *            APR_SO_SNDBUF     --  Set the SendBufferSize</span>
<a name="l00591"></a>00591 <span class="comment"> *            APR_SO_RCVBUF     --  Set the ReceiveBufferSize</span>
<a name="l00592"></a>00592 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00593"></a>00593 <span class="comment"> * @param on Value for the option.</span>
<a name="l00594"></a>00594 <span class="comment"> */</span>
<a name="l00595"></a>00595 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g88d27a646c6cab1c0a7534b4470011c0">apr_socket_opt_set</a>(apr_socket_t *sock,
<a name="l00596"></a>00596                                              apr_int32_t opt, apr_int32_t on);
<a name="l00597"></a>00597 <span class="comment"></span>
<a name="l00598"></a>00598 <span class="comment">/**</span>
<a name="l00599"></a>00599 <span class="comment"> * Setup socket timeout for the specified socket</span>
<a name="l00600"></a>00600 <span class="comment"> * @param sock The socket to set up.</span>
<a name="l00601"></a>00601 <span class="comment"> * @param t Value for the timeout.</span>
<a name="l00602"></a>00602 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00603"></a>00603 <span class="comment"> *   t &gt; 0  -- read and write calls return APR_TIMEUP if specified time</span>
<a name="l00604"></a>00604 <span class="comment"> *             elapsess with no data read or written</span>
<a name="l00605"></a>00605 <span class="comment"> *   t == 0 -- read and write calls never block</span>
<a name="l00606"></a>00606 <span class="comment"> *   t &lt; 0  -- read and write calls block</span>
<a name="l00607"></a>00607 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00608"></a>00608 <span class="comment"> */</span>
<a name="l00609"></a>00609 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g6124196d7693589a2b14997393e41d08">apr_socket_timeout_set</a>(apr_socket_t *sock,
<a name="l00610"></a>00610                                                  <a class="code" href="group__apr__time.html#g4867ccc083452a265915ac7dfafde457">apr_interval_time_t</a> t);
<a name="l00611"></a>00611 <span class="comment"></span>
<a name="l00612"></a>00612 <span class="comment">/**</span>
<a name="l00613"></a>00613 <span class="comment"> * Query socket options for the specified socket</span>
<a name="l00614"></a>00614 <span class="comment"> * @param sock The socket to query</span>
<a name="l00615"></a>00615 <span class="comment"> * @param opt The option we would like to query.  One of:</span>
<a name="l00616"></a>00616 <span class="comment"> * &lt;PRE&gt;</span>
<a name="l00617"></a>00617 <span class="comment"> *            APR_SO_DEBUG      --  turn on debugging information </span>
<a name="l00618"></a>00618 <span class="comment"> *            APR_SO_KEEPALIVE  --  keep connections active</span>
<a name="l00619"></a>00619 <span class="comment"> *            APR_SO_LINGER     --  lingers on close if data is present</span>
<a name="l00620"></a>00620 <span class="comment"> *            APR_SO_NONBLOCK   --  Turns blocking on/off for socket</span>
<a name="l00621"></a>00621 <span class="comment"> *            APR_SO_REUSEADDR  --  The rules used in validating addresses</span>
<a name="l00622"></a>00622 <span class="comment"> *                                  supplied to bind should allow reuse</span>
<a name="l00623"></a>00623 <span class="comment"> *                                  of local addresses.</span>
<a name="l00624"></a>00624 <span class="comment"> *            APR_SO_SNDBUF     --  Set the SendBufferSize</span>
<a name="l00625"></a>00625 <span class="comment"> *            APR_SO_RCVBUF     --  Set the ReceiveBufferSize</span>
<a name="l00626"></a>00626 <span class="comment"> *            APR_SO_DISCONNECTED -- Query the disconnected state of the socket.</span>
<a name="l00627"></a>00627 <span class="comment"> *                                  (Currently only used on Windows)</span>
<a name="l00628"></a>00628 <span class="comment"> * &lt;/PRE&gt;</span>
<a name="l00629"></a>00629 <span class="comment"> * @param on Socket option returned on the call.</span>
<a name="l00630"></a>00630 <span class="comment"> */</span>
<a name="l00631"></a>00631 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g0c0e0909cc9e8e2ddd5b4cf8424855a9">apr_socket_opt_get</a>(apr_socket_t *sock, 
<a name="l00632"></a>00632                                              apr_int32_t opt, apr_int32_t *on);
<a name="l00633"></a>00633 <span class="comment"></span>
<a name="l00634"></a>00634 <span class="comment">/**</span>
<a name="l00635"></a>00635 <span class="comment"> * Query socket timeout for the specified socket</span>
<a name="l00636"></a>00636 <span class="comment"> * @param sock The socket to query</span>
<a name="l00637"></a>00637 <span class="comment"> * @param t Socket timeout returned from the query.</span>
<a name="l00638"></a>00638 <span class="comment"> */</span>
<a name="l00639"></a>00639 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g0f383297164a03f43a9846ccbfdc2284">apr_socket_timeout_get</a>(apr_socket_t *sock, 
<a name="l00640"></a>00640                                                  <a class="code" href="group__apr__time.html#g4867ccc083452a265915ac7dfafde457">apr_interval_time_t</a> *t);
<a name="l00641"></a>00641 <span class="comment"></span>
<a name="l00642"></a>00642 <span class="comment">/**</span>
<a name="l00643"></a>00643 <span class="comment"> * Query the specified socket if at the OOB/Urgent data mark</span>
<a name="l00644"></a>00644 <span class="comment"> * @param sock The socket to query</span>
<a name="l00645"></a>00645 <span class="comment"> * @param atmark Is set to true if socket is at the OOB/urgent mark,</span>
<a name="l00646"></a>00646 <span class="comment"> *               otherwise is set to false.</span>
<a name="l00647"></a>00647 <span class="comment"> */</span>
<a name="l00648"></a>00648 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g86cb4df6568335017cf57c0ef8a91a96">apr_socket_atmark</a>(apr_socket_t *sock, 
<a name="l00649"></a>00649                                             <span class="keywordtype">int</span> *atmark);
<a name="l00650"></a>00650 <span class="comment"></span>
<a name="l00651"></a>00651 <span class="comment">/**</span>
<a name="l00652"></a>00652 <span class="comment"> * Return an apr_sockaddr_t from an apr_socket_t</span>
<a name="l00653"></a>00653 <span class="comment"> * @param sa The returned apr_sockaddr_t.</span>
<a name="l00654"></a>00654 <span class="comment"> * @param which Which interface do we want the apr_sockaddr_t for?</span>
<a name="l00655"></a>00655 <span class="comment"> * @param sock The socket to use</span>
<a name="l00656"></a>00656 <span class="comment"> */</span>
<a name="l00657"></a>00657 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g536f11791135df0ea2ed88507373b6d1">apr_socket_addr_get</a>(<a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> **sa,
<a name="l00658"></a>00658                                               apr_interface_e which,
<a name="l00659"></a>00659                                               apr_socket_t *sock);
<a name="l00660"></a>00660  <span class="comment"></span>
<a name="l00661"></a>00661 <span class="comment">/**</span>
<a name="l00662"></a>00662 <span class="comment"> * Return the IP address (in numeric address string format) in</span>
<a name="l00663"></a>00663 <span class="comment"> * an APR socket address.  APR will allocate storage for the IP address </span>
<a name="l00664"></a>00664 <span class="comment"> * string from the pool of the apr_sockaddr_t.</span>
<a name="l00665"></a>00665 <span class="comment"> * @param addr The IP address.</span>
<a name="l00666"></a>00666 <span class="comment"> * @param sockaddr The socket address to reference.</span>
<a name="l00667"></a>00667 <span class="comment"> */</span>
<a name="l00668"></a>00668 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g70b103b46340fccb98bb4f8af9d13706">apr_sockaddr_ip_get</a>(<span class="keywordtype">char</span> **addr, 
<a name="l00669"></a>00669                                               <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *sockaddr);
<a name="l00670"></a>00670 <span class="comment"></span>
<a name="l00671"></a>00671 <span class="comment">/**</span>
<a name="l00672"></a>00672 <span class="comment"> * See if the IP addresses in two APR socket addresses are</span>
<a name="l00673"></a>00673 <span class="comment"> * equivalent.  Appropriate logic is present for comparing</span>
<a name="l00674"></a>00674 <span class="comment"> * IPv4-mapped IPv6 addresses with IPv4 addresses.</span>
<a name="l00675"></a>00675 <span class="comment"> *</span>
<a name="l00676"></a>00676 <span class="comment"> * @param addr1 One of the APR socket addresses.</span>
<a name="l00677"></a>00677 <span class="comment"> * @param addr2 The other APR socket address.</span>
<a name="l00678"></a>00678 <span class="comment"> * @remark The return value will be non-zero if the addresses</span>
<a name="l00679"></a>00679 <span class="comment"> * are equivalent.</span>
<a name="l00680"></a>00680 <span class="comment"> */</span>
<a name="l00681"></a>00681 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group__apr__network__io.html#g53d6f1ad12014a6eaadec47788598e95">apr_sockaddr_equal</a>(const <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *addr1,
<a name="l00682"></a>00682                                     const <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *addr2);
<a name="l00683"></a>00683 <span class="comment"></span>
<a name="l00684"></a>00684 <span class="comment">/**</span>
<a name="l00685"></a>00685 <span class="comment">* Return the type of the socket.</span>
<a name="l00686"></a>00686 <span class="comment">* @param sock The socket to query.</span>
<a name="l00687"></a>00687 <span class="comment">* @param type The returned type (e.g., SOCK_STREAM).</span>
<a name="l00688"></a>00688 <span class="comment">*/</span>
<a name="l00689"></a>00689 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g28a21515a7294163fb51aeb06b91de0a">apr_socket_type_get</a>(apr_socket_t *sock,
<a name="l00690"></a>00690                                               <span class="keywordtype">int</span> *type);
<a name="l00691"></a>00691  <span class="comment"></span>
<a name="l00692"></a>00692 <span class="comment">/**</span>
<a name="l00693"></a>00693 <span class="comment"> * Given an apr_sockaddr_t and a service name, set the port for the service</span>
<a name="l00694"></a>00694 <span class="comment"> * @param sockaddr The apr_sockaddr_t that will have its port set</span>
<a name="l00695"></a>00695 <span class="comment"> * @param servname The name of the service you wish to use</span>
<a name="l00696"></a>00696 <span class="comment"> */</span>
<a name="l00697"></a>00697 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g1e697618a95a53b61907c15fe21757af">apr_getservbyname</a>(<a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *sockaddr, 
<a name="l00698"></a>00698                                             const <span class="keywordtype">char</span> *servname);<span class="comment"></span>
<a name="l00699"></a>00699 <span class="comment">/**</span>
<a name="l00700"></a>00700 <span class="comment"> * Build an ip-subnet representation from an IP address and optional netmask or</span>
<a name="l00701"></a>00701 <span class="comment"> * number-of-bits.</span>
<a name="l00702"></a>00702 <span class="comment"> * @param ipsub The new ip-subnet representation</span>
<a name="l00703"></a>00703 <span class="comment"> * @param ipstr The input IP address string</span>
<a name="l00704"></a>00704 <span class="comment"> * @param mask_or_numbits The input netmask or number-of-bits string, or NULL</span>
<a name="l00705"></a>00705 <span class="comment"> * @param p The pool to allocate from</span>
<a name="l00706"></a>00706 <span class="comment"> */</span>
<a name="l00707"></a>00707 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g136368c48ec6828e2bb12972aae3636c">apr_ipsubnet_create</a>(apr_ipsubnet_t **ipsub, 
<a name="l00708"></a>00708                                               const <span class="keywordtype">char</span> *ipstr, 
<a name="l00709"></a>00709                                               const <span class="keywordtype">char</span> *mask_or_numbits, 
<a name="l00710"></a>00710                                               <a class="code" href="group__apr__pools.html#g06f17a7732f2d04d8ce7010fbb057a8b">apr_pool_t</a> *p);
<a name="l00711"></a>00711 <span class="comment"></span>
<a name="l00712"></a>00712 <span class="comment">/**</span>
<a name="l00713"></a>00713 <span class="comment"> * Test the IP address in an apr_sockaddr_t against a pre-built ip-subnet</span>
<a name="l00714"></a>00714 <span class="comment"> * representation.</span>
<a name="l00715"></a>00715 <span class="comment"> * @param ipsub The ip-subnet representation</span>
<a name="l00716"></a>00716 <span class="comment"> * @param sa The socket address to test</span>
<a name="l00717"></a>00717 <span class="comment"> * @return non-zero if the socket address is within the subnet, 0 otherwise</span>
<a name="l00718"></a>00718 <span class="comment"> */</span>
<a name="l00719"></a>00719 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group__apr__network__io.html#gb86bb3ff3daaed06958d22ec13820786">apr_ipsubnet_test</a>(apr_ipsubnet_t *ipsub, <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *sa);
<a name="l00720"></a>00720 
<a name="l00721"></a>00721 <span class="preprocessor">#if APR_HAS_SO_ACCEPTFILTER || defined(DOXYGEN)</span>
<a name="l00722"></a>00722 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00723"></a>00723 <span class="comment"> * Set an OS level accept filter.</span>
<a name="l00724"></a>00724 <span class="comment"> * @param sock The socket to put the accept filter on.</span>
<a name="l00725"></a>00725 <span class="comment"> * @param name The accept filter</span>
<a name="l00726"></a>00726 <span class="comment"> * @param args Any extra args to the accept filter.  Passing NULL here removes</span>
<a name="l00727"></a>00727 <span class="comment"> *             the accept filter. </span>
<a name="l00728"></a>00728 <span class="comment"> */</span>
<a name="l00729"></a>00729 <a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a> <a class="code" href="group__apr__network__io.html#gf67e8c4895bb7d3842cbb673e79576a8">apr_socket_accept_filter</a>(apr_socket_t *sock, <span class="keywordtype">char</span> *name,
<a name="l00730"></a>00730                                       <span class="keywordtype">char</span> *args);
<a name="l00731"></a>00731 <span class="preprocessor">#endif</span>
<a name="l00732"></a>00732 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00733"></a>00733 <span class="comment">/**</span>
<a name="l00734"></a>00734 <span class="comment"> * Return the protocol of the socket.</span>
<a name="l00735"></a>00735 <span class="comment"> * @param sock The socket to query.</span>
<a name="l00736"></a>00736 <span class="comment"> * @param protocol The returned protocol (e.g., APR_PROTO_TCP).</span>
<a name="l00737"></a>00737 <span class="comment"> */</span>
<a name="l00738"></a>00738 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__network__io.html#g42684e8ab27d8e8068a6ca2a21d49432">apr_socket_protocol_get</a>(apr_socket_t *sock,
<a name="l00739"></a>00739                                                   <span class="keywordtype">int</span> *protocol);
<a name="l00740"></a>00740 <span class="comment"></span>
<a name="l00741"></a>00741 <span class="comment">/**</span>
<a name="l00742"></a>00742 <span class="comment"> * Get the pool used by the socket.</span>
<a name="l00743"></a>00743 <span class="comment"> */</span>
<a name="l00744"></a>00744 <a class="code" href="group__apr__pools.html#g6dda96940d296b27a1bc98d9f49735e4">APR_POOL_DECLARE_ACCESSOR</a>(socket);
<a name="l00745"></a>00745 <span class="comment"></span>
<a name="l00746"></a>00746 <span class="comment">/**</span>
<a name="l00747"></a>00747 <span class="comment"> * Set a socket to be inherited by child processes.</span>
<a name="l00748"></a>00748 <span class="comment"> */</span>
<a name="l00749"></a>00749 <a class="code" href="apr__inherit_8h.html#e2bb81607ba73c6731ab69050d8e1e28">APR_DECLARE_INHERIT_SET</a>(socket);
<a name="l00750"></a>00750 <span class="comment"></span>
<a name="l00751"></a>00751 <span class="comment">/**</span>
<a name="l00752"></a>00752 <span class="comment"> * Unset a socket from being inherited by child processes.</span>
<a name="l00753"></a>00753 <span class="comment"> */</span>
<a name="l00754"></a>00754 <a class="code" href="apr__inherit_8h.html#899e9375ba3f5b0d3671a0e06268708b">APR_DECLARE_INHERIT_UNSET</a>(socket);
<a name="l00755"></a>00755 <span class="comment"></span>
<a name="l00756"></a>00756 <span class="comment">/**</span>
<a name="l00757"></a>00757 <span class="comment"> * @defgroup apr_mcast IP Multicast</span>
<a name="l00758"></a>00758 <span class="comment"> * @{</span>
<a name="l00759"></a>00759 <span class="comment"> */</span>
<a name="l00760"></a>00760 <span class="comment"></span>
<a name="l00761"></a>00761 <span class="comment">/**</span>
<a name="l00762"></a>00762 <span class="comment"> * Join a Multicast Group</span>
<a name="l00763"></a>00763 <span class="comment"> * @param sock The socket to join a multicast group</span>
<a name="l00764"></a>00764 <span class="comment"> * @param join The address of the multicast group to join</span>
<a name="l00765"></a>00765 <span class="comment"> * @param iface Address of the interface to use.  If NULL is passed, the </span>
<a name="l00766"></a>00766 <span class="comment"> *              default multicast interface will be used. (OS Dependent)</span>
<a name="l00767"></a>00767 <span class="comment"> * @param source Source Address to accept transmissions from (non-NULL </span>
<a name="l00768"></a>00768 <span class="comment"> *               implies Source-Specific Multicast)</span>
<a name="l00769"></a>00769 <span class="comment"> */</span>
<a name="l00770"></a>00770 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__mcast.html#g236b9f9340b325a68909aaadc457098a">apr_mcast_join</a>(apr_socket_t *sock,
<a name="l00771"></a>00771                                          <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *join,
<a name="l00772"></a>00772                                          <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *iface,
<a name="l00773"></a>00773                                          <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *source);
<a name="l00774"></a>00774 <span class="comment"></span>
<a name="l00775"></a>00775 <span class="comment">/**</span>
<a name="l00776"></a>00776 <span class="comment"> * Leave a Multicast Group.  All arguments must be the same as</span>
<a name="l00777"></a>00777 <span class="comment"> * apr_mcast_join.</span>
<a name="l00778"></a>00778 <span class="comment"> * @param sock The socket to leave a multicast group</span>
<a name="l00779"></a>00779 <span class="comment"> * @param addr The address of the multicast group to leave</span>
<a name="l00780"></a>00780 <span class="comment"> * @param iface Address of the interface to use.  If NULL is passed, the </span>
<a name="l00781"></a>00781 <span class="comment"> *              default multicast interface will be used. (OS Dependent)</span>
<a name="l00782"></a>00782 <span class="comment"> * @param source Source Address to accept transmissions from (non-NULL </span>
<a name="l00783"></a>00783 <span class="comment"> *               implies Source-Specific Multicast)</span>
<a name="l00784"></a>00784 <span class="comment"> */</span>
<a name="l00785"></a>00785 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__mcast.html#gd4514eaf1c3c1eee2601d925b7f30641">apr_mcast_leave</a>(apr_socket_t *sock,
<a name="l00786"></a>00786                                           <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *addr,
<a name="l00787"></a>00787                                           <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *iface,
<a name="l00788"></a>00788                                           <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *source);
<a name="l00789"></a>00789 <span class="comment"></span>
<a name="l00790"></a>00790 <span class="comment">/**</span>
<a name="l00791"></a>00791 <span class="comment"> * Set the Multicast Time to Live (ttl) for a multicast transmission.</span>
<a name="l00792"></a>00792 <span class="comment"> * @param sock The socket to set the multicast ttl</span>
<a name="l00793"></a>00793 <span class="comment"> * @param ttl Time to live to Assign. 0-255, default=1</span>
<a name="l00794"></a>00794 <span class="comment"> * @remark If the TTL is 0, packets will only be seen by sockets on </span>
<a name="l00795"></a>00795 <span class="comment"> * the local machine, and only when multicast loopback is enabled.</span>
<a name="l00796"></a>00796 <span class="comment"> */</span>
<a name="l00797"></a>00797 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__mcast.html#g35b06cc57a1546a028b68b924abe5946">apr_mcast_hops</a>(apr_socket_t *sock,
<a name="l00798"></a>00798                                          apr_byte_t ttl);
<a name="l00799"></a>00799 <span class="comment"></span>
<a name="l00800"></a>00800 <span class="comment">/**</span>
<a name="l00801"></a>00801 <span class="comment"> * Toggle IP Multicast Loopback</span>
<a name="l00802"></a>00802 <span class="comment"> * @param sock The socket to set multicast loopback</span>
<a name="l00803"></a>00803 <span class="comment"> * @param opt 0=disable, 1=enable</span>
<a name="l00804"></a>00804 <span class="comment"> */</span>
<a name="l00805"></a>00805 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__mcast.html#gb72f85a7e10904aac1e230956b51370c">apr_mcast_loopback</a>(apr_socket_t *sock,
<a name="l00806"></a>00806                                              apr_byte_t opt);
<a name="l00807"></a>00807 
<a name="l00808"></a>00808 <span class="comment"></span>
<a name="l00809"></a>00809 <span class="comment">/**</span>
<a name="l00810"></a>00810 <span class="comment"> * Set the Interface to be used for outgoing Multicast Transmissions.</span>
<a name="l00811"></a>00811 <span class="comment"> * @param sock The socket to set the multicast interface on</span>
<a name="l00812"></a>00812 <span class="comment"> * @param iface Address of the interface to use for Multicast</span>
<a name="l00813"></a>00813 <span class="comment"> */</span>
<a name="l00814"></a>00814 <a class="code" href="group__apr__platform.html#g4a5cbc739c4e19ab450020163d0899d4">APR_DECLARE</a>(<a class="code" href="group__apr__errno.html#g4cf2ddae3efce70c508ac7fefc1c47f7">apr_status_t</a>) <a class="code" href="group__apr__mcast.html#g2bd1fd3502ba10f93f1f76b01b37b74d">apr_mcast_interface</a>(apr_socket_t *sock,
<a name="l00815"></a>00815                                               <a class="code" href="group__apr__network__io.html#g768f3e3b956629c3e40c4f9297dbe78d">apr_sockaddr_t</a> *iface);
<a name="l00816"></a>00816 <span class="comment"></span>
<a name="l00817"></a>00817 <span class="comment">/** @} */</span>
<a name="l00818"></a>00818 <span class="comment"></span>
<a name="l00819"></a>00819 <span class="comment">/** @} */</span>
<a name="l00820"></a>00820 
<a name="l00821"></a>00821 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00822"></a>00822 <span class="preprocessor"></span>}
<a name="l00823"></a>00823 <span class="preprocessor">#endif</span>
<a name="l00824"></a>00824 <span class="preprocessor"></span>
<a name="l00825"></a>00825 <span class="preprocessor">#endif  </span><span class="comment">/* ! APR_NETWORK_IO_H */</span>
<a name="l00826"></a>00826 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue May 31 12:20:26 2011 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>