summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-16 20:40:03 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-16 20:40:03 +0000
commitffb4b005d197a3b4767f665cd652ddd46468e0ca (patch)
tree0aaf777619ed2230cfdab644ec559cdfe1543f46 /etc
parent01ae6c4092e4b16869b77fe30cd6646e41403d0d (diff)
downloadpfsense-ffb4b005d197a3b4767f665cd652ddd46468e0ca.zip
pfsense-ffb4b005d197a3b4767f665cd652ddd46468e0ca.tar.gz
MFC 6893
Add get_interface_mtu()
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc12
1 files changed, 11 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 5aeae1a..6929797 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -132,7 +132,7 @@ function enable_hardware_offloading($interface) {
* man polling on a freebsd box for the following list
*/
$supported_ints = array('dc', 'em', 'fwe', 'fwip', 'fxp', 'ixgb', 'ste',
- 'nge', 're', 'rl', 'sf', 'sis', 'ste', 'vge', 'vr', 'xl');
+ 'nge', 're', 'rl', 'sf', 'sis', 'ste', 'vge', 'vr', 'xl', 'fxp');
foreach($supported_ints as $int) {
if(stristr($interface,$int) != false) {
mwexec("/sbin/ifconfig {$interface} polling");
@@ -249,6 +249,16 @@ function is_carp_defined() {
return true;
}
+/****f* pfsense-utils/get_interface_mtu
+ * NAME
+ * get_interface_mtu - Return the mtu of an interface
+ * RESULT
+ * $tmp - Returns the mtu of an interface
+ ******/
+function get_interface_mtu($interface) {
+ $mtu = `/sbin/ifconfig {$interface} | /usr/bin/grep mtu | /usr/bin/cut -d" " -f4`;
+}
+
/****f* pfsense-utils/find_number_of_created_carp_interfaces
* NAME
* find_number_of_created_carp_interfaces - Return the number of CARP interfaces.
OpenPOWER on IntegriCloud