| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=11"/> |
| <meta name="generator" content="Doxygen 1.12.0"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>lwIP: src/include/lwip/sockets.h File Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <script type="text/javascript" src="clipboard.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="navtreedata.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="cookie.js"></script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr id="projectrow"> |
| <td id="projectalign"> |
| <div id="projectname">lwIP<span id="projectnumber"> 2.1.3</span> |
| </div> |
| <div id="projectbrief">Lightweight IP stack</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.12.0 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| var searchBox = new SearchBox("searchBox", "search/",'.html'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| $(function() { codefold.init(0); }); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search',true); |
| $(function() { init_search(); }); |
| }); |
| /* @license-end */ |
| </script> |
| <div id="main-nav"></div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| $(function(){initNavTree('sockets_8h.html',''); initResizable(true); }); |
| /* @license-end */ |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <div id="MSearchResults"> |
| <div class="SRPage"> |
| <div id="SRIndex"> |
| <div id="SRResults"></div> |
| <div class="SRStatus" id="Loading">Loading...</div> |
| <div class="SRStatus" id="Searching">Searching...</div> |
| <div class="SRStatus" id="NoMatches">No Matches</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <div class="header"> |
| <div class="summary"> |
| <a href="#define-members">Macros</a> | |
| <a href="#func-members">Functions</a> </div> |
| <div class="headertitle"><div class="title">sockets.h File Reference</div></div> |
| </div><!--header--> |
| <div class="contents"> |
| <div class="textblock"><code>#include "<a class="el" href="opt_8h.html">lwip/opt.h</a>"</code><br /> |
| <code>#include "<a class="el" href="ip__addr_8h.html">lwip/ip_addr.h</a>"</code><br /> |
| <code>#include "<a class="el" href="netif_8h.html">lwip/netif.h</a>"</code><br /> |
| <code>#include "<a class="el" href="err_8h.html">lwip/err.h</a>"</code><br /> |
| <code>#include "<a class="el" href="lwip_2inet_8h.html">lwip/inet.h</a>"</code><br /> |
| <code>#include "<a class="el" href="lwip_2errno_8h.html">lwip/errno.h</a>"</code><br /> |
| <code>#include <string.h></code><br /> |
| </div><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a> |
| Macros</h2></td></tr> |
| <tr class="memitem:aaffd64f6887883ec6401e6bb684c40fa" id="r_aaffd64f6887883ec6401e6bb684c40fa"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="#aaffd64f6887883ec6401e6bb684c40fa">LWIP_TIMEVAL_PRIVATE</a>   1</td></tr> |
| <tr class="separator:aaffd64f6887883ec6401e6bb684c40fa"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a> |
| Functions</h2></td></tr> |
| <tr class="memitem:a0a250b3b4d1827e3a3661327f5e80ae0" id="r_a0a250b3b4d1827e3a3661327f5e80ae0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0a250b3b4d1827e3a3661327f5e80ae0">lwip_socket_thread_init</a> (void)</td></tr> |
| <tr class="separator:a0a250b3b4d1827e3a3661327f5e80ae0"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ab8cd92b10dbe3fb33da03faed1ea98a7" id="r_ab8cd92b10dbe3fb33da03faed1ea98a7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab8cd92b10dbe3fb33da03faed1ea98a7">lwip_socket_thread_cleanup</a> (void)</td></tr> |
| <tr class="separator:ab8cd92b10dbe3fb33da03faed1ea98a7"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ade85c68b6673296c8fb67127b93fa4c1" id="r_ade85c68b6673296c8fb67127b93fa4c1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ade85c68b6673296c8fb67127b93fa4c1">lwip_shutdown</a> (int s, int how)</td></tr> |
| <tr class="separator:ade85c68b6673296c8fb67127b93fa4c1"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:abee6ee286147cf334a1ba19f19b2e08b" id="r_abee6ee286147cf334a1ba19f19b2e08b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#abee6ee286147cf334a1ba19f19b2e08b">lwip_listen</a> (int s, int backlog)</td></tr> |
| <tr class="separator:abee6ee286147cf334a1ba19f19b2e08b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ae84296093574ec746f8f88321356388f" id="r_ae84296093574ec746f8f88321356388f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae84296093574ec746f8f88321356388f">lwip_fcntl</a> (int s, int cmd, int val)</td></tr> |
| <tr class="separator:ae84296093574ec746f8f88321356388f"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>Socket API (to be used from non-TCPIP threads) </p> |
| </div><h2 class="groupheader">Macro Definition Documentation</h2> |
| <a id="aaffd64f6887883ec6401e6bb684c40fa" name="aaffd64f6887883ec6401e6bb684c40fa"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#aaffd64f6887883ec6401e6bb684c40fa">◆ </a></span>LWIP_TIMEVAL_PRIVATE</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define LWIP_TIMEVAL_PRIVATE   1</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h </p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Function Documentation</h2> |
| <a id="ae84296093574ec746f8f88321356388f" name="ae84296093574ec746f8f88321356388f"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ae84296093574ec746f8f88321356388f">◆ </a></span>lwip_fcntl()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int lwip_fcntl </td> |
| <td>(</td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>s</em></span>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>cmd</em></span>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>val</em></span> )</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>A minimal implementation of fcntl. Currently only the commands F_GETFL and F_SETFL are implemented. The flag O_NONBLOCK and access modes are supported for F_GETFL, only the flag O_NONBLOCK is implemented for F_SETFL. </p> |
| |
| </div> |
| </div> |
| <a id="abee6ee286147cf334a1ba19f19b2e08b" name="abee6ee286147cf334a1ba19f19b2e08b"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#abee6ee286147cf334a1ba19f19b2e08b">◆ </a></span>lwip_listen()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int lwip_listen </td> |
| <td>(</td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>s</em></span>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>backlog</em></span> )</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Set a socket into listen mode. The socket may not have been used for another connection previously.</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">s</td><td>the socket to set to listening mode </td></tr> |
| <tr><td class="paramname">backlog</td><td>(ATTENTION: needs TCP_LISTEN_BACKLOG=1) </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>0 on success, non-zero on failure </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ade85c68b6673296c8fb67127b93fa4c1" name="ade85c68b6673296c8fb67127b93fa4c1"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ade85c68b6673296c8fb67127b93fa4c1">◆ </a></span>lwip_shutdown()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int lwip_shutdown </td> |
| <td>(</td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>s</em></span>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>how</em></span> )</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Close one end of a full-duplex connection. </p> |
| |
| </div> |
| </div> |
| <a id="ab8cd92b10dbe3fb33da03faed1ea98a7" name="ab8cd92b10dbe3fb33da03faed1ea98a7"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ab8cd92b10dbe3fb33da03faed1ea98a7">◆ </a></span>lwip_socket_thread_cleanup()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void lwip_socket_thread_cleanup </td> |
| <td>(</td> |
| <td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore </p> |
| |
| </div> |
| </div> |
| <a id="a0a250b3b4d1827e3a3661327f5e80ae0" name="a0a250b3b4d1827e3a3661327f5e80ae0"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a0a250b3b4d1827e3a3661327f5e80ae0">◆ </a></span>lwip_socket_thread_init()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void lwip_socket_thread_init </td> |
| <td>(</td> |
| <td class="paramtype">void</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore </p> |
| |
| </div> |
| </div> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_4e6b3cf33a61b6caac9c8ac30c866f37.html">lwip</a></li><li class="navelem"><a class="el" href="sockets_8h.html">sockets.h</a></li> |
| <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |