📄 proxyarplib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/proxyArpLib.html - generated by refgen from proxyArpLib.c --> <title> proxyArpLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>proxyArpLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyArpLib</strong> - proxy Address Resolution Protocol (ARP) server library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./proxyArpLib.html#proxyArpLibInit">proxyArpLibInit</a>( )</b> - initialize proxy ARP<br><b><a href="./proxyArpLib.html#proxyNetCreate">proxyNetCreate</a>( )</b> - create a proxy ARP network<br><b><a href="./proxyArpLib.html#proxyNetDelete">proxyNetDelete</a>( )</b> - delete a proxy network<br><b><a href="./proxyArpLib.html#proxyNetShow">proxyNetShow</a>( )</b> - show proxy ARP networks<br><b><a href="./proxyArpLib.html#proxyPortFwdOn">proxyPortFwdOn</a>( )</b> - enable broadcast forwarding for a particular port<br><b><a href="./proxyArpLib.html#proxyPortFwdOff">proxyPortFwdOff</a>( )</b> - disable broadcast forwarding for a particular port<br><b><a href="./proxyArpLib.html#proxyPortShow">proxyPortShow</a>( )</b> - show ports enabled for broadcast forwarding<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library implements a proxy ARP server that uses the Address ResolutionProtocol (ARP) to make physically distinct networks appear as one logicalnetwork (that is, the networks share the same address space). The serverforwards ARP messages between the separate networks so that hosts on themain network can access hosts on the proxy network without altering theirrouting tables.<p>The <b><a href="./proxyArpLib.html#proxyArpLibInit">proxyArpLibInit</a>( )</b> initializes the server and adds this library to theVxWorks image. This happens automatically if <b>INCLUDE_PROXY_SERVER</b> isdefined at the time the image is built. The <b><a href="./proxyArpLib.html#proxyNetCreate">proxyNetCreate</a>( )</b> and<b><a href="./proxyArpLib.html#proxyNetDelete">proxyNetDelete</a>( )</b> routines will enable and disable the forwarding of ARPmessages between networks. The <b><a href="./proxyArpLib.html#proxyNetShow">proxyNetShow</a>( )</b> routine displays the currentset of proxy networks and the main network and known clients for each.<p>By default, this server automatically adds a client when it first detectsan ARP message from that host. A VxWorks target can also register asa client with the <b><a href="./proxyLib.html#proxyReg">proxyReg</a>( )</b> routine and remove that registration withthe <b><a href="./proxyLib.html#proxyUnreg">proxyUnreg</a>( )</b> routine. See the <b><a href="./proxyLib.html#top">proxyLib</a></b> manual pages for details.<p>To minimize traffic on the main network, the proxy server will only forwardbroadcast packets to the specified destination ports visible with the<b><a href="./proxyArpLib.html#proxyPortShow">proxyPortShow</a>( )</b> routine. The <b><a href="./proxyArpLib.html#proxyPortFwdOn">proxyPortFwdOn</a>( )</b> and <b><a href="./proxyArpLib.html#proxyPortFwdOff">proxyPortFwdOff</a>( )</b> routineswill alter the current settings. Initially, broadcast forwarding is notactive for any ports.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>proxyArpLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyLib.html#top">proxyLib</a></b>, RFC 925, RFC 1027, RFC 826<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p><p>Under VxWorks AE, the functions you assign for either <b>proxyArpHook</b> or <b>proxyBroadcastHook</b> must be valid within the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks. <p>Structure Chart:<p><pre> v v proxyArpLibInit proxyNetShow (in_arpinput) v ----------------proxyArpInput------------------------------------------/ / | \ \ \ \ v | | | | || proxyArpReplyFwd------|---------------|--|---------------------|-------->| | v | | | |v | proxyArpRequestFwd---- -|--|---------------------|-------->proxyArpReply | / | | | | | | | | | | | v v v | | | | proxyArpSend | | | | | | | | | | | | (ipintr) | | | | v | | | | --proxyBroadcastInput-----------------|--> | | / | \ | | | | v ------ <-----------/ | (do_protocol) | |proxyBroadcast | | | v | | | | | proxyMsgInput-----> | |----/ | | | | | | | | | | | | | v | | | | | | proxyIsAMainNet | | | | | v | | /---/ | | |proxyNetCreate| | | | | | v | | | v | |proxyNetDelete| ----------------------|-proxyClientAdd| | v v / | v v | | proxyNetFind<-/ |proxyClientDelete| | v v | \ proxyClientFind<-/ ------------\ v | v vproxyPortFwdOn | proxyPortFwdOff proxyPortShow | | | | | \------------------>|<-------/<--------------------/ v v proxyPortPrint proxyPortTblFind</pre><hr><a name="proxyArpLibInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyArpLibInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyArpLibInit( )</strong> - initialize proxy ARP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS proxyArpLibInit ( int clientSizeLog2, /* client table size as power of two */ int portSizeLog2 /* port table size as power of two */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine starts the proxy ARP server by initializing the required datastructures and installing the necessary input hooks. It should be called<br> only once; subsequent calls have no effect. The <i>clientSizeLog2</i> and<i>portSizeLog2</i> parameters specify the internal hash table sizes. Eachmust be equal to a power of two, or zero to use a default size value.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b><hr><a name="proxyNetCreate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyNetCreate( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyNetCreate( )</strong> - create a proxy ARP network</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS proxyNetCreate ( char * proxyAddr, /* address of proxy network interface */ char * mainAddr /* address of main network interface */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine activates proxy services between the proxy network connectedto the interface with the <i>proxyAddr</i> IP address and the main networkconnected to the interface with the <i>mainAddr</i> address. Once registrationis complete, the proxy server will disguise the physically separatednetworks as a single logical network. <p>The corresponding interfaces must be attached and configured with IPaddresses before calling this routine. If the proxy network shares thesame logical subnet number as the main network, the corresponding interfaceto the proxy network must use a value of 255.255.255.255 for the netmask.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_proxyArpLib_INVALID_ADDRESS</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b><hr><a name="proxyNetDelete"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyNetDelete( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyNetDelete( )</strong> - delete a proxy network</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS proxyNetDelete ( char * proxyAddr /* proxy net address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes the proxy network specified by <i>proxyAddr</i>. It alsoremoves all the proxy clients that exist on that network.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b><hr><a name="proxyNetShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyNetShow( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyNetShow( )</strong> - show proxy ARP networks</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void proxyNetShow (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the proxy networks and their associated clients.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> -> proxyNetShow main interface 147.11.1.182 proxy interface 147.11.1.183 client 147.11.1.184</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b><hr><a name="proxyPortFwdOn"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyPortFwdOn( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyPortFwdOn( )</strong> - enable broadcast forwarding for a particular port</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS proxyPortFwdOn ( int port /* port number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine enables broadcasts destined for the port, <i>port</i>, to be forwarded to and from the proxy network. To enable all ports, specify zero for <i>port</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b><hr><a name="proxyPortFwdOff"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyPortFwdOff( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyPortFwdOff( )</strong> - disable broadcast forwarding for a particular port</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS proxyPortFwdOff ( int port /* port number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine disables broadcast forwarding on port number <i>port</i>. Todisable the (previously enabled) forwarding of all ports via<b><a href="./proxyArpLib.html#proxyPortFwdOn">proxyPortFwdOn</a>( )</b>, specify zero for <i>port</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b><hr><a name="proxyPortShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>proxyPortShow( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>proxyPortShow( )</strong> - show ports enabled for broadcast forwarding</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void proxyPortShow (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the destination ports for which the proxy ARP serverwill forward broadcast messages between the physically separate networks.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre> -> proxyPortShow enabled ports: port 67</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./proxyArpLib.html#top">proxyArpLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -