📄 muxlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/muxLib.html - generated by refgen from muxLib.c --> <title> muxLib </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>muxLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxLib</strong> - MUX network interface library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./muxLib.html#muxLibInit">muxLibInit</a>( )</b> - initialize global state for the MUX<br><b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b> - load a driver into the MUX<br><b><a href="./muxLib.html#muxDevStart">muxDevStart</a>( )</b> - start a device by calling its start routine<br><b><a href="./muxLib.html#muxDevStop">muxDevStop</a>( )</b> - stop a device by calling its stop routine<br><b><a href="./muxLib.html#muxShow">muxShow</a>( )</b> - display configuration of devices registered with the MUX<br><b><a href="./muxLib.html#muxBind">muxBind</a>( )</b> - create a binding between a network service and an END<br><b><a href="./muxLib.html#muxSend">muxSend</a>( )</b> - send a packet out on a network interface<br><b><a href="./muxLib.html#muxPollSend">muxPollSend</a>( )</b> - now <b>deprecated</b>, see <b><a href="./muxTkLib.html#muxTkPollSend">muxTkPollSend</a>( )</b><br><b><a href="./muxLib.html#muxPollReceive">muxPollReceive</a>( )</b> - now <b>deprecated</b>, see <b><a href="./muxTkLib.html#muxTkPollReceive">muxTkPollReceive</a>( )</b><br><b><a href="./muxLib.html#muxIoctl">muxIoctl</a>( )</b> - send control information to the MUX or to a device<br><b><a href="./muxLib.html#muxMCastAddrAdd">muxMCastAddrAdd</a>( )</b> - add a multicast address to a device's multicast table <br><b><a href="./muxLib.html#muxMCastAddrDel">muxMCastAddrDel</a>( )</b> - delete a multicast address from a device's multicast table<br><b><a href="./muxLib.html#muxMCastAddrGet">muxMCastAddrGet</a>( )</b> - get the multicast address table from the MUX/Driver<br><b><a href="./muxLib.html#muxUnbind">muxUnbind</a>( )</b> - detach a network service from the specified device<br><b><a href="./muxLib.html#muxDevUnload">muxDevUnload</a>( )</b> - unloads a device from the MUX<br><b><a href="./muxLib.html#muxLinkHeaderCreate">muxLinkHeaderCreate</a>( )</b> - attach a link-level header to a packet<br><b><a href="./muxLib.html#muxAddressForm">muxAddressForm</a>( )</b> - form a frame with a link-layer address<br><b><a href="./muxLib.html#muxPacketDataGet">muxPacketDataGet</a>( )</b> - return the data from a packet<br><b><a href="./muxLib.html#muxPacketAddrGet">muxPacketAddrGet</a>( )</b> - get addressing information from a packet<br><b><a href="./muxLib.html#endFindByName">endFindByName</a>( )</b> - find a device using its string name<br><b><a href="./muxLib.html#muxDevExists">muxDevExists</a>( )</b> - tests whether a device is already loaded into the MUX<br><b><a href="./muxLib.html#muxAddrResFuncAdd">muxAddrResFuncAdd</a>( )</b> - replace the default address resolution function<br><b><a href="./muxLib.html#muxAddrResFuncGet">muxAddrResFuncGet</a>( )</b> - get the address resolution function for ifType/protocol<br><b><a href="./muxLib.html#muxAddrResFuncDel">muxAddrResFuncDel</a>( )</b> - delete an address resolution function<br><b><a href="./muxLib.html#muxTaskDelaySet">muxTaskDelaySet</a>( )</b> - set the inter-cycle delay on the polling task<br><b><a href="./muxLib.html#muxTaskDelayGet">muxTaskDelayGet</a>( )</b> - get the delay on the polling task<br><b><a href="./muxLib.html#muxTaskPrioritySet">muxTaskPrioritySet</a>( )</b> - reset the priority of <b>tMuxPollTask</b><br><b><a href="./muxLib.html#muxTaskPriorityGet">muxTaskPriorityGet</a>( )</b> - get the priority of <b>tMuxPollTask</b><br><b><a href="./muxLib.html#muxPollStart">muxPollStart</a>( )</b> - initialize and start the MUX poll task<br><b><a href="./muxLib.html#muxPollEnd">muxPollEnd</a>( )</b> - shuts down <b>tMuxPollTask</b> and returns devices to interrupt mode<br><b><a href="./muxLib.html#muxPollDevAdd">muxPollDevAdd</a>( )</b> - adds a device to list polled by <b>tMuxPollTask</b><br><b><a href="./muxLib.html#muxPollDevDel">muxPollDevDel</a>( )</b> - removes a device from the list polled by <b>tMuxPollTask</b><br><b><a href="./muxLib.html#muxPollDevStat">muxPollDevStat</a>( )</b> - reports whether device is on list polled by <b>tMuxPollTask</b><br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides the routines that define the MUX interface, a facilitythat handles communication between the data link layer and the networkprotocol layer. Using the MUX, the VxWorks network stack has decoupled thedata link and network layers. Drivers and services no longer need knowledge of each other's internals. This independence makes it much easier to add new drivers or services. For example, if you add a new MUX-based "END" driver, all existing MUX-based services can use the new driver. Likewise, if you add a new MUX-based service, any existing END can use the MUX to access the new service. <p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>errno.h</b>, <b>lstLib.h</b>, <b>logLib.h</b>, <b>string.h</b>, <b>m2Lib.h</b>, <b>bufLib.h</b>, <b>if.h</b>,<b>end.h</b>, <b>muxLib.h</b>, <b>vxWorks.h</b>, <b>taskLib.h</b>, <b>stdio.h</b>, <b>errnoLib.h</b>, <b>if_ether.h</b>,<b>netLib.h</b>, <b>semLib.h</b>, <b>rebootLib.h</b><p>To use this feature, include the following component:<b>INCLUDE_MUX</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><i>VxWorks AE Network Programmer's Guide </i><hr><a name="muxLibInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>muxLibInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxLibInit( )</strong> - initialize global state for the MUX</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxLibInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes all global states for the MUX.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxDevLoad"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>muxDevLoad( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxDevLoad( )</strong> - load a driver into the MUX</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * muxDevLoad ( int unit, /* unit number of device */ END_OBJ * (* endLoad) (char* , void* ), /* load function of the driver */ char * pInitString, /* init string for this driver */ BOOL loaning, /* we loan buffers */ void * pBSP /* for BSP group */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The <b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b> routine loads a network driver into the MUX. Internally, this routine calls the specified <i>endLoad</i> routine to initialize thesoftware state of the device. After the device is initialized,you must call <b><a href="./muxLib.html#muxDevStart">muxDevStart</a>( )</b> to start the device. <dl><dt><i>unit</i><dd>Expects the unit number of the device. <dt><i>endLoad</i><dd>Expects a pointer to the network driver's <b>endLoad( )</b> or <b>nptLoad( )</b> entrypoint. <dt><i>pInitString</i><dd>Expects a pointer to an initialization string, typically a colon-delimitedlist of options. The <b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b> routine passes this along blindly to the <i>endLoad</i> function.<dt><i>loaning</i><dd>Currently unused.<dt><i>pBSP</i><dd>The MUX blindly passes this argument to the driver, which may or may not use it. Some BSPs use this parameter to pass in tables of functions that the diver can use to deal with the particulars of the BSP. </dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b> from within the kernel protection domain only, and the data referenced in the <i>endLoad</i> and <i>pBSP</i> parameters must reside in the kernel protection domain. In addition, the returned void pointer is valid in the kernel protection domain only. This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p>A cookie representing the new device, or NULL if an error occurred.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_LOAD_FAILED</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxDevStart"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>muxDevStart( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxDevStart( )</strong> - start a device by calling its start routine</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxDevStart ( void * pCookie /* device identifier from muxDevLoad() routine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine starts a device that has already been initialized and loadedinto the MUX with <b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b>. <b><a href="./muxLib.html#muxDevStart">muxDevStart</a>( )</b> activates the networkinterfaces for a device, and calls the device's <b>endStart( )</b> or <b>nptStart( )</b>routine, which registers the driver's interrupt service routine and doeswhatever else is needed to allow the device to handle receiving andtransmitting. This call to <b>endStart( )</b> or <b>nptStart( )</b> puts the device intoa running state. <p><dl><dt><i>pCookie</i><dd>Expects the pointer returned as the function value of the <b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b>call for this device. This pointer identifies the device.</dl><p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxDevStart">muxDevStart</a>( )</b> from within the kernel protection domain only, and the data referenced in the <i>pCookie</i> parameter must reside in the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; ENETDOWN, if <i>pCookie</i> does not represent a valid device;or ERROR, if the start routine for the device fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxDevStop"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>muxDevStop( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxDevStop( )</strong> - stop a device by calling its stop routine</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxDevStop ( void * pCookie /* device identifier from muxDevLoad() routine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine stops the device specified in <i>pCookie</i>.<b><a href="./muxLib.html#muxDevStop">muxDevStop</a>( )</b> calls the device's <b>endStop( )</b> or <b>nptStop( )</b> routine.<p><dl><dt><i>pCookie</i><dd>Expects the cookie returned as the function value of the <b><a href="./muxLib.html#muxDevLoad">muxDevLoad</a>( )</b> call for this device. This cookie identifies the device.</dl><p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxDevStop">muxDevStop</a>( )</b> from within the kernel protection domain only, and the data referenced in the <i>pCookie</i> parameter must reside in the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; ENETDOWN, if <i>pCookie</i> does not represent a valid device; orERROR, if the <b>endStop( )</b> or <b>nptStop( )</b> routine for the device fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>muxShow( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxShow( )</strong> - display configuration of devices registered with the MUX</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void muxShow ( char * pDevName, /* pointer to device name, or NULL for all */ int unit /* unit number for a single device */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>If the <i>pDevName</i> and <i>unit</i> arguments specify an existing device, thisroutine reports the name and type of each protocol bound to it. Otherwise,if <i>pDevName</i> is NULL, the routine displays the entire list of existingdevices and their associated protocols.<p><dl><dt><i>pDevName</i><dd>A string that contains the name of the device, or a null pointer to indicate "all devices."<dt><i>unit</i><dd>Specifies the unit number of the device (if <i>pDevName</i> is not a null pointer).</dl></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxBind"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>muxBind( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxBind( )</strong> - create a binding between a network service and an END</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * muxBind ( char * pName, /* interface name, for example, ln, ei,... */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -