Index: includes/definitions/mibs/d-link.inc.php
===================================================================
--- includes/definitions/mibs/d-link.inc.php	(revision 10320)
+++ includes/definitions/mibs/d-link.inc.php	(working copy)
@@ -36,6 +36,105 @@
 $config['mibs'][$mib]['enable'] = 1;
 $config['mibs'][$mib]['mib_dir'] = 'd-link';
 
+$mib = 'PoE-MIB';
+$config['mibs'][$mib]['enable'] = 1;
+$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.171.12.24';
+$config['mibs'][$mib]['mib_dir'] = 'd-link';
+
+$mib = 'EQUIPMENT-MIB';
+$config['mibs'][$mib]['enable'] = 1;
+$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.171.12.11';
+$config['mibs'][$mib]['mib_dir'] = 'd-link';
+$config['mibs'][$mib]['descr'] = 'Equipment Common mib';
+
+$type = 'swPowerStatus';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'other',       'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'lowVoltage',  'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'overCurrent', 'event' => 'warning');
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'working',     'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'fail',        'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][5] = array('name' => 'connect',     'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'disconnect',  'event' => 'ok');
+
+
+$config['mibs'][$mib]['status'][] = array('measured'     => 'powersupply',
+                                          'table'        => 'swPowerTable',
+                                          'oid'          => 'swPowerStatus',
+                                          'type'         => 'swPowerStatus',
+                                          'oid_num'      => '.1.3.6.1.4.1.171.12.11.1.6.1.3',
+                                          'oid_descr'    => 'swPowerID',
+                                          'descr'        => 'Power Supply %oid_descr%');
+
+$type = 'swFanStatus';
+$config['mibs'][$mib]['states'][$type][0] = array('name' => 'other',       'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'working',     'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'fail',        'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'speed-0',     'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][4] = array('name' => 'speed-low',   'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][5] = array('name' => 'speed-middle','event' => 'ok');
+$config['mibs'][$mib]['states'][$type][6] = array('name' => 'speed-high',  'event' => 'ok');
+
+$config['mibs'][$mib]['status'][] = array('measured'     => 'fan',
+                                          'table'        => 'swFanTable',
+                                          'oid'          => 'swFanStatus',
+                                          'type'         => 'swFanStatus',
+                                          'oid_num'      => '.1.3.6.1.4.1.171.12.11.1.7.1.3',
+                                          'oid_descr'    => 'swFanID',
+                                          'descr'        => 'Fan %oid_descr%');
+
+
+$mib = 'DDM-MGMT-MIB';
+$config['mibs'][$mib]['enable'] = 1;
+$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.171.12.72';
+$config['mibs'][$mib]['mib_dir'] = 'd-link';
+
+$config['mibs'][$mib]['sensor'][] = array('measured'           => 'port',
+                                          'table'              => 'swDdmStatusTable',
+                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%swDdmPort%' ] ],
+                                          'class'              => 'temperature',
+                                          'oid'                => 'swDdmTemperature',
+                                          'descr'              => '%port_label% Temperature');
+
+$config['mibs'][$mib]['sensor'][] = array('measured'           => 'port',
+                                          'table'              => 'swDdmStatusTable',
+                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%swDdmPort%' ] ],
+                                          'class'              => 'voltage',
+                                          'oid'                => 'swDdmVoltage',
+                                          'descr'              => '%port_label% Voltage');
+
+$config['mibs'][$mib]['sensor'][] = array('measured'           => 'port',
+                                          'table'              => 'swDdmStatusTable',
+                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%swDdmPort%' ] ],
+                                          'class'              => 'current',
+                                          'oid'                => 'swDdmBiasCurrent',
+                                          'descr'              => '%port_label% TX Bias');
+
+$config['mibs'][$mib]['sensor'][] = array('measured'           => 'port',
+                                          'table'              => 'swDdmStatusTable',
+                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%swDdmPort%' ] ],
+                                          'class'              => 'dbm',
+                                          'oid'                => 'swDdmTxPower',
+                                          'descr'              => '%port_label% TX Power',
+                                          'unit'               => 'W',
+                                          'scale'              => 0.001);
+
+$config['mibs'][$mib]['sensor'][] = array('measured'           => 'port',
+                                          'table'              => 'swDdmStatusTable',
+                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%swDdmPort%' ] ],
+                                          'class'              => 'dbm',
+                                          'oid'                => 'swDdmRxPower',
+                                          'descr'              => '%port_label% RX Power',
+                                          'unit'               => 'W',
+                                          'scale'              => 0.001);
+
+/*
+SNMP table: DDM-MGMT-MIB::swDdmStatusTable
+
+ swDdmPort swDdmTemperature swDdmVoltage swDdmBiasCurrent swDdmTxPower swDdmRxPower
+         1          34.5742        3.261            30.08       0.0606       0.0893
+
+*/
+
 $mib = 'DES3026-L2MGMT-MIB';
 $config['mibs'][$mib]['enable'] = 1;
 $config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.171.11.63.3';
@@ -117,4 +324,48 @@
 // DES-1228-MIB::configNetMask.0 = IpAddress: 255.255.254.0
 // DES-1228-MIB::configGateway.0 = IpAddress: 192.168.10.1
 
+$mib = 'DLINK-MCB-MIB';
+$config['mibs'][$mib]['enable'] = 1;
+$config['mibs'][$mib]['identity_num'] = '.1.3.6.1.4.1.171.41';
+$config['mibs'][$mib]['mib_dir'] = 'd-link';
+
+$type = 'onoffStatus';
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'on',  'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'off', 'event' => 'warning');
+
+$type = 'mcbMCMediaLinkStatus';
+$config['mibs'][$mib]['states'][$type][1] = array('name' => 'online',  'event' => 'ok');
+$config['mibs'][$mib]['states'][$type][2] = array('name' => 'offline', 'event' => 'alert');
+$config['mibs'][$mib]['states'][$type][3] = array('name' => 'unsupported', 'event' => 'ignore');
+
+$config['mibs'][$mib]['status'][] = array('oid'      => 'mcbFramePowerOneOnStatus',
+                                          'descr'    => 'Power One',
+                                          'type'     => 'onoffStatus',
+                                          'measured' => 'powersupply',
+                                          'oid_num'  => '.1.3.6.1.4.1.171.41.1.3.1');
+
+$config['mibs'][$mib]['status'][] = array('oid'      => 'mcbFramePowerTwoOnStatus',
+                                          'descr'    => 'Power Two',
+                                          'type'     => 'onoffStatus',
+                                          'measured' => 'powersupply',
+                                          'oid_num'  => '.1.3.6.1.4.1.171.41.1.3.2');
+
+$config['mibs'][$mib]['status'][] = array('measured'           => 'port',
+                                          'table'              => 'mcbMCSlotTable',
+//                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifDescr', 'match' => '%mtxrOpticalName%' ] ],
+//                                          'class'              => 'wavelength',
+                                          'type'               => 'mcbMCMediaLinkStatus',
+                                          'oid'                => 'mcbMCMediaOneLinkStatus',
+                                          'oid_descr'          => 'mcbMCSlotName',
+                                          'descr'              => 'OneLinkStatus %index% %oid_descr%');
+
+$config['mibs'][$mib]['status'][] = array('measured'           => 'port',
+                                          'table'              => 'mcbMCSlotTable',
+                                          'measured_match'     => [ ['entity_type' => 'port', 'field' => 'ifIndex', 'match' => '%index%' ] ],
+//                                          'class'              => 'wavelength',
+                                          'type'               => 'mcbMCMediaLinkStatus',
+                                          'oid'                => 'mcbMCMediaTwoLinkStatus',
+                                          'oid_descr'          => 'mcbMCSlotName',
+                                          'descr'              => 'TwoLinkStatus %index% %oid_descr%');
+
 // EOF
