📄 structtcb.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>tcb struct Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center><hr><h1>tcb Struct Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>This structure holds various fields used to keep track of TCP socket states, settings and event listener function. It is needed to ensure proper operation of TCP state machine and TCP connections based on it. <p><p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00589">589</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</a>.<table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Data Fields</h2></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="structtcb.html#m0">state</a></td></tr><tr><td> </td><td><font size=-1><em>State of the TCP socket [entry].</em> <a href="#m0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="structtcb.html#m1">type</a></td></tr><tr><td> </td><td><font size=-1><em>type of the TCP socket</em> <a href="#m1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="structtcb.html#m2">flags</a></td></tr><tr><td nowrap align=right valign=top>UINT32 </td><td valign=bottom><a class="el" href="structtcb.html#m3">rem_ip</a></td></tr><tr><td nowrap align=right valign=top>UINT16 </td><td valign=bottom><a class="el" href="structtcb.html#m4">remport</a></td></tr><tr><td nowrap align=right valign=top>UINT16 </td><td valign=bottom><a class="el" href="structtcb.html#m5">locport</a></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="structtcb.html#m7">myflags</a></td></tr><tr><td nowrap align=right valign=top>UINT16 </td><td valign=bottom><a class="el" href="structtcb.html#m10">tout</a></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="structtcb.html#m11">tos</a></td></tr><tr><td nowrap align=right valign=top>UINT16 </td><td valign=bottom><a class="el" href="structtcb.html#m13">persist_timerh</a></td></tr><tr><td nowrap align=right valign=top>UINT16 </td><td valign=bottom><a class="el" href="structtcb.html#m14">retransmit_timerh</a></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="structtcb.html#m15">retries_left</a></td></tr><tr><td nowrap align=right valign=top>INT32(* </td><td valign=bottom><a class="el" href="structtcb.html#m16">event_listener</a> )(INT8, UINT8, UINT32, UINT32)</td></tr><tr><td> </td><td><font size=-1><em>TCP socket application event listener.</em> <a href="#m16"></a><em></em></font><br><br></td></tr></table><hr><h2>Field Documentation</h2><a name="m0" doxytag="tcb::state"></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"> UINT8 tcb::state </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This variable holds information used by the OpenTCP to manage sockets as well as information needed to manage TCP connection. Possible values are: <ul><li> TCP_STATE_FREE <li> TCP_STATE_RESERVED <li> TCP_STATE_CLOSED <li> TCP_STATE_LISTENING <li> TCP_STATE_SYN_RECEIVED <li> TCP_STATE_SYN_SENT <li> TCP_STATE_FINW1 <li> TCP_STATE_FINW2 <li> TCP_STATE_CLOSING <li> TCP_STATE_LAST_ACK <li> TCP_STATE_TIMED_WAIT <li> TCP_STATE_CONNECTED </ul><p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00609">609</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</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#l00690">tcp_checksend()</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#l02511">tcp_getfreeport()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l00648">tcp_getstate()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, <a class="el" href="tcp_8c-source.html#l00290">tcp_listen()</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#l00808">tcp_poll()</a>, <a class="el" href="tcp_8c-source.html#l00228">tcp_releasesocket()</a>, and <a class="el" href="tcp_8c-source.html#l00481">tcp_send()</a>. </td> </tr></table><a name="m1" doxytag="tcb::type"></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"> UINT8 tcb::type </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Defines type of the TCP socket allocated. This determines how connection is established/closed in some cases. Possible values are: <ul><li> TCP_TYPE_NONE <li> TCP_TYPE_SERVER <li> TCP_TYPE_CLIENT <li> TCP_TYPE_CLIENT_SERVER </ul><p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00621">621</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</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#l00377">tcp_connect()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, <a class="el" href="tcp_8c-source.html#l00290">tcp_listen()</a>, <a class="el" href="tcp_8c-source.html#l00808">tcp_poll()</a>, and <a class="el" href="tcp_8c-source.html#l00228">tcp_releasesocket()</a>. </td> </tr></table><a name="m2" doxytag="tcb::flags"></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"> UINT8 tcb::flags </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>State machine flags <p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00622">622</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</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#l00549">tcp_close()</a>, <a class="el" href="tcp_8c-source.html#l00377">tcp_connect()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, <a class="el" href="tcp_8c-source.html#l00290">tcp_listen()</a>, <a class="el" href="tcp_8c-source.html#l00808">tcp_poll()</a>, and <a class="el" href="tcp_8c-source.html#l00228">tcp_releasesocket()</a>. </td> </tr></table><a name="m3" doxytag="tcb::rem_ip"></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 tcb::rem_ip </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Remote IP address <p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00623">623</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</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#l02119">process_tcp_out()</a>, <a class="el" href="tcp_8c-source.html#l00377">tcp_connect()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, <a class="el" href="tcp_8c-source.html#l00290">tcp_listen()</a>, <a class="el" href="tcp_8c-source.html#l02369">tcp_mapsocket()</a>, <a class="el" href="tcp_8c-source.html#l00808">tcp_poll()</a>, <a class="el" href="tcp_8c-source.html#l00228">tcp_releasesocket()</a>, and <a class="el" href="tcp_8c-source.html#l02294">tcp_sendreset()</a>. </td> </tr></table><a name="m4" doxytag="tcb::remport"></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"> UINT16 tcb::remport </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Remote TCP port <p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00624">624</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</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#l02119">process_tcp_out()</a>, <a class="el" href="tcp_8c-source.html#l00377">tcp_connect()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, <a class="el" href="tcp_8c-source.html#l00290">tcp_listen()</a>, <a class="el" href="tcp_8c-source.html#l02369">tcp_mapsocket()</a>, <a class="el" href="tcp_8c-source.html#l00808">tcp_poll()</a>, <a class="el" href="tcp_8c-source.html#l00228">tcp_releasesocket()</a>, and <a class="el" href="tcp_8c-source.html#l02294">tcp_sendreset()</a>. </td> </tr></table><a name="m5" doxytag="tcb::locport"></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"> UINT16 tcb::locport </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Local TCP port <p>Definition at line <a class="el" href="tcp__ip_8h-source.html#l00625">625</a> of file <a class="el" href="tcp__ip_8h-source.html">tcp_ip.h</a>.<p>Referenced by <a class="el" href="tcp_8c-source.html#l02119">process_tcp_out()</a>, <a class="el" href="tcp_8c-source.html#l00377">tcp_connect()</a>, <a class="el" href="tcp_8c-source.html#l02511">tcp_getfreeport()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, <a class="el" href="tcp_8c-source.html#l00290">tcp_listen()</a>, <a class="el" href="tcp_8c-source.html#l02369">tcp_mapsocket()</a>, <a class="el" href="tcp_8c-source.html#l00228">tcp_releasesocket()</a>, and <a class="el" href="tcp_8c-source.html#l02294">tcp_sendreset()</a>. </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -