示例#1
0
function snmp_mib_load($mib, $module, $included_by, $mibdir = null)
{
    $mibs = array();
    foreach (snmp_mib_walk($mib, $module, $mibdir) as $obj) {
        $mibs[$obj['object_type']] = $obj;
        $mibs[$obj['object_type']]['included_by'] = $included_by;
    }
    d_print_r($mibs);
    // NOTE: `last_modified` omitted due to being automatically maintained by MySQL
    $columns = array('module', 'mib', 'object_type', 'oid', 'syntax', 'description', 'max_access', 'status', 'included_by');
    update_db_table('mibdefs', $columns, 3, $mibs);
    return count($mibs);
}
示例#2
0
function snmp_mib_load($mib, $module, $mibdir = null)
{
    $mibs = array();
    foreach (snmp_mib_walk($mib, $module, $mibdir) as $obj) {
        $mibs[$obj['object_type']] = $obj;
    }
    return $mibs;
}