$f_switch [$f_port]
\n";
if ($f_snmp_index > 0) {
print "
\n";
print "| Список маков активных на порту |
\n";
if (! $f_snmp) {
$f_snmp_index = $f_port;
}
$fdb = get_fdb_port_table($f_ip, $f_snmp_index, $f_community, $f_version);
foreach ($fdb as $a_mac => $a_port) {
print "";
$auth = get_auth_by_mac($db_link, dec_to_hex($a_mac));
print "| " .$auth['auth'] . " | ". $auth['mac']." | \n";
print "
";
}
print "
\n";
}
?>
| Mac |
User |
Last found |
Список маков когда-либо обнаруженных на порту
\n";
$d_sql = "select A.ip,A.ip_int,A.mac,A.id,A.dns_name,A.last_found from User_auth as A, connections as C where C.port_id=$port_id and A.id=C.auth_id order by A.ip_int";
$t_device = mysqli_query($db_link, $d_sql);
while (list ($f_ip, $f_int, $f_mac, $f_auth_id, $f_dns, $f_last) = mysqli_fetch_array($t_device)) {
$name = $f_ip;
if (isset($f_dns) and $f_dns != '') {
$name = $f_dns;
}
print "";
print "| " . expand_mac($db_link,$f_mac) . " | \n";
print "" . $name . " | \n";
print "$f_last | \n";
print "
";
}
$maclist = mysqli_query($db_link, "SELECT mac,timestamp from Unknown_mac where port_id=$port_id order by timestamp desc");
while (list ($fmac, $f_last) = mysqli_fetch_array($maclist)) {
print "";
print "| " . expand_mac($db_link,$fmac) . " | \n";
print "Unknown | \n";
print "$f_last | \n";
print "
";
}
?>