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

📄 arp_8h.html

📁 Freescale mcu OpenTCP-1.0.4.doc.html.zip 文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p>Definition at line <a class="el" href="arp_8h-source.html#l00195">195</a> of file <a class="el" href="arp_8h-source.html">arp.h</a>.<p>Referenced by <a class="el" href="arp_8c-source.html#l00552">arp_add()</a>, <a class="el" href="arp_8c-source.html#l00639">arp_find()</a>, <a class="el" href="arp_8c-source.html#l00910">arp_init()</a>, and <a class="el" href="arp_8c-source.html#l00785">arp_manage()</a>.    </td>  </tr></table><a name="a17" doxytag="arp.h::ARP_TEMP_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"> #define ARP_TEMP_IP&nbsp;&nbsp;&nbsp;1      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>For Temporary addresses. Entry is removed after ttl <p>Definition at line <a class="el" href="arp_8h-source.html#l00196">196</a> of file <a class="el" href="arp_8h-source.html">arp.h</a>.<p>Referenced by <a class="el" href="arp_8c-source.html#l00466">arp_alloc()</a>, <a class="el" href="arp_8c-source.html#l00910">arp_init()</a>, <a class="el" href="arp_8c-source.html#l00785">arp_manage()</a>, <a class="el" href="arp_8c-source.html#l00188">arp_send_response()</a>, <a class="el" href="ip_8c-source.html#l00115">process_ip_in()</a>, and <a class="el" href="ip_8c-source.html#l00300">process_ip_out()</a>.    </td>  </tr></table><hr><h2>Function Documentation</h2><a name="a18" doxytag="arp.h::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">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&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><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. <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="a20" doxytag="arp.h::arp_alloc"></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 arp_alloc </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">UINT8&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>type</em>          </td>          <td class="md" valign="top">)&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><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>1.11.2001 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>type</em>&nbsp;</td><td>Type of ARP cache entry beeing allocated. Can be one of the following: <ul><li> <a class="el" href="arp_8h.html#a16">ARP_FIXED_IP</a> <li> <a class="el" href="arp_8h.html#a17">ARP_TEMP_IP</a>  </ul></td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>&gt;=0 - pointer to allocated ARP entry (actaully index in the  ARP cache table)</dl>Allocate arp entry for given type. Chooses the unused entry if  one exists. Otherwice deletes entries in round-robin fashion. <p>Definition at line <a class="el" href="arp_8c-source.html#l00466">466</a> of file <a class="el" href="arp_8c-source.html">arp.c</a>.<p>References <a class="el" href="arp_8h-source.html#l00185">ARP_FREE</a>, <a class="el" href="arp_8h-source.html#l00186">ARP_RESERVED</a>, <a class="el" href="arp_8h-source.html#l00196">ARP_TEMP_IP</a>, <a class="el" href="arp_8h-source.html#l00157">arp_entry::state</a>, and <a class="el" href="arp_8h-source.html#l00167">arp_entry::type</a>.<p>Referenced by <a class="el" href="arp_8c-source.html#l00552">arp_add()</a>, and <a class="el" href="arp_8c-source.html#l00639">arp_find()</a>.    </td>  </tr></table><a name="a21" doxytag="arp.h::arp_send_req"></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_send_req </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">UINT8&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>entry</em>          </td>          <td class="md" valign="top">)&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><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>1.11.2001 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>entry</em>&nbsp;</td><td>Index of ARP cache entry that is beeing resolved</td></tr></table></dl>Invoked from <a class="el" href="arp_8h.html#a22">arp_find()</a> and <a class="el" href="arp_8h.html#a23">arp_manage()</a> functions, arp_send_request creates ARP request packet based on data stored in the ARP cache entry who's index is given as a parameter. <p>Definition at line <a class="el" href="arp_8c-source.html#l00390">390</a> of file <a class="el" href="arp_8c-source.html">arp.c</a>.<p>References <a class="el" href="ethernet_8h-source.html#l00125">ARP_BUFFER</a>, <a class="el" href="arp_8h-source.html#l00074">MAXHWALEN</a>, <a class="el" href="arp_8h-source.html#l00075">MAXPRALEN</a>, <a class="el" href="system_8h-source.html#l00306">NETWORK_ADD_DATALINK</a>, <a class="el" href="system_8h-source.html#l00288">NETWORK_COMPLETE_SEND</a>, <a class="el" href="system_8h-source.html#l00296">NETWORK_SEND_INITIALIZE</a>, <a class="el" href="arp_8h-source.html#l00179">arp_entry::pradr</a>, <a class="el" href="ethernet_8h-source.html#l00081">PROTOCOL_ARP</a>, and <a class="el" href="system_8h-source.html#l00240">SEND_NETWORK_B</a>.<p>Referenced by <a class="el" href="arp_8c-source.html#l00639">arp_find()</a>, and <a class="el" href="arp_8c-source.html#l00785">arp_manage()</a>.    </td>  </tr></table><a name="a22" doxytag="arp.h::arp_find"></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"> struct <a class="el" href="structarp__entry.html">arp_entry</a>* arp_find </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">LWORD&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pra</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>machine</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>UINT8&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>type</em></td>        </tr>        <tr>          <td></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><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>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pra</em>&nbsp;</td><td>- Protocol address (IPv4) </td></tr><tr><td valign=top><em>machine</em>&nbsp;</td><td>- Pointer to configuration of network interface used </td></tr><tr><td valign=top><em>type</em>&nbsp;</td><td>- Type of address allocated if not found. Can be one of the following: <ul><li> <a class="el" href="arp_8h.html#a16">ARP_FIXED_IP</a> <li> <a class="el" href="arp_8h.html#a17">ARP_TEMP_IP</a> </ul></td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> 0 - ARP entry not found or not ready yet (waiting for ARP response) <li> struct <a class="el" href="structarp__entry.html">arp_entry</a>* - pointer to solved entry of ARP cache table</ul></dl>This function tries to resolve IPv4 address by checking the ARP cache table and sending ARP requested if needed. <p>Definition at line <a class="el" href="arp_8c-source.html#l00639">639</a> of file <a class="el" href="arp_8c-source.html">arp.c</a>.<p>References <a class="el" href="arp_8c-source.html#l00466">arp_alloc()</a>, <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#l00187">ARP_PENDING</a>, <a class="el" href="arp_8h-source.html#l00117">ARP_RESEND</a>, <a class="el" href="arp_8h-source.html#l00188">ARP_RESOLVED</a>, <a class="el" href="arp_8c-source.html#l00390">arp_send_req()</a>, <a class="el" href="arp_8h-source.html#l00175">arp_entry::hwadr</a>, <a class="el" href="arp_8c-source.html#l00960">is_subnet()</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>, and <a class="el" href="arp_8h-source.html#l00172">arp_entry::ttl</a>.<p>Referenced by <a class="el" href="ip_8c-source.html#l00300">process_ip_out()</a>.    </td>  </tr></table><a name="a23" doxytag="arp.h::arp_manage"></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_manage </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&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><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>04.11.2001 </dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> Invoke this function periodically to ensure proper ARP cache behaviour</ul></dl>Iterate through ARP cache aging entries. If timed-out entry is found, remove it (dynamic address) or update it (static address). This function must be called periodically by the system. <p>Definition at line <a class="el" href="arp_8c-source.html#l00785">785</a> of file <a class="el" href="arp_8c-source.html">arp.c</a>.

⌨️ 快捷键说明

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