[Javanetsim-cvs] javaNetSim/guiUI EthPortProperties.java, 1.4, 1.5 SerPortProperties.java, 1.3, 1.4
Status: Beta
Brought to you by:
darkkey
From: QweR <qw...@us...> - 2008-09-14 20:51:36
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv21116/guiUI Modified Files: EthPortProperties.java SerPortProperties.java Log Message: commands "write mem", "ip access-list" was corrected turnOff/turnOn function was fixed Index: EthPortProperties.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/EthPortProperties.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EthPortProperties.java 17 Nov 2007 21:38:58 -0000 1.4 --- EthPortProperties.java 14 Sep 2008 20:51:29 -0000 1.5 *************** *** 304,320 **** String SC = txtMAC.getText(); if(SC.matches("[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]")){ ! NetworkLayerDevice temp = (NetworkLayerDevice)Sim.getNode(NodeName); ! temp.getConfig().executeCommand("int " + NodeInt + " mac-address " + SC); if(chkUP.isSelected()){ ! temp.getConfig().executeCommand("int " + NodeInt + " shutdown"); ! temp.getConfig().executeCommand("no int " + NodeInt + " shutdown"); ! // temp.getConfig().remove("int " + NodeInt + " shutdown"); ! // temp.getConfig().add("no int " + NodeInt + " shutdown"); }else{ ! temp.getConfig().executeCommand("int " + NodeInt + " shutdown"); ! // temp.getConfig().remove("int " + NodeInt + " shutdown"); ! // temp.getConfig().add("no int " + NodeInt + " shutdown"); } this.dispose(); --- 304,317 ---- String SC = txtMAC.getText(); if(SC.matches("[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]:[0-9A-F][0-9A-F]")){ ! NetworkLayerDevice tmpNode = (NetworkLayerDevice)Sim.getNode(NodeName); ! tmpNode.getConfig().executeCommand("int " + NodeInt + " mac-address " + SC); if(chkUP.isSelected()){ ! tmpNode.getConfig().executeCommand("int " + NodeInt + " shutdown"); ! tmpNode.getConfig().executeCommand("no int " + NodeInt + " shutdown"); }else{ ! tmpNode.getConfig().executeCommand("int " + NodeInt + " shutdown"); } + tmpNode.getConfig().executeCommand("write mem"); this.dispose(); Index: SerPortProperties.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SerPortProperties.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SerPortProperties.java 17 Nov 2007 21:38:58 -0000 1.3 --- SerPortProperties.java 14 Sep 2008 20:51:29 -0000 1.4 *************** *** 305,321 **** if(CR.matches("[0-9]+")){ if(Sim.getNode(NodeName) instanceof NetworkLayerDevice){ ! NetworkLayerDevice temp = (NetworkLayerDevice)Sim.getNode(NodeName); ! temp.getConfig().executeCommand("int " + NodeInt + " clock-rate " + CR); if(chkUP.isSelected()){ ! temp.getConfig().executeCommand("int " + NodeInt + " shutdown"); ! temp.getConfig().executeCommand("no int " + NodeInt + " shutdown"); ! // temp.getConfig().remove("int " + NodeInt + " shutdown"); ! // temp.getConfig().add("no int " + NodeInt + " shutdown"); }else{ ! temp.getConfig().executeCommand("int " + NodeInt + " shutdown"); ! // temp.getConfig().remove("int " + NodeInt + " shutdown"); ! // temp.getConfig().add("no int " + NodeInt + " shutdown"); } }else{ ((core.SerialNetworkInterface)Sim.getNode(NodeName).getNIC(NodeInt)).setClockRate(Integer.valueOf(CR)); --- 305,318 ---- if(CR.matches("[0-9]+")){ if(Sim.getNode(NodeName) instanceof NetworkLayerDevice){ ! NetworkLayerDevice tmpNode = (NetworkLayerDevice)Sim.getNode(NodeName); ! tmpNode.getConfig().executeCommand("int " + NodeInt + " clock-rate " + CR); if(chkUP.isSelected()){ ! tmpNode.getConfig().executeCommand("int " + NodeInt + " shutdown"); ! tmpNode.getConfig().executeCommand("no int " + NodeInt + " shutdown"); }else{ ! tmpNode.getConfig().executeCommand("int " + NodeInt + " shutdown"); } + tmpNode.getConfig().executeCommand("write mem"); }else{ ((core.SerialNetworkInterface)Sim.getNode(NodeName).getNIC(NodeInt)).setClockRate(Integer.valueOf(CR)); |