📄 arplib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/arpLib.html - generated by refgen from arpLib.c --> <title> arpLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>arpLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>arpLib</strong> - Address Resolution Protocol (ARP) table manipulation library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./arpLib.html#arpAdd">arpAdd</a></i>( )</b> - add an entry to the system ARP table<br><b><i><a href="./arpLib.html#arpDelete">arpDelete</a></i>( )</b> - delete an entry from the system ARP table<br><b><i><a href="./arpLib.html#arpFlush">arpFlush</a></i>( )</b> - flush all entries in the system ARP table<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides functionality for manipulating the system AddressResolution Protocol (ARP) table (cache). ARP is used by the networkingmodules to map dynamically between Internet Protocol (IP) addresses andphysical hardware (Ethernet) addresses. Once these addresses get resolved,they are stored in the system ARP table.<p>Two routines allow the caller to modify this ARP table manually: <b><i><a href="./arpLib.html#arpAdd">arpAdd</a></i>( )</b>and <b><i><a href="./arpLib.html#arpDelete">arpDelete</a></i>( )</b>. Use <b><i><a href="./arpLib.html#arpAdd">arpAdd</a></i>( )</b> to add new or modify existing entries inthe ARP table. Use <b><i><a href="./arpLib.html#arpDelete">arpDelete</a></i>( )</b> to delete entries from the ARP table. Use<b><i><a href="./netShow.html#arpShow">arpShow</a></i>( )</b> to show current entries in the ARP table.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>arpLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./arpLib.html#top">arpLib</a></b>, <b><a href="./inetLib.html#top">inetLib</a></b>, <b><a href="./routeLib.html#top">routeLib</a></b>, <b><a href="./etherLib.html#top">etherLib</a></b>, <b><a href="./netShow.html#top">netShow</a></b>, <i>VxWorks Programmer's Guide: Network</i><hr><a name="arpAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>arpAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>arpAdd</i>( )</strong> - add an entry to the system ARP table</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS arpAdd ( char * host, /* host name or IP address */ char * eaddr, /* Ethernet address */ int flags /* ARP flags */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds a specified entry to the ARP table. <i>host</i> is a validhost name or Internet address. <i>eaddr</i> is the Ethernet address of thehost and has the form "x:x:x:x:x:x" where x is a hexadecimal numberbetween 0 and ff.<p>The <i>flags</i> parameter specifies the ARP flags for the entry;the following bits are settable:<dl><dt><b>ATF_PERM</b> (0x04)<dd>The <b>ATF_PERM</b> bit makes the ARP entry permanent. A permanent ARPentry does not time out as do normal ARP entries. <p><dt><b>ATF_PUBL</b> (0x08)<dd>The <b>ATF_PUBL</b> bit causes the entry to be published (i.e., this system responds to ARP requests for this entry, even though it is not the host). <p><dt><b>ATF_USETRAILERS</b> (0x10)<dd> The <b>ATF_USETRAILERS</b> bit indicates that trailer encapsulations can be sent to this host.<p></dl></blockquote><h4>EXAMPLE</h4><blockquote><p><p>* The following call creates a permanent ARP table entry for the host withIP address 90.0.0.3 and Ethernet address 0:80:f9:1:2:3:<pre> arpAdd ("90.0.0.3", "0:80:f9:1:2:3", 0x4)</pre>The following call adds an entry to the ARP table for host "myHost", withan Ethernet address of 0:80:f9:1:2:4; no flags are set for this entry:<pre> arpAdd ("myHost", "0:80:f9:1:2:4", 0)</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_arpLib_INVALID_ARGUMENT, S_arpLib_INVALID_FLAG</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./arpLib.html#top">arpLib</a></b><hr><a name="arpDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>arpDelete</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>arpDelete</i>( )</strong> - delete an entry from the system ARP table</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS arpDelete ( char * host /* host name or IP address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes an ARP table entry. <i>host</i> specifies the entry todelete and is a valid host name or Internet address.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> arpDelete ("91.0.0.3") arpDelete ("myHost")</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_arpLib_INVALID_ARGUMENT</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./arpLib.html#top">arpLib</a></b><hr><a name="arpFlush"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>arpFlush</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>arpFlush</i>( )</strong> - flush all entries in the system ARP table</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void arpFlush (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine flushes all non-permanent entries in the ARP cache.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./arpLib.html#top">arpLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -