diff --git a/includes/discovery/cisco-cef.inc.php b/includes/discovery/cisco-cef.inc.php new file mode 100755 index 000000000..f3f54d95b --- /dev/null +++ b/includes/discovery/cisco-cef.inc.php @@ -0,0 +1,52 @@ + $afis) + { + $entity_name = $entity_array[$entity]['entPhysicalName'] ." - ".$entity_array[$entity]['entPhysicalModelName']; + echo("\n$entity $entity_name\n"); + foreach($afis as $afi => $paths) + { + echo(" |- $afi\n"); + foreach($paths as $path => $path_name) + { + echo(" | |-".$path.": ".$path_name['cefSwitchingPath']."\n"); + + + if(mysql_result(mysql_query("SELECT COUNT(*) FROM `cef` WHERE `device_id` = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity."' + AND `afi` = '".$afi."' AND `cef_index` = '".$path."'"),0) != "1") + { + $sql = "INSERT INTO `cef` (`device_id`, `entPhysicalIndex`, `afi`, `cef_index`, `cef_path`) + VALUES ('".$device['device_id']."', '".$entity."', '".$afi."', '".$path."', '".$path_name['cefSwitchingPath']."')"; + mysql_query($sql); + echo("+"); + } + + } + } + } +} + +## FIXME - need to delete old ones. FIXME REALLY. + +echo("\n"); + +?>