📄 m2iflib.html
字号:
n/a</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="m2IfTblEntrySet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfTblEntrySet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfTblEntrySet( )</strong> - set the state of a MIB-II interface entry to UP or DOWN</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfTblEntrySet ( void * pIfReqEntry /* pointer to requested entry to change */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine selects the interface specified in the input parameter<i>pIfReqEntry</i> and sets the interface parameters to the requested state. It is the responsibility of the calling routine to set the interfaceindex, and to make sure that the state specified in the<b>ifAdminStatus</b> field of the structure at <i>pIfTblEntry</i> is a validMIB-II state, up(1) or down(2).<p>The fields that can be modified by this routine are the following:ifAdminStatus, ifAlias, ifLinkUpDownTrapEnable and ifName.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the input parameter is not specified, an interfaceis no longer valid, the interface index is incorrect, or the <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> commandto the interface fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_m2Lib_INVALID_PARAMETER</b><br> <b>S_m2Lib_ENTRY_NOT_FOUND</b><br> <b>S_m2Lib_IF_CNFG_CHANGED</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b>, <b><a href="./m2IfLib.html#m2IfInit">m2IfInit</a>( )</b>, <b><a href="./m2IfLib.html#m2IfGroupInfoGet">m2IfGroupInfoGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfTblEntryGet">m2IfTblEntryGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfDelete">m2IfDelete</a>( )</b><hr><a name="m2IfGroupInfoGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfGroupInfoGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfGroupInfoGet( )</strong> - get the MIB-II interface-group scalar variables</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfGroupInfoGet ( M2_INTERFACE * pIfInfo /* pointer to interface group structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine fills the interface-group structure at <i>pIfInfo</i> withthe values of MIB-II interface-group global variables.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pIfInfo</i> is not a valid pointer.<p></blockquote><h4>ERRNO</h4><blockquote><p><p><b>S_m2Lib_INVALID_PARAMETER</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b>, <b><a href="./m2IfLib.html#m2IfInit">m2IfInit</a>( )</b>, <b><a href="./m2IfLib.html#m2IfTblEntryGet">m2IfTblEntryGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfTblEntrySet">m2IfTblEntrySet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfDelete">m2IfDelete</a>( )</b><hr><a name="m2IfStackTblUpdate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfStackTblUpdate( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfStackTblUpdate( )</strong> - update the relationship between the sub-layers</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfStackTblUpdate ( UINT lowerIndex, /* The ifIndex of the lower sub-layer */ UINT higherIndex, /* The ifIndex of the higher sub-layer */ int action /* insert or remove */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function must be called to setup the relationship between theifIndex values for each sub-layer. This information is required to support the ifStackTable for RFC 2233. Using this data, we can easilydetermine which sub-layer runs on top of which other. <p><i>action</i> is either <b>M2_STACK_TABLE_INSERT</b> or <b>M2_STACK_TABLE_REMOVE</b>.<p>Each AVL node keeps a linked list of all the layers that are directly beneath it. Thus by walking through the AVL nodes in anorderly way, we can understand the relationships between all the interfaces.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK upon successful addition<br> ERROR otherwise.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="stackEntryIsTop"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>stackEntryIsTop( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>stackEntryIsTop( )</strong> - test if an ifStackTable interface has no layers above</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BOOL stackEntryIsTop ( int index /* the interface to examine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns TRUE if an interface is not below any other interface.That is, it returns TRUE if the given interface is topmost on a stack. Thishelper function is not exported.<p></blockquote><h4>RETURNS</h4><blockquote><p><p> TRUE is interface is topmost<br> FALSE otherwise or for errors</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="stackEntryIsBottom"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>stackEntryIsBottom( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>stackEntryIsBottom( )</strong> - test if an interface has no layers beneath it</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BOOL stackEntryIsBottom ( int index /* interface to examine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns TRUE if an interface has no layers beneath it. Thishelper function is not exported.<p></blockquote><h4>RETURNS</h4><blockquote><p><p> TRUE if the interface is the bottom-most layer in a stack<br> FALSE otherwise or on error</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="m2IfStackEntryGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfStackEntryGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfStackEntryGet( )</strong> - get a MIB-II interface-group table entry</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfStackEntryGet ( int search, /* M2_EXACT_VALUE or M2_NEXT_VALUE */ int * pHighIndex, /* the higher layer's ifIndex */ M2_IFSTACKTBL * pIfReqEntry /* pointer to the requested entry */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine maps the given high and low indexes to the interfaces in theAVL tree. Using the <i>high</i> and <i>low</i> indexes, we retrieve the nodes inquestion and walk through their linked lists to get to the right relation.Once we get to the correct node, we can return the values based on the<b>M2_EXACT_VALUE</b> and the <b>M2_NEXT_VALUE</b> searches.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the input parameter is not specified, or a match is not found.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_m2Lib_INVALID_PARAMETER</b><br> <b>S_m2Lib_ENTRY_NOT_FOUND</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="m2IfStackEntrySet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfStackEntrySet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfStackEntrySet( )</strong> - modify the status of a relationship</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfStackEntrySet ( int highIndex, /* The higher layer's ifIndex */ M2_IFSTACKTBL * pIfReqEntry /* The requested entry */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine selects the interfaces specified in the input parameters<i>pIfReqEntry</i> and <i>highIndex</i> and sets the interface's status to the requested state. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the input parameter is not specified, an interfaceis no longer valid, or the interface index is incorrect.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_m2Lib_INVALID_PARAMETER</b><br> <b>S_m2Lib_ENTRY_NOT_FOUND</b><br> <b>S_m2Lib_IF_CNFG_CHANGED</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="m2IfRcvAddrEntryGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfRcvAddrEntryGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfRcvAddrEntryGet( )</strong> - get the rcvAddress table entries for a given address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfRcvAddrEntryGet ( int search, /* exact search or next search */ int * pIndex, /* pointer to the ifIndex */ M2_IFRCVADDRTBL * pIfReqEntry /* struct for the values */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function returns the exact or the next value in the ifRcvAddressTablebased on the value of the search parameter. In order to identify theappropriate entry, this function needs two identifiers - the ifIndex of theinterface and the physical address for which the status or the type isbeing requested. For a <b>M2_EXACT_VALUE</b> search, this function returns thestatus and the type of the physical address in the instance. For a <b>M2_NEXT_VALUE</b> search, it returns the type and status of the lexicographicsuccessor of the physical address seen in the instance.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the input parameter is not specified, an interfaceis no longer valid, or the interface index is incorrect.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_m2Lib_INVALID_PARAMETER</b><br> <b>S_m2Lib_ENTRY_NOT_FOUND</b><br> <b>S_m2Lib_IF_CNFG_CHANGED</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b><hr><a name="m2IfRcvAddrEntrySet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfRcvAddrEntrySet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfRcvAddrEntrySet( )</strong> - modify the entries of the rcvAddressTable</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfRcvAddrEntrySet ( int varToSet, /* entries that need to be modified */ int index, /* search type */ M2_IFRCVADDRTBL * pIfReqEntry /* struct containing the new values */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function modifies the status and type fields of a given receive addressassociated with a given interface. <i>varToSet</i> identifies the fields for which the change is being requested. We can also add multicast addressesby creating a new row in the table. The physical address is stripped fromthe instance value of the SNMP request. This routine does not allow thedeletion of a unicast address. Neither does it allow the unicast addressto be modified or created.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the input parameter is not specified, an interfaceis no longer valid, the interface index is incorrect, or the <b><a href="./ioLib.html#ioctl">ioctl</a>( )</b> commandto the interface fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_m2Lib_INVALID_PARAMETER</b><br> <b>S_m2Lib_ENTRY_NOT_FOUND</b><br> <b>S_m2Lib_IF_CNFG_CHANGED</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b>, <b><a href="./m2IfLib.html#m2IfInit">m2IfInit</a>( )</b>, <b><a href="./m2IfLib.html#m2IfGroupInfoGet">m2IfGroupInfoGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfTblEntryGet">m2IfTblEntryGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfDelete">m2IfDelete</a>( )</b><hr><a name="m2IfDelete"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>m2IfDelete( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2IfDelete( )</strong> - delete all resources used to access the interface group</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2IfDelete (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine frees all the resources allocated at the time the group wasinitialized. The interface group should not be accessed after this routine has been called.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, always.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b>, <b><a href="./m2IfLib.html#m2IfInit">m2IfInit</a>( )</b>, <b><a href="./m2IfLib.html#m2IfGroupInfoGet">m2IfGroupInfoGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfTblEntryGet">m2IfTblEntryGet</a>( )</b>, <b><a href="./m2IfLib.html#m2IfTblEntrySet">m2IfTblEntrySet</a>( )</b><hr><a name="nextIndex"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>nextIndex( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>nextIndex( )</strong> - the comparison routine for the AVL tree</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int nextIndex ( void * pAvlNode, /* The node to compare with */ GENERIC_ARGUMENT key /* The given index */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine compares the two indexes and returns a code based on wetherthe index, in question, is lesser than, equal to or greater than the onebeing compared.<p></blockquote><h4>RETURNS</h4><blockquote><p>-1, if the given index is lesser; 0, if equal; and 1, if greater.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2IfLib.html#top">m2IfLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -