Implement routing table raw output

This commit is contained in:
billz
2022-04-21 09:52:09 +01:00
parent 4d93834e28
commit f0d1fe9b84
5 changed files with 42 additions and 0 deletions

View File

@@ -55,3 +55,14 @@ function getRouteInfo($checkAccess)
return $rInfo;
}
/*
* Fetches raw output of ip route
*
* @return string
*/
function getRouteInfoRaw()
{
exec('ip route list', $routes);
return $routes;
}

View File

@@ -14,6 +14,7 @@ function DisplayNetworkingConfig()
exec("ls /sys/class/net | grep -v lo", $interfaces);
$routeInfo = getRouteInfo(true);
$routeInfoRaw = getRouteInfoRaw();
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
@@ -21,6 +22,7 @@ function DisplayNetworkingConfig()
"status",
"interfaces",
"routeInfo",
"routeInfoRaw",
"bridgedEnabled")
);
}