📄 tcp_8c.html
字号:
handle to socket</td></tr></table></dl>This function is used to initiate sending of a control (no data) TCP packet. Important thing in these packets are the flags and sequence numbers they carry. <p>Definition at line <a class="el" href="tcp_8c-source.html#l02253">2253</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp_8c-source.html#l02119">process_tcp_out()</a>, and <a class="el" href="tcp_8c-source.html#l00120">tcp_tempbuf</a>.<p>Referenced by <a class="el" href="tcp_8c-source.html#l01250">process_tcp_in()</a>, <a class="el" href="tcp_8c-source.html#l00736">tcp_abort()</a>, <a class="el" href="tcp_8c-source.html#l00549">tcp_close()</a>, <a class="el" href="tcp_8c-source.html#l00377">tcp_connect()</a>, <a class="el" href="tcp_8c-source.html#l00808">tcp_poll()</a>, and <a class="el" href="tcp_8c-source.html#l02294">tcp_sendreset()</a>. </td> </tr></table><a name="a17" doxytag="tcp.c::tcp_sendreset"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void tcp_sendreset </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">struct <a class="el" href="structtcp__frame.html">tcp_frame</a> * </td> <td class="mdname" nowrap> <em>frame</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>UINT32 </td> <td class="mdname" nowrap> <em>remip</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) <li> Vladan Jovanovic (<a href="mailto:vladan.jovanovic@violasystems.com">vladan.jovanovic@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>20.08.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>frame</em> </td><td>pointer to received TCP packet </td></tr><tr><td valign=top><em>remip</em> </td><td>remote IP address of packet</td></tr></table></dl>Uses socket <a class="el" href="group__opentcp__config.html#a5">NO_OF_TCPSOCKETS</a> to send a RESET packet to peer. This function is used when we are establishing connection but we receive something else than SYN or SYN+ACK when it's possible that the peer has still old connection on which needs to be resetted without canceling the connection establishment on process. <p>Definition at line <a class="el" href="tcp_8c-source.html#l02294">2294</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00569">tcp_frame::ackno</a>, <a class="el" href="tcp__ip_8h-source.html#l00567">tcp_frame::dport</a>, <a class="el" href="tcp__ip_8h-source.html#l00570">tcp_frame::hlen_flags</a>, <a class="el" href="tcp__ip_8h-source.html#l00625">tcb::locport</a>, <a class="el" href="tcp__ip_8h-source.html#l00627">tcb::myflags</a>, <a class="el" href="tcp__ip_8h-source.html#l00632">tcb::receive_next</a>, <a class="el" href="tcp__ip_8h-source.html#l00623">tcb::rem_ip</a>, <a class="el" href="tcp__ip_8h-source.html#l00624">tcb::remport</a>, <a class="el" href="tcp__ip_8h-source.html#l00629">tcb::send_mtu</a>, <a class="el" href="tcp__ip_8h-source.html#l00626">tcb::send_unacked</a>, <a class="el" href="tcp__ip_8h-source.html#l00568">tcp_frame::seqno</a>, <a class="el" href="tcp__ip_8h-source.html#l00566">tcp_frame::sport</a>, <a class="el" href="tcp_8c-source.html#l02253">tcp_sendcontrol()</a>, and <a class="el" href="tcp__ip_8h-source.html#l00631">tcb::tos</a>.<p>Referenced by <a class="el" href="tcp_8c-source.html#l01250">process_tcp_in()</a>. </td> </tr></table><a name="a18" doxytag="tcp.c::tcp_initseq"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT32 tcp_initseq </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>17.07.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd>UINT32 number containing initial sequence number to be used</dl>This function returns initial sequence number to be used in a TCP connection. For now, initial sequence number is selected based on base_timer value, which should be solid enough choice. <p>Definition at line <a class="el" href="tcp_8c-source.html#l02346">2346</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>Referenced by <a class="el" href="tcp_8c-source.html#l01250">process_tcp_in()</a>, and <a class="el" href="tcp_8c-source.html#l00377">tcp_connect()</a>. </td> </tr></table><a name="a19" doxytag="tcp.c::tcp_mapsocket"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> INT8 tcp_mapsocket </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">struct <a class="el" href="structip__frame.html">ip_frame</a> * </td> <td class="mdname" nowrap> <em>ipframe</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>struct <a class="el" href="structtcp__frame.html">tcp_frame</a> * </td> <td class="mdname" nowrap> <em>tcpframe</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>12.07.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>ipframe</em> </td><td>pointer to received IP frame </td></tr><tr><td valign=top><em>tcpframe</em> </td><td>pointer to received TCP frame to be mapped </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - Error (no resources or no socket found) <li> >=0 - Handle to mapped socket</ul></dl>Function iterates through socket table trying to find a socket for whom this TCP packet is intended. <p>Definition at line <a class="el" href="tcp_8c-source.html#l02369">2369</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00567">tcp_frame::dport</a>, <a class="el" href="tcp__ip_8h-source.html#l00570">tcp_frame::hlen_flags</a>, <a class="el" href="tcp__ip_8h-source.html#l00625">tcb::locport</a>, <a class="el" href="tcp__ip_8h-source.html#l00623">tcb::rem_ip</a>, <a class="el" href="tcp__ip_8h-source.html#l00624">tcb::remport</a>, <a class="el" href="ip_8h-source.html#l00123">ip_frame::sip</a>, <a class="el" href="tcp__ip_8h-source.html#l00566">tcp_frame::sport</a>, <a class="el" href="tcp__ip_8h-source.html#l00609">tcb::state</a>, and <a class="el" href="tcp__ip_8h-source.html#l00336">TCP_STATE_LISTENING</a>.<p>Referenced by <a class="el" href="tcp_8c-source.html#l01250">process_tcp_in()</a>. </td> </tr></table><a name="a20" doxytag="tcp.c::tcp_newstate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void tcp_newstate </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">struct <a class="el" href="structtcb.html">tcb</a> * </td> <td class="mdname" nowrap> <em>soc</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>UINT8 </td> <td class="mdname" nowrap> <em>nstate</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>18.07.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>soc</em> </td><td>pointer to socket st
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -