Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8df484ca79a7b6bb61e4a376e1506870 > files > 101

polarssl-devel-0.14.3-1.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>PolarSSL: polarssl/net.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PolarSSL</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">polarssl/net.h</div>  </div>
</div>
<div class="contents">
<a href="net_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef POLARSSL_NET_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_NET_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#define POLARSSL_ERR_NET_UNKNOWN_HOST                      -0x0F00</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_SOCKET_FAILED                     -0x0F10</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_CONNECT_FAILED                    -0x0F20</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_BIND_FAILED                       -0x0F30</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_LISTEN_FAILED                     -0x0F40</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_ACCEPT_FAILED                     -0x0F50</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_RECV_FAILED                       -0x0F60</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_SEND_FAILED                       -0x0F70</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_CONN_RESET                        -0x0F80</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_NET_TRY_AGAIN                         -0x0F90</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00041"></a>00041 <span class="preprocessor">#endif</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#a49c549b21517d6f905eb9845224f2773" title="Initiate a TCP connection with host:port.">net_connect</a>( <span class="keywordtype">int</span> *fd, <span class="keyword">const</span> <span class="keywordtype">char</span> *host, <span class="keywordtype">int</span> port );
<a name="l00056"></a>00056 
<a name="l00070"></a>00070 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#a070a7665a1c2c3a5dc4d78aeef0f29de" title="Create a listening socket on bind_ip:port. If bind_ip == NULL, all interfaces are binded...">net_bind</a>( <span class="keywordtype">int</span> *fd, <span class="keyword">const</span> <span class="keywordtype">char</span> *bind_ip, <span class="keywordtype">int</span> port );
<a name="l00071"></a>00071 
<a name="l00083"></a>00083 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#aa7c66d2cf24804b92805eb6e598a9763" title="Accept a connection from a remote client.">net_accept</a>( <span class="keywordtype">int</span> bind_fd, <span class="keywordtype">int</span> *client_fd, <span class="keywordtype">void</span> *client_ip );
<a name="l00084"></a>00084 
<a name="l00092"></a>00092 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#a3b9985eaba07798c6f4d655fba05bb1b" title="Set the socket blocking.">net_set_block</a>( <span class="keywordtype">int</span> fd );
<a name="l00093"></a>00093 
<a name="l00101"></a>00101 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#a8d15cfb98905e57d9f031a75d4c1dbbb" title="Set the socket non-blocking.">net_set_nonblock</a>( <span class="keywordtype">int</span> fd );
<a name="l00102"></a>00102 
<a name="l00111"></a>00111 <span class="keywordtype">void</span> <a class="code" href="net_8h.html#a2bcef97961f70e97e4cd9ec3ff16a6a6" title="Portable usleep helper.">net_usleep</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> usec );
<a name="l00112"></a>00112 
<a name="l00125"></a>00125 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#a5dd839ef7bffc7935ee2f5426d088a18" title="Read at most &#39;len&#39; characters. If no error occurs, the actual amount read is returned.">net_recv</a>( <span class="keywordtype">void</span> *ctx, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len );
<a name="l00126"></a>00126 
<a name="l00139"></a>00139 <span class="keywordtype">int</span> <a class="code" href="net_8h.html#a576b7b85869e541c405dab55bb6208b7" title="Write at most &#39;len&#39; characters. If no error occurs, the actual amount read is returned.">net_send</a>( <span class="keywordtype">void</span> *ctx, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> len );
<a name="l00140"></a>00140 
<a name="l00146"></a>00146 <span class="keywordtype">void</span> <a class="code" href="net_8h.html#a1b0cf7ff43e2f8edb76e2f4724732cc6" title="Gracefully shutdown the connection.">net_close</a>( <span class="keywordtype">int</span> fd );
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span>}
<a name="l00150"></a>00150 <span class="preprocessor">#endif</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span>
<a name="l00152"></a>00152 <span class="preprocessor">#endif </span><span class="comment">/* net.h */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Mon May 16 2011 for PolarSSL by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>