// //OSPF // private void OSPFConfig_Click(object sender, EventArgs e) { progressIntOSPF.Value = 5; Putty internalOSPF = new InternalPutty(internalIPAddr, firewallIPAddr); internalOSPF.Configure_OSPF(); progressIntOSPF.Value = 65; //go to next page if it succeeded if (Putty.OSPFSuccess == true) { progressIntOSPF.Value = 100; //Hide current tab and show next BNAUWizard.TabPages.Clear(); BNAUWizard.TabPages.Add(networkTest); } else { progressIntOSPF.Value = 0; return; } }
// //Internal Config // private void ConfigureButton_Click(object sender, EventArgs e) { progressIntNetwork.Value = 5; //call the extract data class,and get the list ExtractData extractInternalData = new ExtractData(); extractInternalData.Extract_Internal_Data(); List <string> internalExtractedData = extractInternalData.GetInternalList(); string path = ExtractData.internalBecFilePath; if (path == null) { return; } //get the fourth octet of the firewall IP from config file string firewallIP_FO = ConfigurationManager.AppSettings.Get("FirewallIP"); //produce the subnet IP & the firewall IP from the internal IP internalIPAddr = internalExtractedData[0]; string[] internalIPArray = internalIPAddr.Split('.'); BNAUSubnetIP = internalIPArray[0] + "." + internalIPArray[1] + "." + internalIPArray[2]; firewallIPAddr = BNAUSubnetIP + firewallIP_FO; ConfigBNAUSubnetBox.Text = BNAUSubnetIP; progressIntNetwork.Value = 15; //call the putty internal class Putty internalConfig = new InternalPutty(internalIPAddr, firewallIPAddr); internalConfig.Configure(); progressIntNetwork.Value = 80; //get the ping success result if (Putty.consoleOutput.Contains("bytes from " + internalIPAddr)) { pingBNAUResult = true; } else { pingBNAUResult = false; } //determine whether cable is connected from ifconfig status if (Putty.consoleOutput.Contains("status: active")) { BNAUPlugged = true; } else { BNAUPlugged = false; } progressIntNetwork.Value = 85; //write log file WriteLog writeLog = new InternalLog(); writeLog.WriteLogFile(); progressIntNetwork.Value = 90; //go to next page if it succeeded if (Putty.configSuccess == true) { progressIntNetwork.Value = 100; //Hide current tab and show next BNAUWizard.TabPages.Clear(); BNAUWizard.TabPages.Add(OSPF); } else { progressIntNetwork.Value = 0; return; } }