📄 group__core__initializer.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>Initialization functions</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>Initialization functions</h1><hr><a name="_details"></a><h2>Detailed Description</h2>These are the functions that <b>MUST</b> be invoked at startup so that appropriate modules can work properly. Failure to do so may lead to difficult to find bugs and unexpected behaviour!<p>In general, all modules should be initialized starting from the most basic ones upwards. See <a class="el" href="main__demo_8c.html">main_demo.c</a> for an example startup procedure. <table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__core__initializer.html#a0">arp_init</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Initialize data structures for ARP processing.</em> <a href="#a0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__core__initializer.html#a1">NE2000Init</a> (UINT8 *mac)</td></tr><tr><td> </td><td><font size=-1><em>Initialize and configure RTL8019AS.</em> <a href="#a1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>INT8 </td><td valign=bottom><a class="el" href="group__core__initializer.html#a2">tcp_init</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Initialize TCP module.</em> <a href="#a2"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__core__initializer.html#a3">timer_pool_init</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Initialize timer pool.</em> <a href="#a3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>INT8 </td><td valign=bottom><a class="el" href="group__core__initializer.html#a4">udp_init</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Initialize UDP socket pool.</em> <a href="#a4"></a><em></em></font><br><br></td></tr></table><hr><h2>Function Documentation</h2><a name="a0" doxytag="arp.c::arp_init"></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 arp_init </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>01.11.2001 </dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> Invoke this function at start-up to properly initialize ARP cache subsystem.</ul></dl>Call this function to properly initialize ARP cache table and so that ARP allocates and initializes a timer for it's use. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a7">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="arp_8c-source.html#l00910">910</a> of file <a class="el" href="arp_8c-source.html">arp.c</a>.<p>References <a class="el" href="arp_8h-source.html#l00195">ARP_FIXED_IP</a>, <a class="el" href="arp_8h-source.html#l00185">ARP_FREE</a>, <a class="el" href="arp_8h-source.html#l00126">ARP_MAXRETRY</a>, <a class="el" href="arp_8h-source.html#l00188">ARP_RESOLVED</a>, <a class="el" href="arp_8h-source.html#l00196">ARP_TEMP_IP</a>, <a class="el" href="arp_8h-source.html#l00102">ARP_TIMEOUT</a>, <a class="el" href="arp_8c-source.html#l00094">arp_timer</a>, <a class="el" href="timers_8c-source.html#l00131">get_timer()</a>, <a class="el" href="arp_8h-source.html#l00175">arp_entry::hwadr</a>, <a class="el" href="timers_8c-source.html#l00194">init_timer()</a>, <a class="el" href="arp_8h-source.html#l00074">MAXHWALEN</a>, <a class="el" href="arp_8h-source.html#l00179">arp_entry::pradr</a>, <a class="el" href="arp_8h-source.html#l00168">arp_entry::retries</a>, <a class="el" href="arp_8h-source.html#l00157">arp_entry::state</a>, <a class="el" href="timers_8h-source.html#l00086">TIMERTIC</a>, <a class="el" href="arp_8h-source.html#l00172">arp_entry::ttl</a>, and <a class="el" href="arp_8h-source.html#l00167">arp_entry::type</a>. </td> </tr></table><a name="a1" doxytag="ethernet.c::NE2000Init"></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 NE2000Init </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">UINT8 * </td> <td class="mdname1" valign="top" nowrap> <em>mac</em> </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>19.02.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>mac</em> </td><td>Pointer to NIC's hardware address</td></tr></table></dl>Invoke this function at startup to properly initialize NIC's registers, HW address and operation. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a6">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="ethernet_8c-source.html#l00327">327</a> of file <a class="el" href="ethernet_8c-source.html">ethernet.c</a>.<p>References <a class="el" href="ethernet_8h-source.html#l00088">BOUNDARY</a>, <a class="el" href="ethernet_8h-source.html#l00085">CR</a>, <a class="el" href="ethernet_8h-source.html#l00113">CURR</a>, <a class="el" href="ethernet_8h-source.html#l00102">DCR</a>, <a class="el" href="ethernet_8h-source.html#l00095">ISR</a>, <a class="el" href="ethernet_8c-source.html#l00080">NE2000CurrPktPtr</a>, <a class="el" href="ethernet_8c-source.html#l00079">NE2000NextPktPtr</a>, <a class="el" href="ethernet_8c-source.html#l00118">outNE2000()</a>, <a class="el" href="ethernet_8h-source.html#l00107">PAR0</a>, <a class="el" href="ethernet_8h-source.html#l00086">PSTART</a>, <a class="el" href="ethernet_8h-source.html#l00087">PSTOP</a>, <a class="el" href="ethernet_8h-source.html#l00100">RCR</a>, <a class="el" href="config_8h-source.html#l00104">RESETPIN_NE2000</a>, <a class="el" href="ethernet_8h-source.html#l00124">RXBUF_END</a>, <a class="el" href="ethernet_8h-source.html#l00123">RXBUF_START</a>, and <a class="el" href="ethernet_8h-source.html#l00101">TCR</a>. </td> </tr></table><a name="a2" doxytag="tcp_ip.h::tcp_init"></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_init </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>21.07.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - error <li> >0 - number of sockets initialized </ul></dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> This function <b>must</b> be invoked at startup before any other TCP functions are invoked.</ul></dl>This function initializes all sockets and corresponding tcbs to known state. Timers are also allocated for each socket and everything is brought to a predefined state. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a9">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="tcp_8c-source.html#l01154">1154</a> of file <a class="el" href="tcp_8c-source.html">tcp.c</a>.<p>References <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#l00131">get_timer()</a>, <a class="el" href="timers_8c-source.html#l00194">init_timer()</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#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#l00609">tcb::state</a>, <a class="el" href="tcp__ip_8h-source.html#l00333">TCP_STATE_FREE</a>, <a class="el" href="tcp__ip_8h-source.html#l00300">TCP_TYPE_NONE</a>, <a class="el" href="tcp__ip_8h-source.html#l00631">tcb::tos</a>, <a class="el" href="tcp__ip_8h-source.html#l00630">tcb::tout</a>, and <a class="el" href="tcp__ip_8h-source.html#l00621">tcb::type</a>. </td> </tr></table><a name="a3" doxytag="timers.h::timer_pool_init"></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 timer_pool_init </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>18.07.2001 </dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> This function <b>must</b> be invoked at startup before any other timer function is used.</ul></dl>This function resets all timer counter to zero and initializes all timers to available (free) state. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a5">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="timers_8c-source.html#l00105">105</a> of file <a class="el" href="timers_8c-source.html">timers.c</a>.<p>References <a class="el" href="timers_8h-source.html#l00077">NUMTIMERS</a>, <a class="el" href="timers_8c.html#a2">timer_pool</a>, and <a class="el" href="system_8h-source.html#l00078">TRUE</a>. </td> </tr></table><a name="a4" doxytag="tcp_ip.h::udp_init"></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 udp_init </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>26.07.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - Error <li> >0 - Number of UDP sockets initialized </ul></dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> This function <b>must</b> be invoked before any other UDP-related function is called</ul></dl>This function initializes UDP socket pool to get everything into a known state at startup. <dl compact><dt><b>Examples: </b></dt><dd><a class="el" href="main__demo_8c-example.html#a8">main_demo.c</a>.</dl><p>Definition at line <a class="el" href="udp_8c-source.html#l00118">118</a> of file <a class="el" href="udp_8c-source.html">udp.c</a>.<p>References <a class="el" href="tcp__ip_8h-source.html#l00525">ucb::locport</a>, <a class="el" href="tcp__ip_8h-source.html#l00539">ucb::opts</a>, <a class="el" href="tcp__ip_8h-source.html#l00516">ucb::state</a>, <a class="el" href="tcp__ip_8h-source.html#l00523">ucb::tos</a>, <a class="el" href="tcp__ip_8h-source.html#l00140">UDP_OPT_CHECK_CS</a>, <a class="el" href="tcp__ip_8h-source.html#l00132">UDP_OPT_SEND_CS</a>, and <a class="el" href="tcp__ip_8h-source.html#l00249">UDP_STATE_FREE</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 + -