#!/usr/local/bin/php -f $friendly) { /* point to this interface's config */ $ifconf = $config['interfaces'][$ifname]; /* look for 'special cases' */ switch($ifconf['ipaddr']) { case "carpdev-dhcp": $class = "(CarpDEV)"; break; case "dhcp": $class = "(DHCP)"; break; case "pppoe": $class = "(PPPoE)"; break; case "pptp": $class = "(PPTP)"; break; default: $class = ""; break; } $ipaddr = get_interface_ip($ifname); $subnet = get_interface_subnet($ifname); $ipaddr6 = get_interface_ipv6($ifname); $subnet6 = get_interface_subnetv6($ifname); $realif = get_real_interface($ifname); $tobanner = "{$friendly} ({$ifname})"; printf("\n %-15s -> %-10s -> %s/%s\t%s/%s %s", $tobanner, $realif, $ipaddr ? $ipaddr : "NONE", $subnet ? $subnet : "NONE", $ipaddr6 ? $ipaddr6 : "NONE", $subnet6 ? $subnet6 : "NONE", $class ); } ?>