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

📄 m2riplib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/m2RipLib.html - generated by refgen from m2RipLib.c --> <title> m2RipLib </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>m2RipLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipLib</strong> - VxWorks interface routines to RIP for SNMP Agent </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./m2RipLib.html#m2RipInit">m2RipInit</a>(&nbsp;)</b>  -  initialize the RIP MIB support<br><b><a href="./m2RipLib.html#m2RipDelete">m2RipDelete</a>(&nbsp;)</b>  -  delete the RIP MIB support<br><b><a href="./m2RipLib.html#m2RipGlobalCountersGet">m2RipGlobalCountersGet</a>(&nbsp;)</b>  -  get MIB-II RIP-group global counters<br><b><a href="./m2RipLib.html#m2RipIfStatEntryGet">m2RipIfStatEntryGet</a>(&nbsp;)</b>  -  get MIB-II RIP-group interface entry<br><b><a href="./m2RipLib.html#m2RipIfConfEntryGet">m2RipIfConfEntryGet</a>(&nbsp;)</b>  -  get MIB-II RIP-group interface entry<br><b><a href="./m2RipLib.html#m2RipIfConfEntrySet">m2RipIfConfEntrySet</a>(&nbsp;)</b>  -  set MIB-II RIP-group interface entry<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides routines to initialize the group, access thegroup global variables, read the table of network interfaces that RIPknows about, and change the state of such an interface.  For a broaderdescription of MIB-II services, see the manual entry for <b><a href="./m2Lib.html#top">m2Lib</a></b>.<p></blockquote><h4>USING THIS LIBRARY</h4><blockquote><p>This library can be initialized and deleted by calling <b><a href="./m2RipLib.html#m2RipInit">m2RipInit</a>(&nbsp;)</b> and<b><a href="./m2RipLib.html#m2RipDelete">m2RipDelete</a>(&nbsp;)</b> respectively, if only the RIP group's services are needed.If full MIB-II support is used, this group and all other groups can beinitialized and deleted by calling <b><a href="./m2Lib.html#m2Init">m2Init</a>(&nbsp;)</b> and <b><a href="./m2Lib.html#m2Delete">m2Delete</a>(&nbsp;)</b>.<p>The group global variables are accessed by calling<b><a href="./m2RipLib.html#m2RipGlobalCountersGet">m2RipGlobalCountersGet</a>(&nbsp;)</b> as follows:<pre>    M2_RIP2_GLOBAL_GROUP   ripGlobal;    if (m2RipGlobalCountersGet (&amp;ripGlobal) == OK)        /* values in ripGlobal are valid */</pre>To retrieve the RIP group statistics for a particular interface you call the<b><a href="./m2RipLib.html#m2RipIfStatEntryGet">m2RipIfStatEntryGet</a>(&nbsp;)</b> routine a pointer to an <b>M2_RIP2_IFSTAT_ENTRY</b> structure that contains the address of the interface you are searching for.  For example:<pre>    M2_RIP2_IFSTAT_ENTRY ripIfStat;            ripIfStat.rip2IfStatAddress = inet_addr("90.0.0.3");        if (m2RipIfStatEntryGet(M2_EXACT_VALUE, &amp;ripIfStat) == OK)        /* values in ripIfState are valid */</pre>To retrieve the configuration statistics for a particular interface the<b><a href="./m2RipLib.html#m2RipIfConfEntryGet">m2RipIfConfEntryGet</a>(&nbsp;)</b> routine must be called with an IP address encoded in an<b>M2_RIP2_IFSTAT_ENTRY</b> structure which is passed as the second argument.  Forexample:<pre>    M2_RIP2_IFCONF_ENTRY ripIfConf;            ripIfConf.rip2IfConfAddress = inet_addr("90.0.0.3");        if (m2RipIfConfEntryGet(M2_EXACT_VALUE, &amp;ripIfConf) == OK)        /* values in ripIfConf are valid */</pre>To set the values of for an interface the <b><a href="./m2RipLib.html#m2RipIfConfEntrySet">m2RipIfConfEntrySet</a>(&nbsp;)</b> routine mustbe called with an IP address in dot notation encoded into an<b>M2_RIP2_IFSTAT_ENTRY</b> structure, which is passed as the second argument.  Forexample:<pre>    M2_RIP2_IFCONF_ENTRY ripIfConf;        ripIfConf.rip2IfConfAddress = inet_addr("90.0.0.3");        /* Set the authorization type. */        ripIfConf.rip2IfConfAuthType = M2_rip2IfConfAuthType_simplePassword;        bzero(ripIfConf.rip2IfConfAuthKey, 16);        bcopy("Simple Password ", ripIfConf.rip2IfConfAuthKey, 16);        /* We only accept version 1 packets. */        ripIfConf.rip2IfConfSend = M2_rip2IfConfSend_ripVersion1;        /* We only send version 1 packets. */        ripIfConf.rip2IfConfReceive = M2_rip2IfConfReceive_rip1;        /* Default routes have a metric of 2 */        ripIfConf.rip2IfConfDefaultMetric = 2;        /* If the interface is invalid it is turned off, we make it valid. */        ripIfConf.rip2IfConfStatus = M2_rip2IfConfStatus_valid;                if (m2RipIfConfEntrySet(varsToSet, &amp;ripIfConf) == OK)        /* Call succeded. */</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>rip/m2RipLib.h</b> rip/defs.h<p></blockquote><h4>SEE ALSO</h4><blockquote><p><p><b><a href="./ripLib.html#top">ripLib</a></b><p><hr><a name="m2RipInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>m2RipInit(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipInit(&nbsp;)</strong> - initialize the RIP MIB support</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2RipInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets up the RIP MIB and should be called before any other <b><a href="./m2RipLib.html#top">m2RipLib</a></b> routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, always.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2RipLib.html#top">m2RipLib</a></b><hr><a name="m2RipDelete"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>m2RipDelete(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipDelete(&nbsp;)</strong> - delete the RIP MIB support</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2RipDelete (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine should be called after all <b><a href="./m2RipLib.html#top">m2RipLib</a></b> calls are completed.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, always.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2RipLib.html#top">m2RipLib</a></b><hr><a name="m2RipGlobalCountersGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>m2RipGlobalCountersGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipGlobalCountersGet(&nbsp;)</strong> - get MIB-II RIP-group global counters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2RipGlobalCountersGet    (    M2_RIP2_GLOBAL_GROUP* pRipGlobal    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine fills in an <b>M2_RIP2_GLOBAL_GROUP</b> structure pointed to by <i>pRipGlobal</i> with the values of the MIB-II RIP-group global counters.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR. <p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_m2Lib_INVALID_PARAMETER</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2RipLib.html#top">m2RipLib</a></b>, <b><a href="./m2RipLib.html#m2RipInit">m2RipInit</a>(&nbsp;)</b><hr><a name="m2RipIfStatEntryGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>m2RipIfStatEntryGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipIfStatEntryGet(&nbsp;)</strong> - get MIB-II RIP-group interface entry</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2RipIfStatEntryGet    (    int                   search,    M2_RIP2_IFSTAT_ENTRY* pRipIfStat    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine retrieves the interface statistics for the interface servingthe subnet of the IP address contained in the <b>M2_RIP2_IFSTAT_ENTRY</b>structure.  <i>pRipIfStat</i> is a pointer to an <b>M2_RIP2_IFSTAT_ENTRY</b> structurewhich the routine will fill in upon successful completion.<p>This routine either returns an exact match if <i>search</i> is <b>M2_EXACT_VALUE</b>,or the next value greater than or equal to the value supplied if the<i>search</i> is <b>M2_NEXT_VALUE</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if either <i>pRipIfStat</i> is invalid or an exact matchfailed.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_m2Lib_INVALID_PARAMETER</b><br>&nbsp;<b>S_m2Lib_ENTRY_NOT_FOUND</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2RipLib.html#top">m2RipLib</a></b>, <b><a href="./m2RipLib.html#m2RipInit">m2RipInit</a>(&nbsp;)</b><hr><a name="m2RipIfConfEntryGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>m2RipIfConfEntryGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipIfConfEntryGet(&nbsp;)</strong> - get MIB-II RIP-group interface entry</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2RipIfConfEntryGet    (    int                   search,    M2_RIP2_IFCONF_ENTRY* pRipIfConf    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine retrieves the interface configuration for the interface servingthe subnet of the IP address contained in the <b>M2_RIP2_IFCONF_ENTRY</b> structurepassed to it.  <i>pRipIfConf</i> is a pointer to an <b>M2_RIP2_IFCONF_ENTRY</b> structure which the routine will fill in upon successful completion.<p>This routine either returns an exact match if <i>search</i> is <b>M2_EXACT_VALUE</b>,or the next value greater than or equal to the value supplied if the<i>search</i> is <b>M2_NEXT_VALUE</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pRipIfConf</i> was invalid or the interface wasnot found.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_m2Lib_INVALID_PARAMETER</b><br>&nbsp;<b>S_m2Lib_ENTRY_NOT_FOUND</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2RipLib.html#top">m2RipLib</a></b>, <b><a href="./m2RipLib.html#m2RipInit">m2RipInit</a>(&nbsp;)</b><hr><a name="m2RipIfConfEntrySet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>m2RipIfConfEntrySet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>m2RipIfConfEntrySet(&nbsp;)</strong> - set MIB-II RIP-group interface entry</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2RipIfConfEntrySet    (    unsigned int          varToSet,    M2_RIP2_IFCONF_ENTRY* pRipIfConf    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the interface configuration for the interface servingthe subnet of the IP address contained in the <b>M2_RIP2_IFCONF_ENTRY</b> structure.<p><i>pRipIfConf</i> is a pointer to an <b>M2_RIP2_IFCONF_ENTRY</b> structure which theroutine places into the system based on the <i>varToSet</i> value. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pRipIfConf</i> is invalid or the interface cannotbe found.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_m2Lib_INVALID_PARAMETER</b><br>&nbsp;<b>S_m2Lib_ENTRY_NOT_FOUND</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2RipLib.html#top">m2RipLib</a></b>, <b><a href="./m2RipLib.html#m2RipInit">m2RipInit</a>(&nbsp;)</b></body></html>

⌨️ 快捷键说明

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