/******************************************************************************
* Copyright 1991-2007 by Quantum, Inc. All rights reserved.
* No part of this work may be reproduced or transmitted in any
* form or by any means, electronic or mechanical, including
* photocopying and recording, or by any information storage
* or retrieval system, except as may be expressly permitted by
* the 17 U.S.C. section 101, et. seq., or in writing by
* Quantum, Inc.
*******************************************************************************/
/******************************************************************************
* Name: setupNetwork.htm
* Purpose: Setup the network paramiters
* $Id: setupNetworkV6.htm 1.8.2.14 2007/08/15 16:47:28MDT Bill Gray (bgray) dev $
* $ADICCopyright: Copyright 2007 Quantum Corp. $
*****************************************************************************/
include('common_admin_inc.htm');
$IPv6Enabled = is_ipv6_enabled();
class CNetInfoV6
{
var $ipDHCP;
var $ipStateless;
var $staticEnabled;
var $ipStatic;
var $gateway;
var $prefix;
function CNetInfoV6( $aIpDHCP, $aIpStateless, $aStaticEnabled, $aIpStatic="", $aGateway="", $aPrefix="" )
{
$this->ipDHCP = $aIpDHCP;
$this->ipStateless = $aIpStateless;
$this->staticEnabled= $aStaticEnabled;
$this->ipStatic = $aIpStatic;
$this->gateway = $aGateway;
$this->prefix = $aPrefix;
}
};
// Handle the progress screen if opened and get the NEW data
if ($_SERVER[REQUEST_METHOD] == "POST")
{
$operationInProgress = true;
$status = new ReturnStatus();
error_log("_POST = ". print_r($_POST, true) );
error_log("Setting the IPv6 settings.");
$staticEnabled = isset( $_POST['useStatic'] );
error_log("useStatic = ". $staticEnabled ? 'TRUE' : 'FALSE' );
// Set the DHCP Status
set_ipv6_dhcp_enabled( $user, $_POST['useDHCP'] );
// Set the Stateless Status
set_stateless_enabled( $user, $_POST['useStateless'] );
$ipAddress = isset( $_POST['ipAddress'] ) ? $_POST['ipAddress'] : "";
$gateway = isset( $_POST['gateway'] ) ? $_POST['gateway'] : "";
$prefix = isset( $_POST['prefix'] ) ? $_POST['prefix'] : "";
//$netInfoV6 = new CNetInfoV6($_POST['ipDHCP'], $_POST['ipStateless'], ($staticEnabled ? 1:0), $_POST['ipAddress'], $_POST['gateway'], $_POST['prefix'] );
$netInfoV6 = new CNetInfoV6("", "", ($staticEnabled ? 1:0), $ipAddress, $gateway, $prefix);
error_log("Sending set_network_configuration_ipv6 the following: ". print_r($netInfoV6, true) );
error_log("?????????????????????????????????????????????????????????????????????????????????");
set_network_configuration_ipv6($user, $netInfoV6 );
// 7-10-07 We took this out - I makes no since to have PHP wait - the the network changes before the 30 seconds
// we lose the connection anyway.
//error_log("Back from extentions - waiting 30 seconds to continue:");
// Give the spawned thread a few seconds to complete so we don't refresh the page with the OLD data
// This happens if the user just changes the host name or DNS without changing the IP address or DHCP
// sleep( 30 );
//error_log("30 seconds is over - the progress window should show now....");
print $status->closeOut(2); // Do not display the CLOSE button - the user must restart the browser or atleast the session
/*
echo "";
print $status->out();
error_log("Distroying the Session in updateSoftware");
session_destroy();
unset( $_SESSION['login'] );
unset( $_SESSION['user'] );
unset( $_SESSION );
error_log("Exiting now!!!");
exit(0);
*/
return;
}
else
{
// Load stuff up for the first time
$netConf = get_network_configuration_ipv6( $user );
error_log("netConf = ". print_r($netConf, true) );
// print_r( $netConf );
// echo "
";
// var_dump( $netConf );
$hostname = get_network_hostname($user);
$dhcpEnabled = is_ipv6_dhcp_enabled($user);
$statelessEnabled = is_stateless_enabled($user);
$ipv6Addrs = get_all_ipv6_addresses();
$staticEnabled = $netConf->staticEnabled;
error_log("staticEnabled = ". $staticEnabled );
error_log("ipv6Addrs = ". print_r($ipv6Addrs, true ) );
//$ipv6Addrs = array("2001::55:ee/64", "2001::55:3e/64", "2001::55:2e/64", "2001::55:1e/64", "2001::55:e9/64", "2001::55:e8/64", "2001::55:e7/64", "2001::55:e6/64", "2001::55:e5/64", "2001::55:e4/64", "2001::55:e3/64", "2001::55:e2/64", "2001::55:e1/64" );
}
?>
Setup - Network IPv6 | |
You may have both static and DHCP address' enabled with IPv6.
Enable DHCP to obtain the DHCP IP address automatically.
Modifying these settings will restart your network services such as web login. Logins and connections will be lost! Select the network settings you would like to modify on the library with the hostname "=$hostname?>" |