⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a00150.html

📁 uip-1.0,give everyone who want.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Calculate the Internet checksum over a buffer. <p>The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.<p>See RFC1071.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>A pointer to the buffer over which the checksum is to be computed.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>The length of the buffer over which the checksum is to be computed.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The Internet checksum of the buffer. </dd></dl><p>Definition at line <a class="el" href="a00201.html#l00311">311</a> of file <a class="el" href="a00201.html">uip.c</a>.<p>References <a class="el" href="a00201.html#l01882">htons()</a>.    </td>  </tr></table><a class="anchor" name="g9c24fba2cd8f7f62accb0a0d5bbe4dad"></a><!-- doxytag: member="uip.c::uip_connect" ref="g9c24fba2cd8f7f62accb0a0d5bbe4dad" args="(uip_ipaddr_t *ripaddr, u16_t rport)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">struct <a class="el" href="a00088.html">uip_conn</a>* uip_connect           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00150.html#g1ef35301f43a5bbb9f89f07b5a36b9a0">uip_ipaddr_t</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>ripaddr</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>port</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Connect to a remote host using TCP. <p>This function is used to start a new connection to the specified port on the specied host. It allocates a new connection identifier, sets the connection to the SYN_SENT state and sets the retransmission timer to 0. This will cause a TCP SYN segment to be sent out the next time this connection is periodically processed, which usually is done within 0.5 seconds after the call to <a class="el" href="a00147.html#g8096b0c4b543dc408f4dd031ddae7240">uip_connect()</a>.<p><dl compact><dt><b>Note:</b></dt><dd>This function is avaliable only if support for active open has been configured by defining UIP_ACTIVE_OPEN to 1 in <a class="el" href="a00140.html">uipopt.h</a>.<p>Since this function requires the port number to be in network byte order, a conversion using <a class="el" href="a00148.html#g69a7a4951ff21b302267532c21ee78fc">HTONS()</a> or <a class="el" href="a00148.html#ga22b04cac8cf283ca12f028578bebc06">htons()</a> is necessary.</dd></dl><div class="fragment"><pre class="fragment"> <a class="code" href="a00150.html#g1ef35301f43a5bbb9f89f07b5a36b9a0">uip_ipaddr_t</a> ipaddr; <a class="code" href="a00148.html#g87f0b54ade0d159fba495089128a4932">uip_ipaddr</a>(&amp;ipaddr, 192,168,1,2); <a class="code" href="a00147.html#g8096b0c4b543dc408f4dd031ddae7240">uip_connect</a>(&amp;ipaddr, <a class="code" href="a00148.html#g69a7a4951ff21b302267532c21ee78fc">HTONS</a>(80));</pre></div><p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>ripaddr</em>&nbsp;</td><td>The IP address of the remote hot.</td></tr>    <tr><td valign="top"></td><td valign="top"><em>port</em>&nbsp;</td><td>A 16-bit port number in network byte order.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>A pointer to the uIP connection identifier for the new connection, or NULL if no connection could be allocated. </dd></dl><p>Definition at line <a class="el" href="a00201.html#l00407">407</a> of file <a class="el" href="a00201.html">uip.c</a>.<p>References <a class="el" href="a00201.html#l01882">htons()</a>, <a class="el" href="a00202.html#l01156">uip_conn::lport</a>, <a class="el" href="a00202.html#l01174">uip_conn::tcpstateflags</a>, <a class="el" href="a00202.html#l01372">UIP_CLOSED</a>, <a class="el" href="a00201.html#l00163">uip_conn</a>, <a class="el" href="a00201.html#l00166">uip_conns</a>, and <a class="el" href="a00206.html#l00245">UIP_CONNS</a>.<p>Referenced by <a class="el" href="a00174.html#l00233">smtp_send()</a>, and <a class="el" href="a00180.html#l00140">webclient_get()</a>.    </td>  </tr></table><a class="anchor" name="gc48ed5f0d27721ef62a3ed02a5ad8d2e"></a><!-- doxytag: member="uip.c::uip_init" ref="gc48ed5f0d27721ef62a3ed02a5ad8d2e" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void uip_init           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>uIP initialization function. <p>This function should be called at boot up to initilize the uIP TCP/IP stack. <p>Definition at line <a class="el" href="a00201.html#l00379">379</a> of file <a class="el" href="a00201.html">uip.c</a>.<p>References <a class="el" href="a00206.html#l00259">UIP_LISTENPORTS</a>.    </td>  </tr></table><a class="anchor" name="g2addf34c7d457c1a7899a7e2171ef1e9"></a><!-- doxytag: member="uip.h::uip_ipchksum" ref="g2addf34c7d457c1a7899a7e2171ef1e9" args="(void)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="a00153.html#g77570ac4fcab86864fa1916e55676da2">u16_t</a> uip_ipchksum           </td>          <td class="md

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -