summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-03-22 23:19:40 +0000
committerErmal Luçi <eri@pfsense.org>2009-03-22 23:19:40 +0000
commitf2ba47f8daf76bcbdf62f77ab7e89776eb6314cf (patch)
treed1fa8b1145a845d5dba091b00eaab61327dfebf0 /etc/inc/pfsense-utils.inc
parent82ef398ab3b2250ae80f01cf267eebe2ba64aaf0 (diff)
downloadpfsense-f2ba47f8daf76bcbdf62f77ab7e89776eb6314cf.zip
pfsense-f2ba47f8daf76bcbdf62f77ab7e89776eb6314cf.tar.gz
* Keep only one function to return the mac address
* Bring the mac address function to interfaces.inc its the only consumer of those.
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc32
1 files changed, 0 insertions, 32 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 188df75..9d6403d 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -826,23 +826,6 @@ function log_error($error) {
return;
}
-/****f* pfsense-utils/get_interface_mac_address
- * NAME
- * get_interface_mac_address - Return a interfaces mac address
- * INPUTS
- * $interface - interface to obtain mac address from
- * RESULT
- * $mac - the mac address of the interface
- ******/
-function get_interface_mac_address($interface) {
- $mac = exec("ifconfig {$interface} | awk '/ether/ {print $2}'");
- if(is_macaddr($mac)) {
- return trim($mac);
- } else {
- return "";
- }
-}
-
/****f* pfsense-utils/return_dir_as_array
* NAME
* return_dir_as_array - Return a directory's contents as an array.
@@ -2468,21 +2451,6 @@ function display_topbar($text = "", $bg_color="#990000", $replace_color="#FFFFFF
echo "</script>";
}
-/****f* pfsense-utils/generate_random_mac_address
- * NAME
- * generate_random_mac - generates a random mac address
- * INPUTS
- * none
- * RESULT
- * $mac - a random mac address
- ******/
-function generate_random_mac_address() {
- $mac = "02";
- for($x=0; $x<5; $x++)
- $mac .= ":" . dechex(rand(16, 255));
- return $mac;
-}
-
/****f* pfsense-utils/strncpy
* NAME
* strncpy - copy strings
OpenPOWER on IntegriCloud