diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-10-01 23:54:10 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-10-01 23:54:10 +0000 |
commit | b7ec2b9ea21bf22664637a496c0c7e0b4e5ea072 (patch) | |
tree | c13d641ffaf34c3b8d705a3842ca18070820df23 /etc/inc/interfaces.inc | |
parent | 4129df3962d11fc7a039232cafc64052285f2313 (diff) | |
download | pfsense-b7ec2b9ea21bf22664637a496c0c7e0b4e5ea072.zip pfsense-b7ec2b9ea21bf22664637a496c0c7e0b4e5ea072.tar.gz |
Add get_interface_mac() needed for Radius
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 4d6a091..6ec1e29 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1591,4 +1591,14 @@ function get_wireless_modes($interface) return($wireless_modes); } -?> +function get_interface_mac($interface) { + + /* build interface list with netstat */ + exec("/usr/bin/netstat -I $interface -nW -f link", $linkinfo); + array_shift($linkinfo); + $alink = preg_split("/\s+/", $linkinfo[0]); + $mac = chop($alink[3]); + return $mac; +} + +?>
\ No newline at end of file |