📄 group__periodic__functions.html
字号:
</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>19.07.2002 </dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> This function <b>must be</b> invoked periodically from the main loop. See <a class="el" href="main__demo_8c.html">main_demo.c</a> for an example.</ul></dl>This function checks all TCP sockets and performs various actions if timeouts occur. What kind of action is performed is defined by the state of the TCP socket. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a19">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="tcp_8c-source.html#l00808">808</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <a class="el" href="timers_8c-source.html#l00233">check_timer()</a>, <a class="el" href="structtcb.html#m16">tcb::event_listener</a>, <a class="el" href="tcp__ip_8h-source.html#l00622">tcb::flags</a>, <a class="el" href="timers_8c-source.html#l00194">init_timer()</a>, <a class="el" href="tcp__ip_8h-source.html#l00627">tcb::myflags</a>, <a class="el" href="tcp__ip_8h-source.html#l00633">tcb::persist_timerh</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#l00634">tcb::retransmit_timerh</a>, <a class="el" href="tcp__ip_8h-source.html#l00635">tcb::retries_left</a>, <a class="el" href="tcp__ip_8h-source.html#l00629">tcb::send_mtu</a>, <a class="el" href="tcp__ip_8h-source.html#l00628">tcb::send_next</a>, <a class="el" href="tcp__ip_8h-source.html#l00626">tcb::send_unacked</a>, <a class="el" href="tcp__ip_8h-source.html#l00609">tcb::state</a>, <a class="el" href="tcp__ip_8h-source.html#l00189">TCP_DEF_RETRY_TOUT</a>, <a class="el" href="tcp__ip_8h-source.html#l00418">TCP_EVENT_ABORT</a>, <a class="el" href="tcp__ip_8h-source.html#l00405">TCP_EVENT_CLOSE</a>, <a class="el" href="tcp__ip_8h-source.html#l00437">TCP_EVENT_REGENERATE</a>, <a class="el" href="tcp_8c-source.html#l02455">tcp_newstate()</a>, <a class="el" href="tcp_8c-source.html#l02253">tcp_sendcontrol()</a>, <a class="el" href="tcp__ip_8h-source.html#l00335">TCP_STATE_CLOSED</a>, <a class="el" href="tcp__ip_8h-source.html#l00353">TCP_STATE_CLOSING</a>, <a class="el" href="tcp__ip_8h-source.html#l00362">TCP_STATE_CONNECTED</a>, <a class="el" href="tcp__ip_8h-source.html#l00346">TCP_STATE_FINW1</a>, <a class="el" href="tcp__ip_8h-source.html#l00349">TCP_STATE_FINW2</a>, <a class="el" href="tcp__ip_8h-source.html#l00333">TCP_STATE_FREE</a>, <a class="el" href="tcp__ip_8h-source.html#l00356">TCP_STATE_LAST_ACK</a>, <a class="el" href="tcp__ip_8h-source.html#l00336">TCP_STATE_LISTENING</a>, <a class="el" href="tcp__ip_8h-source.html#l00334">TCP_STATE_RESERVED</a>, <a class="el" href="tcp__ip_8h-source.html#l00339">TCP_STATE_SYN_RECEIVED</a>, <a class="el" href="tcp__ip_8h-source.html#l00343">TCP_STATE_SYN_SENT</a>, <a class="el" href="tcp__ip_8h-source.html#l00359">TCP_STATE_TIMED_WAIT</a>, <a class="el" href="tcp__ip_8h-source.html#l00206">TCP_SYN_RETRY_TOUT</a>, <a class="el" href="tcp__ip_8h-source.html#l00310">TCP_TYPE_SERVER</a>, <a class="el" href="timers_8h-source.html#l00086">TIMERTIC</a>, and <a class="el" href="tcp__ip_8h-source.html#l00621">tcb::type</a>. </td> </tr></table><a name="a5" doxytag="tcp_ip.h::process_tcp_in"></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"> INT16 process_tcp_in </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>frame</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>UINT16 </td> <td class="mdname" nowrap> <em>len</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>frame</em> </td><td>pointer to received <a class="el" href="structip__frame.html">ip_frame</a> structure </td></tr><tr><td valign=top><em>len</em> </td><td>length of data contained in IP datagram (in bytes) </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - Error (packet not OK, or not TCP,or something else) <li> >0 - Packet OK</ul></dl>Invoke this function to process received TCP frames. See <a class="el" href="main__demo_8c.html">main_demo.c</a> for an example on how to accomplish this. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a15">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="tcp_8c-source.html#l01250">1250</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="ip_8h-source.html#l00126">ip_frame::buf_index</a>, <a class="el" href="tcp__ip_8h-source.html#l00575">tcp_frame::buf_index</a>, <a class="el" href="tcp__ip_8h-source.html#l00572">tcp_frame::checksum</a>, <a class="el" href="tcp__ip_8h-source.html#l00567">tcp_frame::dport</a>, <a class="el" href="structtcb.html#m16">tcb::event_listener</a>, <a class="el" href="tcp__ip_8h-source.html#l00622">tcb::flags</a>, <a class="el" href="tcp__ip_8h-source.html#l00570">tcp_frame::hlen_flags</a>, <a class="el" href="ip_8h-source.html#l00074">IP_TCP</a>, <a class="el" href="tcp__ip_8h-source.html#l00627">tcb::myflags</a>, <a class="el" href="system_8h-source.html#l00270">NETWORK_RECEIVE_INITIALIZE</a>, <a class="el" href="tcp__ip_8h-source.html#l00574">tcp_frame::opt</a>, <a class="el" href="ip_8h-source.html#l00121">ip_frame::protocol</a>, <a class="el" href="system_8h-source.html#l00210">RECEIVE_NETWORK_B</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="system_8h-source.html#l00163">RESET_SYSTEM</a>, <a class="el" href="tcp__ip_8h-source.html#l00628">tcb::send_next</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="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>, <a class="el" href="tcp_8c-source.html#l02567">tcp_check_cs()</a>, <a class="el" href="tcp__ip_8h-source.html#l00418">TCP_EVENT_ABORT</a>, <a class="el" href="tcp__ip_8h-source.html#l00428">TCP_EVENT_ACK</a>, <a class="el" href="tcp__ip_8h-source.html#l00405">TCP_EVENT_CLOSE</a>, <a class="el" href="tcp__ip_8h-source.html#l00397">TCP_EVENT_CONNECTED</a>, <a class="el" href="tcp__ip_8h-source.html#l00387">TCP_EVENT_CONREQ</a>, <a class="el" href="tcp__ip_8h-source.html#l00445">TCP_EVENT_DATA</a>, <a class="el" href="tcp_8c-source.html#l02346">tcp_initseq()</a>, <a class="el" href="tcp_8c-source.html#l02369">tcp_mapsocket()</a>, <a class="el" href="tcp_8c-source.html#l02455">tcp_newstate()</a>, <a class="el" href="tcp_8c-source.html#l02253">tcp_sendcontrol()</a>, <a class="el" href="tcp_8c-source.html#l02294">tcp_sendreset()</a>, <a class="el" href="tcp__ip_8h-source.html#l00335">TCP_STATE_CLOSED</a>, <a class="el" href="tcp__ip_8h-source.html#l00353">TCP_STATE_CLOSING</a>, <a class="el" href="tcp__ip_8h-source.html#l00362">TCP_STATE_CONNECTED</a>, <a class="el" href="tcp__ip_8h-source.html#l00346">TCP_STATE_FINW1</a>, <a class="el" href="tcp__ip_8h-source.html#l00349">TCP_STATE_FINW2</a>, <a class="el" href="tcp__ip_8h-source.html#l00333">TCP_STATE_FREE</a>, <a class="el" href="tcp__ip_8h-source.html#l00356">TCP_STATE_LAST_ACK</a>, <a class="el" href="tcp__ip_8h-source.html#l00336">TCP_STATE_LISTENING</a>, <a class="el" href="tcp__ip_8h-source.html#l00339">TCP_STATE_SYN_RECEIVED</a>, <a class="el" href="tcp__ip_8h-source.html#l00343">TCP_STATE_SYN_SENT</a>, <a class="el" href="tcp__ip_8h-source.html#l00359">TCP_STATE_TIMED_WAIT</a>, <a class="el" href="tcp__ip_8h-source.html#l00310">TCP_TYPE_SERVER</a>, <a class="el" href="tcp__ip_8h-source.html#l00621">tcb::type</a>, <a class="el" href="tcp__ip_8h-source.html#l00573">tcp_frame::urgent</a>, and <a class="el" href="tcp__ip_8h-source.html#l00571">tcp_frame::window</a>. </td> </tr></table><a name="a6" doxytag="tcp_ip.h::process_udp_in"></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"> INT16 process_udp_in </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>frame</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>UINT16 </td> <td class="mdname" nowrap> <em>len</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>15.07.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 IP frame structure </td></tr><tr><td valign=top><em>len</em> </td><td>length of data in bytes </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - Error (packet not UDP, header errror or no socket for it) <li> >0 - Packet OK</ul></dl>Invoke this function to process received UDP frames. See <a class="el" href="main__demo_8c.html">main_demo.c</a> for an example on how to accomplish this. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a14">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="udp_8c-source.html#l00550">550</a> of file <a class="el" href="udp_8c-source.html">udp.c</a>.<p>References <a class="el" href="ip_8h-source.html#l00126">ip_frame::buf_index</a>, <a class="el" href="tcp__ip_8h-source.html#l00494">udp_frame::buf_index</a>, <a class="el" href="tcp__ip_8h-source.html#l00493">udp_frame::checksum</a>, <a class="el" href="ip_8h-source.html#l00124">ip_frame::dip</a>, <a class="el" href="tcp__ip_8h-source.html#l00491">udp_frame::dport</a>, <a class="el" href="ip_8c-source.html#l00539">ip_checksum()</a>, <a class="el" href="ip_8h-source.html#l00073">IP_UDP</a>, <a class="el" href="tcp__ip_8h-source.html#l00525">ucb::locport</a>, <a class="el" href="system_8h-source.html#l00270">NETWORK_RECEIVE_INITIALIZE</a>, <a class="el" href="tcp__ip_8h-source.html#l00539">ucb::opts</a>, <a class="el" href="ip_8h-source.html#l00121">ip_frame::protocol</a>, <a class="el" href="system_8h-source.html#l00210">RECEIVE_NETWORK_B</a>, <a class="el" href="ip_8h-source.html#l00123">ip_frame::sip</a>, <a class="el" href="tcp__ip_8h-source.html#l00490">udp_frame::sport</a>, <a class="el" href="tcp__ip_8h-source.html#l00516">ucb::state</a>, <a class="el" href="tcp__ip_8h-source.html#l00492">udp_frame::tlen</a>, <a class="el" href="tcp__ip_8h-source.html#l00276">UDP_EVENT_DATA</a>, <a class="el" href="tcp__ip_8h-source.html#l00144">UDP_HLEN</a>, <a class="el" href="tcp__ip_8h-source.html#l00140">UDP_OPT_CHECK_CS</a>, and <a class="el" href="tcp__ip_8h-source.html#l00266">UDP_STATE_OPENED</a>. </td> </tr></table><hr><address style="align: right;"><small>Generated on Sun Aug 3 20:33:01 2003 for OpenTCP by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -