diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-28 18:29:37 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-28 18:29:37 +0000 |
commit | cc869478c7a3213ba6848cab92edc880433317f8 (patch) | |
tree | 72f5e8462dc8d93b9b455446f23effbc9a9e1900 /etc | |
parent | e33c869497fa0afd49ecf87a7b89432fd84015cc (diff) | |
download | pfsense-cc869478c7a3213ba6848cab92edc880433317f8.zip pfsense-cc869478c7a3213ba6848cab92edc880433317f8.tar.gz |
Cleanup non-raw filter logs so more.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 2ae8aa5..83c448b 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -483,6 +483,25 @@ function execute_command_return_output($command) { } /* + * convert_real_interface_to_friendly_interface_name($interface): convert fxp0 -> wan, etc. + */ +function convert_real_interface_to_friendly_interface_name($interface) { + global $config; + $i = 0; + $ifdescrs = array('wan', 'lan'); + for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) { + $ifdescrs['opt' . $j] = "opt" . $j; + } + foreach ($ifdescrs as $ifdescr => $ifname) { + $int = filter_translate_type_to_real_interface($ifname); + $ifconfig = exec_command("/sbin/ifconfig {$int}"); + if(stristr($ifconfig,$interface) <> false) + return $ifname; + } + return $interface; +} + +/* * update_progress_bar($percent): updates the javascript driven progress bar. */ function update_progress_bar($percent) { |