📄 ospf_mib_helper_show.c
字号:
*/STATUS ospfMapiAreaShow( void ){ /* make sure the facility is properly initialized */ OSPF_MAPI_SHOW_INIT_CHECK(); semTake( thisMapi->semMapiMutex, WAIT_FOREVER ); avlTreePrint( &thisMapi->ospfAreaAvl.pOspfAvlRoot, ospfMapiAreaPrint ); semGive( thisMapi->semMapiMutex ); return OK;}/***************************************************************************************** ospfMapiStubPrint - debug print routine for ospfMapiStubShow.** This routine is invoke by ospfMapiStubShow from the AVL Tree walk routine.** RETURNS: N/A** NOMANUAL*/LOCAL void ospfMapiStubPrint( void *pNode ){ uchar_t ipIndex[4]; mApiOspfStub_t *pStub; pStub = (mApiOspfStub_t *)pNode; if ( pStub == NULL ) return; ospf_mApi_ipAddr2OctetString( pStub->ospfStubAreaId, ipIndex ); printf("ospfStubId.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pStub->ospfStubTOS, ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3]); printf("ospfStubTOS.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pStub->ospfStubTOS, pStub->ospfStubTOS); printf("ospfStubMetric.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pStub->ospfStubTOS, pStub->ospfStubMetric); printf("ospfStubStatus.%i.%i.%i.%i.%ld [integer] %s(%i)\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pStub->ospfStubTOS, rowStatus[pStub->ospfStubStatus], (int)pStub->ospfStubStatus); printf("ospfStubMetricType.%i.%i.%i.%i.%ld [integer] %s(%i)\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pStub->ospfStubTOS, stubMetricType[pStub->ospfStubMetricType], (int)pStub->ospfStubMetricType); printf("\n"); return;}/***************************************************************************************** ospfMapiStubShow - show routine for ospfStubTable** This routine displays all stub area instances found in the ospfStubTable for* debugging and diagnostic purposes.** RETURNS: OK or ERROR** ERRNO: N/A*/STATUS ospfMapiStubShow( void ){ /* make sure the facility is properly initialized */ OSPF_MAPI_SHOW_INIT_CHECK(); semTake( thisMapi->semMapiMutex, WAIT_FOREVER ); avlTreePrint( &thisMapi->ospfStubAvl.pOspfAvlRoot, ospfMapiStubPrint ); semGive( thisMapi->semMapiMutex ); return OK;}/***************************************************************************************** ospfMapiLsaPrint - debug print routine for ospfMapiLsdbShow.** This routine is invoke by ospfMapiLsdbShow from the AVL Tree walk routine.** RETURNS: N/A** NOMANUAL*/LOCAL void ospfMapiLsaPrint( void *pNode ){ uchar_t ipIndex1[4]; uchar_t ipIndex2[4]; uchar_t ipIndex3[4]; mApiOspfLsdb_t *pLsdb; pLsdb = (mApiOspfLsdb_t *)pNode; if ( pLsdb == NULL ) return; ospf_mApi_ipAddr2OctetString( pLsdb->ospfLsdbAreaId, ipIndex1 ); ospf_mApi_ipAddr2OctetString( pLsdb->ospfLsdbLsid, ipIndex2 ); ospf_mApi_ipAddr2OctetString( pLsdb->ospfLsdbRouterId, ipIndex3 ); printf("ospfLsdbAreaId.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [ipaddress] %i.%i.%i.%i\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3]); printf("ospfLsdbType.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [integer] %s(%i)\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], lsdbType[pLsdb->ospfLsdbType], (int)pLsdb->ospfLsdbType); printf("ospfLsdbLsid.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [ipaddress] %i.%i.%i.%i\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3]); printf("ospfLsdbRouterId.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [ipaddress] %i.%i.%i.%i\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3]); printf("ospfLsdbSequence.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [integer] %ld(0x%lX)\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], pLsdb->ospfLsdbSequence, pLsdb->ospfLsdbSequence); printf("ospfLsdbAge.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [integer] %ld\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], pLsdb->ospfLsdbAge ); printf("ospfLsdbChecksum.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i.%i [integer] %ld(0x%lX)\n", ipIndex1[0], ipIndex1[1], ipIndex1[2], ipIndex1[3], pLsdb->ospfLsdbType, ipIndex2[0], ipIndex2[1], ipIndex2[2], ipIndex2[3], ipIndex3[0], ipIndex3[1], ipIndex3[2], ipIndex3[3], pLsdb->ospfLsdbChecksum, pLsdb->ospfLsdbChecksum ); printf("\n"); return;}/***************************************************************************************** ospfMapiLsdbShow - show routine for ospfLsdbTable** This routine displays all link state database instances found in the ospfLsdbTable* for debugging and diagnostic purposes.*** RETURNS: OK or ERROR** ERRNO: N/A*/STATUS ospfMapiLsdbShow( void ){ /* make sure the facility is properly initialized */ OSPF_MAPI_SHOW_INIT_CHECK(); semTake( thisMapi->semMapiMutex, WAIT_FOREVER ); avlTreePrint( &thisMapi->ospfLsdbAvl.pOspfAvlRoot, ospfMapiLsaPrint ); semGive( thisMapi->semMapiMutex ); return OK;}/***************************************************************************************** ospfMapiHostPrint - debug print routine for ospfMapiHostShow.** This routine is invoke by ospfMapiHostShow from the AVL Tree walk routine.** RETURNS: N/A** NOMANUAL*/LOCAL void ospfMapiHostPrint( void *pNode ){ uchar_t ipIndex[4]; uchar_t ipStr[4]; mApiOspfHost_t *pHost; pHost = (mApiOspfHost_t *)pNode; if ( pHost == NULL ) return; ospf_mApi_ipAddr2OctetString( pHost->ospfHostIpAddress, ipIndex ); printf("ospfHostIpAddress.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pHost->ospfHostTOS, ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3]); printf("ospfHostTOS.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pHost->ospfHostTOS, pHost->ospfHostTOS); printf("ospfHostMetric.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pHost->ospfHostTOS, pHost->ospfHostMetric); printf("ospfHostStatus.%i.%i.%i.%i.%ld [integer] %s(%i)\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pHost->ospfHostTOS, rowStatus[pHost->ospfHostStatus], (int)pHost->ospfHostStatus); ospf_mApi_ipAddr2OctetString( pHost->ospfHostAreaId, ipStr ); printf("ospfHostAreaId.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pHost->ospfHostTOS, ipStr[0], ipStr[1], ipStr[2], ipStr[3]); printf("\n"); return;}/***************************************************************************************** ospfMapiHostShow - show routine for ospfHostTable** This routine displays all host interface instances found in the ospfHostTable for* debugging and diagnostic purposes.** RETURNS: OK or ERROR** ERRNO: N/A*/STATUS ospfMapiHostShow( void ){ /* make sure the facility is properly initialized */ OSPF_MAPI_SHOW_INIT_CHECK(); semTake( thisMapi->semMapiMutex, WAIT_FOREVER ); avlTreePrint( &thisMapi->ospfHostAvl.pOspfAvlRoot, ospfMapiHostPrint ); semGive( thisMapi->semMapiMutex ); return OK;}/***************************************************************************************** ospfMapiIfPrint - debug print routine for ospfMapiIfShow.** This routine is invoke by ospfMapiIfShow from the AVL Tree walk routine.** RETURNS: N/A** NOMANUAL*/LOCAL void ospfMapiIfPrint( void *pNode ){ uchar_t ipIndex[4]; uchar_t ipStr[4]; mApiOspfIf_t *pIf; pIf = (mApiOspfIf_t *)pNode; if ( pIf == NULL ) return; ospf_mApi_ipAddr2OctetString( pIf->ospfIfIpAddress, ipIndex ); printf("ospfIfIpAddress.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3]); printf("ospfAddressLessIf.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfAddressLessIf); ospf_mApi_ipAddr2OctetString( pIf->ospfIfAreaId, ipStr ); printf("ospfIfAreaId.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, ipStr[0], ipStr[1], ipStr[2], ipStr[3]); printf("ospfIfType.%i.%i.%i.%i.%ld [integer] %s(%i)\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, ifType[pIf->ospfIfType], (int)pIf->ospfIfType); printf("ospfIfAdminStat.%i.%i.%i.%i.%ld [integer] %s(%i)\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, status[pIf->ospfIfAdminStat], (int)pIf->ospfIfAdminStat); printf("ospfIfRtrPriority.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfRtrPriority ); printf("ospfIfTransitDelay.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfTransitDelay ); printf("ospfIfRetransInterval.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfRetransInterval); printf("ospfIfHelloInterval.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfHelloInterval); printf("ospfIfRtrDeadInterval.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfRtrDeadInterval); printf("ospfIfPollInterval.%i.%i.%i.%i.%ld [integer] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfPollInterval); printf("ospfIfState.%i.%i.%i.%i.%ld [integer] %s(%i)\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, ifState[pIf->ospfIfState], (int)pIf->ospfIfState); ospf_mApi_ipAddr2OctetString(pIf->ospfIfDesignatedRouter, ipStr ); printf("ospfIfDesignatedRouter.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, ipStr[0], ipStr[1], ipStr[2], ipStr[3]); ospf_mApi_ipAddr2OctetString(pIf->ospfIfBackupDesignatedRouter, ipStr ); printf("ospfIfBackupDesignatedRouter.%i.%i.%i.%i.%ld [ipaddress] %i.%i.%i.%i\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, ipStr[0], ipStr[1], ipStr[2], ipStr[3]); printf("ospfIfEvents.%i.%i.%i.%i.%ld [counter] %ld\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfEvents); if ( pIf->ospfIfAuthType == EmApiOspfAuthType_simplePasswd ) { if ( pIf->authKeyLen != 0 ) { printf("ospfIfAuthKey.%i.%i.%i.%i.%ld [octet string] %s\n", ipIndex[0], ipIndex[1], ipIndex[2], ipIndex[3], pIf->ospfAddressLessIf, pIf->ospfIfSimpleAuthKey ); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -