summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-05 23:38:02 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-05 23:38:02 +0000
commit532b0fb81731189cda49874d6f5dbffb33be69c0 (patch)
tree845c29ab12193019190cd46226b2cee4d283072d /etc
parent933a34dc77c1afdbcb79dffe66c6a395fb272a41 (diff)
downloadpfsense-532b0fb81731189cda49874d6f5dbffb33be69c0.zip
pfsense-532b0fb81731189cda49874d6f5dbffb33be69c0.tar.gz
Rename filter_translate_type_to_real_interface to interface_translate_type_to_real
Move this function to interfaces.inc where it belongs.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc17
-rw-r--r--etc/inc/pfsense-utils.inc15
-rw-r--r--etc/inc/vpn.inc2
3 files changed, 17 insertions, 17 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 845e042..a36eef3 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1052,7 +1052,7 @@ function interfaces_carp_configure() {
$vip_password = str_replace(" ", "", $vip_password);
if($vip['password'] != "")
$password = " pass \"" . $vip_password . "\"";
- $interface = filter_translate_type_to_real_interface($vip['interface']);
+ $interface = interface_translate_type_to_real($vip['interface']);
$carpint = "carp" . $carp_instances_counter;
switch ($vip['mode']) {
@@ -2033,7 +2033,7 @@ function convert_real_interface_to_friendly_interface_name($interface = "wan") {
return $ifname;
/* XXX: ermal - The 3 lines below are totally bogus code. */
- $int = filter_translate_type_to_real_interface($if);
+ $int = interface_translate_type_to_real($if);
if($ifname == $interface)
return $ifname;
@@ -2090,6 +2090,19 @@ function convert_real_interface_to_friendly_descr($interface) {
return $interface;
}
+/*
+ * interface_translate_type_to_real($interface):
+ * returns the real hardware interface name for a friendly interface. ie: wan
+ */
+function interface_translate_type_to_real($interface) {
+ global $config;
+
+ if ($config['interfaces'][$interface]['if'] <> "")
+ return $config['interfaces'][$interface]['if'];
+ else
+ return $interface;
+}
+
function get_real_interface($interface = "wan") {
global $config;
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 45e1ec5..753ba8e 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -226,7 +226,7 @@ function enable_hardware_offloading($interface) {
return;
/* translate wan, lan, opt -> real interface if needed */
- $int = filter_translate_type_to_real_interface($interface);
+ $int = interface_translate_type_to_real($interface);
if($int <> "") $interface = $int;
$int_family = preg_split("/[0-9]+/", $int);
$options = strtolower(`/sbin/ifconfig -m {$interface} | grep capabilities`);
@@ -615,19 +615,6 @@ function convert_ip_to_network_format($ip, $subnet) {
}
/*
- * filter_translate_type_to_real_interface($interface):
- * returns the real hardware interface name for a friendly interface. ie: wan
- */
-function filter_translate_type_to_real_interface($interface) {
- global $config;
- if($config['interfaces'][$interface]['if'] <> "") {
- return $config['interfaces'][$interface]['if'];
- } else {
- return $interface;
- }
-}
-
-/*
* get_carp_interface_status($carpinterface): returns the status of a carp ip
*/
function get_carp_interface_status($carpinterface) {
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 3b53145..5f4cad2 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -1148,7 +1148,7 @@ function vpn_pppoe_configure() {
case 'server' :
- $pppoe_interface = filter_translate_type_to_real_interface($pppoecfg['interface']);
+ $pppoe_interface = interface_translate_type_to_real($pppoecfg['interface']);
if ($pppoecfg['paporchap'] == "chap")
$paporchap = "set link enable chap";
OpenPOWER on IntegriCloud