Platform SDK: RAS/Routing and RAS

Obtaining the MIB II Interfaces Table

The following code uses MprAdminMIBEntryGet to obtain the MIB II interfaces table.

    HANDLE            _hMibSrv;  
    MIB_OPAQUE_QUERY  MibOpaqueQuery; 
    PMIB_OPAQUE_INFO  pMibOpaqueInfo = NULL; 
    DWORD  dwInSize, dwOutSize, dwResult; 
    PMIB_IFTABLE  pIntfTable; 
    
    MibOpaqueQuery.dwVarId = IF_TABLE; 
    dwInSize = sizeof( MIB_OPAQUE_QUERY ); 
    dwOutSize = 0; 
    
    dwResult = MprAdminMIBEntryGet ( _hMibSrv, 
                                    PID_IP, 
                                    IPRTRMGR_PID, 
                                    (PVOID)&MibOpaqueQuery, 
                                    dwInSize, 
                                    (PVOID *)&pMibOpaqueInfo, 
                                    &dwOutSize );

    if ( dwResult != NO_ERROR )
        return;
    
    if ( pMibOpaqueInfo == NULL ) 
        return; 
    
    pIntfTable = ( PMIB_IFTABLE ) pMibOpaqueInfo -> rgbyData; 

See Also

MIB_OPAQUE_INFO, MIB_OPAQUE_QUERY, MprAdminMIBEntryGet