#!/usr/local/bin/php -f $ifinfo) { /* skip interfaces that don't have a friendly name */ if($ifinfo['friendly'] != "") { $friendly = strtoupper($ifinfo['friendly']); /* point to this interface's config */ $ifconf =& $config['interfaces'][$ifinfo['friendly']]; /* look for 'special cases' */ switch($ifconf['ipaddr']) { case "dhcp": $ifinfo['class'] = "(DHCP)"; break; case "pppoe": $ifinfo['class'] = "(PPPoE)"; $ifinfo['ipaddr'] = $iflist[$g['pppoe_interface']]['ipaddr']; break; case "pptp": $ifinfo['class'] = "(PPTP)"; $ifinfo['ipaddr'] = $iflist[$g['pppoe_interface']]['ipaddr']; break; } $tobanner = $friendly; /* does this interface have an extra description? */ if($ifconf['descr']) { $tobanner .= "({$ifconf['descr']})"; } /* is the interface up? */ if($ifinfo['up']) { $tobanner .= "*"; } printf("\n %-25s->\t%s\t->\t%s%s", $tobanner, $ifname, $ifinfo['ipaddr'] ? $ifinfo['ipaddr'] : "NONE", $ifinfo['class'] ); } } ?>