isEnabled; error_log(print_r($webSSL,true)); // check to see if IPv6 currently ENABLED if (is_ipv6_enabled($user)) { $ipv6Enabled = 1; } // Determine which (if any) IPv4 addressing is ENABLED // Only DHCP or Static can be ENABLED at one time (not both) // Both DHCP and Static can be DISABLED at one time if ($ipv4Config->dhcpEnabled == 1) { $IPv4DHCP = 1; $IPv4Static = 0; } else if ($ipv4Config->ip != "0.0.0.0") { $IPv4DHCP = 0; $IPv4Static = 1; } else { $IPv4DHCP = 0; $IPv4Static = 0; } // If the prefix is NULL, preset the prefix field to 64 if ($ipv6Config->prefix == "") { $prefix = $ipv6Config->prefix; } else { $prefix = 64; } $IPv6Addresses[0] = "::/64"; $IPv6Addresses[1] = "::/64"; $IPv6Addresses[2] = "::/64"; $IPv6Addresses = get_all_ipv6_addresses($user); foreach($IPv6Addresses as $IPv6Address) { error_log(print_r($IPv6Address, true)); } // Determine which IPv6 addressing are ENABLED // Each addressing scheme can be ENABLED or DISABLED independently of each other //if (($ipv6Config->dhcpEnabled == true) && ($ipv6Enabled == 1)) { $IPv6DHCP = is_ipv6_dhcp_enabled($user); //$ipv6Config->ipDHCP = $IPv6Addresses[1]; // index 1 holds the dhcp address, undocumented if (($IPv6DHCP == "") || ($IPv6DHCP == 0) || ($IPv6DHCP == false)) { $IPv6DHCP = 0; } } // If the static IP field is set to 0s, we assume static address is not set if (($ipv6Config->ipStatic != "0:0:0:0:0:0:0:0") && ($ipv6Enabled == 1)) { $IPv6Static = 1; } //if (($IPv6Stateless == true) && ($ipv6Enabled == 1)) { $IPv6Stateless = is_stateless_enabled($user); if (($IPv6Stateless == "") || ($IPv6Stateless == 0) || ($IPv6Stateless == false)) { $IPv6Stateless = 0; } } // For every field in the web UI that takes an IP address as input, there is text in the label that will // indicate what IP version(s) the current configuration supports. // Determine which IP version is supported by the current configuration if (($IPv4DHCP || $IPv4Static) && (($IPv6DHCP || $IPv6Static || $IPv6Stateless) && ($ipv6Enabled == 1))) { $configured_ipv_text = "(IPv4 or IPv6)"; } else if ($IPv4DHCP || $IPv4Static) { $configured_ipv_text = "(IPv4)"; } else if ($IPv6DHCP || $IPv6Static) { $configured_ipv_text = "(IPv6)"; } ?>