📄 ospflib.html
字号:
<a name="m2OspfVirtIfEntrySet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2OspfVirtIfEntrySet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2OspfVirtIfEntrySet</i>( )</strong> - set OSPF virtual interface entry values (OSPF Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2OspfVirtIfEntrySet ( int varsToSet, /* flags specifying vars to set */ M2_OSPF_VIRT_IF_ENTRY * pInfo /* ptr to virtual interface entry */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The OSPF virtual interface entry specified by <b>pInfo->ospfVirtIfAreaID</b>and <b>pInfo->ospfVirtIfNeighbor</b> is updated with the contents of <i>pInfo</i>.The <i>varsToSet</i> parameter indicates the fields to be modified and is a bitwise or of one or more of:<p> <b>M2_OSPF_VIRT_IF_AREA_ID</b><br> <b>M2_OSPF_VIRT_IF_NEIGHBOR</b><br> <b>M2_OSPF_VIRT_IF_TRANSIT_DELAY</b> <br> <b>M2_OSPF_VIRT_IF_HELLO_INTERVAL</b><br> <b>M2_OSPF_VIRT_IF_RTR_DEAD_INTERVAL</b><br> <b>M2_OSPF_VIRT_IF_STATUS</b><br> <b>M2_OSPF_VIRT_IF_AUTH_KEY</b><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="m2OspfNbrEntryGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2OspfNbrEntryGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2OspfNbrEntryGet</i>( )</strong> - get an OSPF neighbor entry (OSPF Option) </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2OspfNbrEntryGet ( int searchType, /* M2_EXACT_VALUE or M2_NEXT_VALUE */ M2_OSPF_NBR_ENTRY * pInfo /* ptr to neighbor entry */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The structure pointed to by pInfo is filled in with the contents of the OSPFneighbor entry specified by <b>pInfo->ospfNbrIpAddr</b>, <b>pInfo->ospfNbrAddressLessIndex</b> and <i>searchType</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="m2OspfNbrEntrySet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2OspfNbrEntrySet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2OspfNbrEntrySet</i>( )</strong> - set values in an OSPF neighbor entry (OSPF Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2OspfNbrEntrySet ( int varsToSet, /* flags specifying vars to set */ M2_OSPF_NBR_ENTRY * pInfo /* ptr to neighbor entry */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The OSPF neighbor entry specified by <b>pInfo->ospfNbrIpAddr</b> and <b>pInfo->ospfNbrAddressLessIndex</b> is updated with the contents of <i>pInfo</i>.The <i>varsTosSet</i> parameter indicates the fields to set, which can be <b>M2_OSPF_NBMA_NBR_STATUS</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="m2OspfVirtNbrEntryGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2OspfVirtNbrEntryGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2OspfVirtNbrEntryGet</i>( )</strong> - get an OSPF virtual neighbor entry (OSPF Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2OspfVirtNbrEntryGet ( int searchType, /* M2_EXACT_VALUE or M2_NEXT_VALUE */ M2_OSPF_VIRT_NBR_ENTRY * pInfo /* ptr to virtual neighbor entry */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The structure pointed to by pInfo is filled in with the contents of the OSPFvirtual neighbor entry specified by <b>pInfo->ospfVirtNbrArea</b>, <b>pInfo->ospfVirtNbrRtrId</b>, and <i>searchType</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="ospfExtRouteAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ospfExtRouteAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ospfExtRouteAdd</i>( )</strong> - import external route into OSPF domain (OSPF Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ospfExtRouteAdd ( uint32_t destIp, /* destination IP address */ uint32_t destMask, /* destination mask */ uint32_t nextHopIp, /* IP address of next hop */ int cost, /* cost to advertise in domain */ int extRouteType, /* 1 = external type1, 2 = external type2 */ int tos /* type of service */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is used to import an external route into the OSPF domainThe destination address and mask are <i>destIp</i> and <i>destMask</i> respectivelywhile <i>nextHopIp</i> is the IP address of the next hop. The cost to advertisein the OSPF domain is <i>cost</i> and route type is <i>routeType</i>, which can havethe value 1 or 2 for type 1 and type 2 routes respectively. All IP addresses and masks in this call are in network byte order.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="ospfExtRouteDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ospfExtRouteDelete</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ospfExtRouteDelete</i>( )</strong> - delete external route imported into OSPF (OSPF Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ospfExtRouteDelete ( uint32_t destIp, /* destination IP address */ uint32_t destMask, /* destination mask */ int extRouteType, /* 1 = external type1, 2 = external type2 */ int tos /* type of service */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is used to delete an external route imported into the OSPF domain. The destination address and mask are <i>destIp</i> and <i>destMask</i> respectively. The route type is <i>extRouteType</i> which may havethe value 1 or 2 for type 1 and type 2 routes, respectively. All IP addresses and masks in this call are in network byte order.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="ospfInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ospfInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ospfInit</i>( )</strong> - function to initialize OSPF routing (OSPF Option) </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ospfInit ( int priority, /* task priority */ int options, /* task options */ int stackSize, /* task stack size */ int routerId, /* routerId, host byte order */ FUNCPTR pAuthHook /* ospf authentication hook */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function initializes the OSPF facilities. This includes creating OSPFtasks, which are created with a priority of <i>priority</i>, options set to <i>options</i>, a stack size of <i>stackSize</i>, and an OSPF router ID of <i>routerid</i>.If <i>routerId</i> is 0, the IP address of one of the interfaces is used as the router ID.The <i>pAuthHook</i> parameter expects a pointer to a user-provided authentication routine. For every received packet, the authentication function:<pre> (*ospfAuthHook) (pIfkey, pPktKey, ipAddr)</pre>The <i>pIfkey</i> parameter is a pointer to the authorization key associated with the interface. The <i>pPktKey</i> parameter is a pointer to the key in the received packet. The <i>ipAddr</i> is the IP address in network byte order of the interface on which the packet was received. To set the interface authorization key, call <b><i><a href="./ospfLib.html#m2OspfIfEntrySet">m2OspfIfEntrySet</a></i>( )</b>. The <b><i>ospfAuthHook</i>( )</b> routine returns TRUE if the packet is acceptable.Otherwise, it returns FALSE.<p>After this function has returned, you can use the m2Ospf*<b><i>Set</i>( )</b> configuration routines to alter the settings.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="ospfNbmaDstAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ospfNbmaDstAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ospfNbmaDstAdd</i>( )</strong> - add NBMA destination</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ospfNbmaDstAdd ( uint32_t ipAddress, /* neighbor IP address, network order */ uint32_t ifIpAddress, /* local interface IP address, network order */ BOOL eligible /* TRUE if neighbor is eligible to be DR */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>On a non-broadcast multiple access network, a router capable of becomingdesignated router must be made aware of the IP addresses of all other routerson the network. The neighbor router is specified by its IP address<i>ipAddress</i>, the local interface IP address is <i>ifIpAddress</i> and <i>eligible</i> specifies if the neighbor is capable of acting as a designated router.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="ospfNbmaDstDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ospfNbmaDstDelete</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ospfNbmaDstDelete</i>( )</strong> - delete NBMA destination</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ospfNbmaDstDelete ( uint32_t ipAddress, /* neighbor IP address, network order */ uint32_t ifIpAddress /* local interface IP address, network order */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Delete neighbor on a NBMA network, previously created with <b><i><a href="./ospfLib.html#ospfNbmaDstAdd">ospfNbmaDstAdd</a></i>( )</b>.The neighbor is specified by its IP address <i>ipAddress</i> and the local interface IP address is <i>ifIpAddress</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b><hr><a name="ospfTerminate"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ospfTerminate</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ospfTerminate</i>( )</strong> - free OSPF resources and delete OSPF tasks</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void ospfTerminate ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function frees all the resources used by OSPF. This includesdeleting the two VxWorks tasks used to manage OSPF. You are free torestart OSPF after this function has returned.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ospfLib.html#top">ospfLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -