2017-10-22 16:26:49 +00:00
|
|
|
<?php
|
|
|
|
|
2020-02-15 17:57:46 +00:00
|
|
|
require_once 'includes/status_messages.php';
|
2021-02-02 12:26:14 +00:00
|
|
|
require_once 'includes/internetRoute.php';
|
2021-03-07 17:36:48 +00:00
|
|
|
require_once 'includes/functions.php';
|
|
|
|
require_once 'includes/get_clients.php';
|
2017-10-22 16:26:49 +00:00
|
|
|
|
|
|
|
/**
|
2020-02-15 17:57:46 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2019-04-10 08:37:35 +00:00
|
|
|
function DisplayNetworkingConfig()
|
|
|
|
{
|
2017-10-22 16:26:49 +00:00
|
|
|
|
2019-04-10 08:37:35 +00:00
|
|
|
$status = new StatusMessages();
|
2017-10-22 16:26:49 +00:00
|
|
|
|
2019-04-10 08:37:35 +00:00
|
|
|
exec("ls /sys/class/net | grep -v lo", $interfaces);
|
2021-02-02 12:26:14 +00:00
|
|
|
$routeInfo = getRouteInfo(true);
|
|
|
|
$arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini');
|
|
|
|
$bridgedEnabled = $arrHostapdConf['BridgedEnable'];
|
2017-10-22 16:26:49 +00:00
|
|
|
|
2021-03-07 17:36:48 +00:00
|
|
|
foreach ($interfaces as $interface) {
|
|
|
|
exec("ip a show $interface", $$interface);
|
|
|
|
}
|
|
|
|
load_client_config();
|
|
|
|
$clients=getClients();
|
2021-02-02 12:26:14 +00:00
|
|
|
echo renderTemplate("networking", compact(
|
|
|
|
"status",
|
|
|
|
"interfaces",
|
|
|
|
"routeInfo",
|
2021-03-07 17:36:48 +00:00
|
|
|
"bridgedEnabled",
|
|
|
|
"clients")
|
2021-02-02 12:26:14 +00:00
|
|
|
);
|
2017-10-22 16:26:49 +00:00
|
|
|
}
|
2021-03-07 17:36:48 +00:00
|
|
|
|
|
|
|
?>
|