[Javanetsim-cvs] javaNetSim/guiUI GuiNode.java, 1.13, 1.14 Terminal.java, 1.21, 1.22
Status: Beta
Brought to you by:
darkkey
From: QweR <qw...@us...> - 2008-10-26 22:03:03
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32599/guiUI Modified Files: GuiNode.java Terminal.java Log Message: Added commands ip name-server int * databits int * flowcontrol int * parity int * speed int * stopbits Index: GuiNode.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiNode.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GuiNode.java 25 Oct 2008 21:33:32 -0000 1.13 --- GuiNode.java 26 Oct 2008 22:02:46 -0000 1.14 *************** *** 95,98 **** --- 95,100 ---- import javax.swing.SwingConstants; + import core.Link; + import core.NetworkInterface; import core.Node; import core.Simulation; *************** *** 379,387 **** for (int i = 0; i < ints.length; i++) { int int_type = Simulation.Sim.getNode(this.strNodeName).getIntType((String)ints[i]); ! boolean lineIsConnected = (Simulation.Sim.getNode(this.strNodeName).getNetworkInterface((String)ints[i]).getConnectedLink()!=null); if(int_type != core.NetworkInterface.Wireless && lineIsConnected){ ! ! JMenuItem mnuDI = new JMenuItem((String) ints[i]); mnuDI.addActionListener(new ActionListener() { --- 381,390 ---- for (int i = 0; i < ints.length; i++) { int int_type = Simulation.Sim.getNode(this.strNodeName).getIntType((String)ints[i]); ! NetworkInterface ni = Simulation.Sim.getNode(this.strNodeName).getNetworkInterface((String)ints[i]); ! boolean lineIsConnected = ni.getConnectedLink()!=null; if(int_type != core.NetworkInterface.Wireless && lineIsConnected){ ! ! JMenuItem mnuDI = new JMenuItem((String)ints[i]+" ("+ni.getConnectedLink().getLinkedNodeName(getName(), (String)ints[i])+")"); mnuDI.addActionListener(new ActionListener() { Index: Terminal.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/Terminal.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Terminal.java 24 Oct 2008 16:18:48 -0000 1.21 --- Terminal.java 26 Oct 2008 22:02:46 -0000 1.22 *************** *** 644,648 **** if(params.size()==1){ String ip = params.get(0); ! if(IPV4Address.validateDecIP(ip)){ out += "Type escape sequence to abort.\n"; out += "Sending 5, 4-byte ICMP Echos to "+params.get(0)+", timeout is 1 second:\n"; --- 644,658 ---- if(params.size()==1){ String ip = params.get(0); ! String dest = null; ! if(!IPV4Address.isValidIp(ip)){ ! Vector<String> addrs = ((ApplicationLayerDevice)device).resolve(ip); ! if(addrs.size()>0){ ! dest = addrs.get(0); ! } ! } ! else{ ! dest = ip; ! } ! if(dest!=null){ out += "Type escape sequence to abort.\n"; out += "Sending 5, 4-byte ICMP Echos to "+params.get(0)+", timeout is 1 second:\n"; *************** *** 651,654 **** --- 661,667 ---- out += "\\\\"; } + else{ + out += "Name '"+ip+"' was not resolved\n"; + } } else{ |