diff --git a/includes/functions.php b/includes/functions.php index 9ed854e7..e7508ded 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -234,6 +234,19 @@ function ParseConfig($arrConfig) return $config; } +/** + * Fetches DHCP configuration for an interface, returned as JSON data + * + * @param string $interface + * @return json $jsonData + */ +function getNetConfig($interface) +{ + $URI = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'] .'/ajax/networking/get_netcfg.php?iface='.$interface; + $jsonData = file_get_contents($URI); + return $jsonData; +} + /** * * @param string $freq