javanetsim-cvs Mailing List for javaNetSim (Page 23)
Status: Beta
Brought to you by:
darkkey
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(120) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(1) |
Feb
(69) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(76) |
Oct
(28) |
Nov
(77) |
Dec
(186) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(36) |
Oct
(61) |
Nov
(23) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(17) |
Oct
(105) |
Nov
(5) |
Dec
(1) |
2009 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(9) |
Nov
|
Dec
|
From: Alexander B. <da...@us...> - 2006-10-12 17:26:29
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11183/core Modified Files: Switch.java Version.java Log Message: Index: Switch.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Switch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Switch.java 20 Nov 2005 20:30:53 -0000 1.2 --- Switch.java 12 Oct 2006 17:26:26 -0000 1.3 *************** *** 1,6 **** /* ! Java Firewall Simulator (jFirewallSim) ! Copyright (c) 2004, jFirewallSim development team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are --- 1,7 ---- /* ! Java Network Simulator (jNetSim) ! Copyright (c) 2005, Ice Team; All rights reserved. ! Copyright (c) 2004, jFirewallSim development team; All rights reserved. Redistribution and use in source and binary forms, with or without modification, are *************** *** 12,16 **** of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. --- 13,17 ---- of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. ! - Neither the name of the Ice Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *************** *** 26,59 **** EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - package core; ! /** ! * This clas holds a List of calls to the addNetworkInterface method ! * within Node.java ! * @author luke_hamilton ! * @since Oct 9, 2004 ! * @version v0.20 ! */ public class Switch extends DataLinkLayerDevice { /** ! * This method creates a switch with eight Network Interfaces * @author luke_hamilton ! * @param inName - The name of the Node eg: Switch1 * @param inProtocolStackLayers * @version v0.20 */ ! public Switch(String inName) { ! super(inName, 2); //pass name and protocolstack layer addNetworkInterface("eth0"); addNetworkInterface("eth1"); addNetworkInterface("eth2"); ! addNetworkInterface("eth3"); ! addNetworkInterface("eth4"); ! addNetworkInterface("eth5"); ! addNetworkInterface("eth6"); ! addNetworkInterface("eth7"); } ! }//EOF --- 27,186 ---- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package core; ! import java.util.*; ! ! /** ! * This class extends of the DataLinkLayerDevice and allows the ! * creation of switches ! * @author bevan_calliess ! * @author luke_hamilton ! * @author Key ! * @since Nov 8, 2005 ! * @version v0.22 ! **/ ! public class Switch extends DataLinkLayerDevice { /** ! * This creates a layer 2 switch with a default of 5 interface (ports) * @author luke_hamilton ! * @param inName The name of the Switch * @param inProtocolStackLayers * @version v0.20 */ ! ! int sz = 0; ! ! int buffSize = 255; ! ! Hashtable IntCaches; ! ! public Switch(String inName) { ! super(inName, 1); //pass name and protocolstack layer ! ! IntCaches = new Hashtable(); ! addNetworkInterface("eth0"); + Hashtable iceth0 = new Hashtable(); + IntCaches.put("eth0", iceth0); + addNetworkInterface("eth1"); + Hashtable iceth1 = new Hashtable(); + IntCaches.put("eth1", iceth1); + addNetworkInterface("eth2"); ! Hashtable iceth2 = new Hashtable(); ! IntCaches.put("eth2", iceth2); ! ! addNetworkInterface("eth3"); ! Hashtable iceth3 = new Hashtable(); ! IntCaches.put("eth3", iceth3); ! ! addNetworkInterface("eth4"); ! Hashtable iceth4 = new Hashtable(); ! IntCaches.put("eth4", iceth4); } ! ! public void Reset(){ ! sz = 0; ! } ! ! public int getState(){ ! return sz; ! } ! ! public String getSwitchCache(){ ! Enumeration it, it2; ! String nic = ""; ! String result = ""; ! ! it = NetworkInterfacetable.elements(); ! ! while(it.hasMoreElements()){ ! NetworkInterface tempInterface = (NetworkInterface)it.nextElement(); ! nic = tempInterface.getName(); ! Hashtable outInt = (Hashtable) IntCaches.get(nic); ! ! result = result + nic + ": "; ! ! it2 = outInt.keys(); ! ! while(it2.hasMoreElements()){ ! String mac = (String)it2.nextElement(); ! result = result + mac + "\t"; ! } ! ! result = result + "\n"; ! } ! ! return result; ! } ! ! /** ! * This method will recieve a packet from any of the connected links and the copy ! * the Packet and distribute a copy to each of the other connected links. ! * @author bevan_calliess ! * @param inPacket - The packet to be transported ! * @param inLinkName - The name of the link that sent the packet eg: eth0 ! */ ! ! protected void receivePacket(Packet inPacket,String inInterfaceName) throws LowLinkException{ ! if(sz!=1){ ! Ethernet_packet tempPacket = (Ethernet_packet)inPacket; ! Enumeration it; ! boolean intFound = false; ! String nic = ""; ! ! try{ ! Hashtable inInt = (Hashtable) IntCaches.get(inInterfaceName); ! inInt.put(tempPacket.getSourceMACAddress(), "1"); ! Ethernet_packet copyPacket = new Ethernet_packet(tempPacket.getData(), tempPacket.getDestinationMACAddress(),tempPacket.getSourceMACAddress()); ! ! it = NetworkInterfacetable.elements(); ! while(it.hasMoreElements()){ ! NetworkInterface tempInterface = (NetworkInterface)it.nextElement(); ! nic = tempInterface.getName(); ! Hashtable outInt = (Hashtable) IntCaches.get(nic); ! if(outInt.get(tempPacket.getDestinationMACAddress()) != null){ ! intFound = true; ! try{ ! tempInterface.sendPacket(copyPacket); ! System.out.println("\n\n" + getSwitchCache() + "\n\n"); ! }catch(NullPointerException e){ ! System.out.println("Switch.java: " + e.toString()); ! } ! } ! } ! ! it = NetworkInterfacetable.elements(); ! while(it.hasMoreElements() && !intFound){ ! //Test to see if the current Interface is the Interface that sent in the packet ! // if it is skip that interface ! NetworkInterface tempInterface = (NetworkInterface)it.nextElement(); ! if(!tempInterface.getName().equals(inInterfaceName)){ ! ! try{ ! tempInterface.sendPacket(copyPacket); ! System.out.println("\n\n" + getSwitchCache() + "\n\n"); ! }catch(NullPointerException e){ ! System.out.println("Switch.java: " + e.toString()); ! } ! } ! ! } ! ! }catch(Throwable th) ! { ! if(th.toString().contains("Packet lost due to physical link problems!")){ ! throw new LowLinkException(th.toString()); ! }else{ ! sz=1; ! System.out.println(th.toString()); ! throw new LowLinkException("Switch buffer overflow (packet loop flood?)."); ! } ! } ! } ! } ! } Index: Version.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Version.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Version.java 12 Oct 2006 16:14:14 -0000 1.5 --- Version.java 12 Oct 2006 17:26:26 -0000 1.6 *************** *** 40,44 **** public class Version { public final static String CORE_VERSION = "v0.32"; //version of the simulation core ! public static final String TEAM_MEMBERS[] = { "http://sf.net/projects/javanetsim","release date: 25 Sep 2006", "", --- 40,45 ---- public class Version { public final static String CORE_VERSION = "v0.32"; //version of the simulation core ! public final static String YEARS = "2005 - 2006"; ! public static final String TEAM_MEMBERS[] = { "http://sf.net/projects/javanetsim","release date: 25 Sep 2006", "", |
From: Alexander B. <da...@us...> - 2006-10-12 17:26:29
|
Update of /cvsroot/javanetsim/javaNetSim/images In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11183/images Modified Files: firewall.gif Log Message: Index: firewall.gif =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/images/firewall.gif,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsiig0Oc and /tmp/cvsqc4dYM differ |
From: Alexander B. <da...@us...> - 2006-10-12 16:14:21
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15455/guiUI Modified Files: HelpWindow.java MenuBar.java Log Message: Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MenuBar.java 12 Oct 2006 15:21:24 -0000 1.5 --- MenuBar.java 12 Oct 2006 16:14:14 -0000 1.6 *************** *** 21,28 **** //File menu private JMenu mnuFile = new JMenu("File"); ! private JMenuItem mnuNew = new JMenuItem("New"); //Create new simulation private JMenuItem mnuOpen = new JMenuItem("Open ..."); //Open a old simulation ! private JMenuItem mnuSave = new JMenuItem("Save ..."); //Save a simulation ! private JMenuItem mnuSaveAs = new JMenuItem("Save As..."); //Save a simulation private JMenuItem mnuExit = new JMenuItem("Exit"); //Exit appliction //private JMenuItem mnuClose = new JMenuItem("Close"); //Close --- 21,30 ---- //File menu private JMenu mnuFile = new JMenu("File"); ! private JMenuItem mnuNew = new JMenuItem("New"); //Create new simulation ! ! private JMenuItem mnuOpen = new JMenuItem("Open ..."); //Open a old simulation ! private JMenuItem mnuSave = new JMenuItem("Save ..."); //Save a simulation ! private JMenuItem mnuSaveAs = new JMenuItem("Save As..."); //Save a simulation private JMenuItem mnuExit = new JMenuItem("Exit"); //Exit appliction //private JMenuItem mnuClose = new JMenuItem("Close"); //Close *************** *** 68,72 **** private JMenu mnuHelp = new JMenu("Help"); private JMenuItem mnuAbout = new JMenuItem("About..."); ! //private JMenuItem mnuHelpPane = new JMenuItem("Help..."); --- 70,74 ---- private JMenu mnuHelp = new JMenu("Help"); private JMenuItem mnuAbout = new JMenuItem("About..."); ! private JMenuItem mnuHelpPane = new JMenuItem("ReadMe/ChangeLog"); *************** *** 87,91 **** private void buildMenu(){ ! //Add items to file menu mnuFile.add(mnuNew); mnuFile.add(mnuOpen); --- 89,115 ---- private void buildMenu(){ ! ! mnuNew.setAccelerator(KeyStroke.getKeyStroke("ctrl N")); ! mnuOpen.setAccelerator(KeyStroke.getKeyStroke("ctrl O")); ! mnuSave.setAccelerator(KeyStroke.getKeyStroke("ctrl S")); ! mnuPC.setAccelerator(KeyStroke.getKeyStroke("ctrl P")); ! mnuRouter.setAccelerator(KeyStroke.getKeyStroke("ctrl R")); ! mnuHub.setAccelerator(KeyStroke.getKeyStroke("ctrl H")); ! ! mnuClearConsole.setAccelerator(KeyStroke.getKeyStroke("F3")); ! mnuClearNodeInformation.setAccelerator(KeyStroke.getKeyStroke("F4")); ! ! mnuMsgLinkLayer.setAccelerator(KeyStroke.getKeyStroke("F9")); ! mnuMsgNetwork.setAccelerator(KeyStroke.getKeyStroke("F10")); ! mnuMsgTransport.setAccelerator(KeyStroke.getKeyStroke("F11")); ! mnuMsgApplication.setAccelerator(KeyStroke.getKeyStroke("F12")); ! ! mnuHelpPane.setAccelerator(KeyStroke.getKeyStroke("F1")); ! mnuExit.setAccelerator(KeyStroke.getKeyStroke("ctrl + Q")); ! ! mnuLayers.setAccelerator(KeyStroke.getKeyStroke("F7")); ! mnuPackets.setAccelerator(KeyStroke.getKeyStroke("F8")); ! ! //Add items to file menu mnuFile.add(mnuNew); mnuFile.add(mnuOpen); *************** *** 125,130 **** //Add items to help ! mnuHelp.add(mnuAbout); ! //mnuHelp.add(mnuHelpPane); // Set up Mnemonics for menu bar. --- 149,155 ---- //Add items to help ! mnuHelp.add(mnuHelpPane); ! mnuHelp.add(mnuAbout); ! // Set up Mnemonics for menu bar. *************** *** 351,359 **** }); */ ! /*mnuHelpPane.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ controller.showHelpPane(); } ! });*/ --- 376,384 ---- }); */ ! mnuHelpPane.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ controller.showHelpPane(); } ! }); Index: HelpWindow.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/HelpWindow.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HelpWindow.java 8 Nov 2005 04:04:28 -0000 1.1.1.1 --- HelpWindow.java 12 Oct 2006 16:14:14 -0000 1.2 *************** *** 52,61 **** { ClassLoader cl = this.getClass().getClassLoader(); ! this.setTitle("jFirewallSim Help"); initComponents(); ! String file="HtmlHelp/toc.html"; JScrollPane scrPane = new JScrollPane(jEditorPane1); ! this.setBounds(200,200, 400, 550); ! scrPane.setPreferredSize(new Dimension(450, 110)); this.getContentPane().add(scrPane, BorderLayout.CENTER); jEditorPane1.setEditable(false); --- 52,61 ---- { ClassLoader cl = this.getClass().getClassLoader(); ! this.setTitle("javaNetSim ReadMe/ChangeLog"); initComponents(); ! String file="README.txt"; JScrollPane scrPane = new JScrollPane(jEditorPane1); ! this.setBounds(50,50, 880, 640); ! scrPane.setPreferredSize(new Dimension(450, 400)); this.getContentPane().add(scrPane, BorderLayout.CENTER); jEditorPane1.setEditable(false); |
From: Alexander B. <da...@us...> - 2006-10-12 16:14:19
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15455/core Modified Files: EthernetNetworkInterface.java Simulation.java Version.java Log Message: Index: EthernetNetworkInterface.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/EthernetNetworkInterface.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EthernetNetworkInterface.java 23 Feb 2006 11:56:00 -0000 1.6 --- EthernetNetworkInterface.java 12 Oct 2006 16:14:14 -0000 1.7 *************** *** 102,106 **** pingInfo.setDataType("Ethernet Packet"); pingInfo.setLayer("Link"); ! pingInfo.setDescription("Recieved packet at interface "+MACAddress); Simulation.addLayerInfo(pingInfo); Packet temp = tempPacket.getData(); --- 102,106 ---- pingInfo.setDataType("Ethernet Packet"); pingInfo.setLayer("Link"); ! pingInfo.setDescription("Recieved and accepted packet at interface " + MACAddress); Simulation.addLayerInfo(pingInfo); Packet temp = tempPacket.getData(); *************** *** 109,113 **** }else{ //Packet is not for the Interface Drop Packet and record something in ! //the Layerinfo object } } --- 109,119 ---- }else{ //Packet is not for the Interface Drop Packet and record something in ! //the Layerinfo object ! LayerInfo pingInfo = new LayerInfo(getClass().getName()); ! pingInfo.setObjectName(parentNode.getName()); ! pingInfo.setDataType("Ethernet Packet"); ! pingInfo.setLayer("Link"); ! pingInfo.setDescription("Recieved and dropped packet at interface " + MACAddress); ! Simulation.addLayerInfo(pingInfo); } } Index: Simulation.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Simulation.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Simulation.java 22 Feb 2006 16:29:30 -0000 1.9 --- Simulation.java 12 Oct 2006 16:14:14 -0000 1.10 *************** *** 121,124 **** --- 121,125 ---- private static LayerInfoHandler Info = new LayerInfoHandler(); private static int PROTOCOL_TYPE; + // A script is just a Vector containing Strings right now *************** *** 147,151 **** linkTable = new Hashtable(); nodeTable = new Hashtable(); ! } /** --- 148,152 ---- linkTable = new Hashtable(); nodeTable = new Hashtable(); ! } /** Index: Version.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Version.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Version.java 12 Oct 2006 15:21:23 -0000 1.4 --- Version.java 12 Oct 2006 16:14:14 -0000 1.5 *************** *** 39,43 **** */ public class Version { ! public final static String CORE_VERSION = "v0.31"; //version of the simulation core public static final String TEAM_MEMBERS[] = { --- 39,43 ---- */ public class Version { ! public final static String CORE_VERSION = "v0.32"; //version of the simulation core public static final String TEAM_MEMBERS[] = { |
From: Alexander B. <da...@us...> - 2006-10-12 16:14:19
|
Update of /cvsroot/javanetsim/javaNetSim In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15455 Modified Files: README.txt Log Message: Index: README.txt =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/README.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README.txt 2 Sep 2006 07:53:15 -0000 1.4 --- README.txt 12 Oct 2006 16:14:14 -0000 1.5 *************** *** 3,25 **** ################################### ! Version: Public Release Version 0.30 ! Website: (none) ! ! ! ! ******************** ! *** Installation *** ! ******************** ! ! All Platforms ! ------------- ! ! 1. If you do not have the Java Runtime Environment (JRE) installed on your Operating System, the program will not be ! able to run. You must install the Java Runtime Environment 1.5.0_04 or later. This can be downloaded from www.java.com ! *********************** ! *** Getting Started *** *********************** --- 3,13 ---- ################################### ! Version: Public Release Version 0.32 ! Website: http://sf.net/projects/javanetsim ! Authors: See 'About' menu. *********************** ! ******* Install ******* *********************** *************** *** 27,41 **** ------- - If you have downloaded the pre-compiled zip version, find where you extracted the contents and run windows.bat - to start the Graphical User Interface. ! Note: The Java Network Simulator has only been fully tested under Windows XP and Linux (Gentoo). ! While there should be no problem running on other platforms, unexpected results may possibly occur. ********************* ! *** Release Notes *** ********************* ***** Release Version V 0.22.1 6th November 2005 ***** --- 15,57 ---- ------- ! 1. If you do not have the Java Runtime Environment (JRE) installed on your Operating System, the program will not be ! able to run. You must install the Java Runtime Environment 1.5.0_07 or later. This can be downloaded from www.java.com ! ! ! 2. If you have downloaded the pre-compiled zip version, find where you extracted the contents and run windows.bat/linux.sh ! to start the Graphical User Interface. ! ! Note: The Java Network Simulator has only been fully tested under WinXP and Linux (Gentoo/Fedora). ! While there should be no problem running on other platforms, unexpected results may possibly occur. ********************* ! ***** ChangeLog ***** ********************* + ***** Release Version V 0.32 12th November 2006 ***** + + Fixed + ----- + + GUI Issues - + + 1. Fixed changing mask when changing IP and existing mask isn't null/illegal + 2. Added confirm when deleting an object. + 3. Fixed showing counters on router. + + Simulation Issues - + + 1. Now showing information about accepting/dropping ethernet packet on interface (it depends on dest MAC comparison). + 2. Fixed resetting counters on router. + + New Features + ------------ + + 1. Added hotkeys. + 2. Added 'readme/changelog' window and menu item. + + ***** Release Version V 0.22.1 6th November 2005 ***** |
From: Alexander B. <da...@us...> - 2006-10-12 15:21:57
|
Update of /cvsroot/javanetsim/javaNetSim/images In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26979/images Modified Files: README.txt firewall.gif Log Message: Index: firewall.gif =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/images/firewall.gif,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvs6Ed7OT and /tmp/cvsPRPfDc differ Index: README.txt =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/images/README.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.txt 8 Nov 2005 16:51:49 -0000 1.2 --- README.txt 12 Oct 2006 15:21:24 -0000 1.3 *************** *** 1 **** ! This directory is to contain all images for the jfirewallsim project --- 1 ---- ! This directory is to contain all images for the javaNetSim project |
From: Alexander B. <da...@us...> - 2006-10-12 15:21:37
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26979/guiUI Modified Files: MainScreen.java MenuBar.java SetTCPIPPropertiesDialog.java Log Message: Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** MainScreen.java 23 Sep 2006 07:32:13 -0000 1.43 --- MainScreen.java 12 Oct 2006 15:21:24 -0000 1.44 *************** *** 1542,1545 **** --- 1542,1547 ---- public void deleteNode(String inNodeName, GuiNode inNode){ + if(JOptionPane.showConfirmDialog(this,"Delete " + inNodeName + "?","Confirm delete!",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION){ + try { *************** *** 1583,1586 **** --- 1585,1589 ---- } + } } *************** *** 3286,3291 **** int inIPCount = PS.getinputIPCount(); int outIPCount= PS.getoutputIPCount(); ! String msg = "Counters: \n\n Recieved IP Packets: " + Integer.valueOf(inIPCount).toString() + "\n Sent IP Packets: " + Integer.valueOf(outIPCount).toString() + "\n ARP Packets: " + Integer.valueOf(ARPCount).toString() + --- 3289,3301 ---- int inIPCount = PS.getinputIPCount(); int outIPCount= PS.getoutputIPCount(); + String msg = ""; ! try{ ! if(Sim.getNode(inNodeName) instanceof core.NetworkLayerDevice){ ! msg = "Counters: \n\n Recieved IP Packets: " + Integer.valueOf(inIPCount).toString() + ! "\n Sent IP Packets: " + Integer.valueOf(outIPCount).toString() + ! "\n ARP Packets: " + Integer.valueOf(ARPCount).toString(); ! }else{ ! msg = "Counters: \n\n Recieved IP Packets: " + Integer.valueOf(inIPCount).toString() + "\n Sent IP Packets: " + Integer.valueOf(outIPCount).toString() + "\n ARP Packets: " + Integer.valueOf(ARPCount).toString() + *************** *** 3297,3302 **** "\n Recieved UDP segments: " + Integer.valueOf(PS.getUDPinputCount()).toString() + "\n Sent UDP segments: " + Integer.valueOf(PS.getUDPoutputCount()).toString(); ! JOptionPane.showMessageDialog(this,msg,inNodeName + ": packet counters.",JOptionPane.INFORMATION_MESSAGE); } --- 3307,3313 ---- "\n Recieved UDP segments: " + Integer.valueOf(PS.getUDPinputCount()).toString() + "\n Sent UDP segments: " + Integer.valueOf(PS.getUDPoutputCount()).toString(); ! } JOptionPane.showMessageDialog(this,msg,inNodeName + ": packet counters.",JOptionPane.INFORMATION_MESSAGE); + }catch(Exception e){} } Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MenuBar.java 2 Mar 2006 13:37:04 -0000 1.4 --- MenuBar.java 12 Oct 2006 15:21:24 -0000 1.5 *************** *** 68,72 **** private JMenu mnuHelp = new JMenu("Help"); private JMenuItem mnuAbout = new JMenuItem("About..."); ! private JMenuItem mnuHelpPane = new JMenuItem("Help..."); --- 68,72 ---- private JMenu mnuHelp = new JMenu("Help"); private JMenuItem mnuAbout = new JMenuItem("About..."); ! //private JMenuItem mnuHelpPane = new JMenuItem("Help..."); *************** *** 126,130 **** //Add items to help mnuHelp.add(mnuAbout); ! mnuHelp.add(mnuHelpPane); // Set up Mnemonics for menu bar. --- 126,130 ---- //Add items to help mnuHelp.add(mnuAbout); ! //mnuHelp.add(mnuHelpPane); // Set up Mnemonics for menu bar. *************** *** 160,164 **** mnuHelp.setMnemonic('H'); mnuAbout.setMnemonic('A'); ! mnuHelpPane.setMnemonic('H'); --- 160,164 ---- mnuHelp.setMnemonic('H'); mnuAbout.setMnemonic('A'); ! //mnuHelpPane.setMnemonic('H'); *************** *** 351,359 **** }); */ ! mnuHelpPane.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ controller.showHelpPane(); } ! }); --- 351,359 ---- }); */ ! /*mnuHelpPane.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ controller.showHelpPane(); } ! });*/ Index: SetTCPIPPropertiesDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SetTCPIPPropertiesDialog.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SetTCPIPPropertiesDialog.java 8 Nov 2005 04:04:28 -0000 1.1.1.1 --- SetTCPIPPropertiesDialog.java 12 Oct 2006 15:21:24 -0000 1.2 *************** *** 484,490 **** lblError.setVisible(false); IPAddress = ip; ! SubnetMask = Simulation.getDefaultSubnetMask(IPAddress); ! txtSubnetMask.setText(SubnetMask); ! txtSubnetMask.setEnabled(true); ErrorFlag = false; } --- 484,492 ---- lblError.setVisible(false); IPAddress = ip; ! if(txtSubnetMask.getText().equals("Enter Subnet Mask") || txtSubnetMask.getText() == null || txtSubnetMask.getText().equals("0.0.0.0")){ ! SubnetMask = Simulation.getDefaultSubnetMask(IPAddress); ! txtSubnetMask.setText(SubnetMask); ! txtSubnetMask.setEnabled(true); ! } ErrorFlag = false; } *************** *** 552,558 **** --- 554,562 ---- if(Simulation.validateDecIP(tempip)){ + if(txtSubnetMask.getText().equals("Enter Subnet Mask") || txtSubnetMask.getText() == null || txtSubnetMask.getText().equals("0.0.0.0")){ String tempSubnet = Simulation.getDefaultSubnetMask(tempip); txtSubnetMask.setText(tempSubnet); txtSubnetMask.setEnabled(true); + } btnOk.setEnabled(true); }else{ |
From: Alexander B. <da...@us...> - 2006-10-12 15:21:34
|
Update of /cvsroot/javanetsim/javaNetSim In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26979 Modified Files: windows.bat Log Message: Index: windows.bat =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/windows.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** windows.bat 8 Dec 2005 18:44:58 -0000 1.2 --- windows.bat 12 Oct 2006 15:21:23 -0000 1.3 *************** *** 1,2 **** rem Java > 1.5 ! java -jar jNetSim.jar --- 1,2 ---- rem Java > 1.5 ! java -jar javaNetSim.jar |
From: Alexander B. <da...@us...> - 2006-10-12 15:21:31
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26979/core/protocolsuite/tcp_ip Modified Files: ProtocolStack.java Log Message: Index: ProtocolStack.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ProtocolStack.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** ProtocolStack.java 3 Sep 2006 19:34:31 -0000 1.48 --- ProtocolStack.java 12 Oct 2006 15:21:23 -0000 1.49 *************** *** 1415,1420 **** packetoutputIPCounter = 0; packetARPCounter = 0; ! mUDPprotocol.ResetCounters(); ! mTCPprotocol.ResetCounters(); } --- 1415,1420 ---- packetoutputIPCounter = 0; packetARPCounter = 0; ! if(mUDPprotocol != null) mUDPprotocol.ResetCounters(); ! if(mTCPprotocol != null) mTCPprotocol.ResetCounters(); } |
From: Alexander B. <da...@us...> - 2006-10-12 15:21:31
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26979/core Modified Files: Version.java Log Message: Index: Version.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Version.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Version.java 23 Feb 2006 14:37:07 -0000 1.3 --- Version.java 12 Oct 2006 15:21:23 -0000 1.4 *************** *** 36,49 **** * @author Key * @since Sep 23, 2004 ! * @version v0.30 */ public class Version { ! public final static String CORE_VERSION = "v0.30"; //version of the simulation core public static final String TEAM_MEMBERS[] = { ! "fork of jFirewallSim project (http://sf.net/projects/jfirewallsim/)", "", ! "from 03 November 2005","", ! "Alexander Bolshev [Key]", "Project Manager / Developer / Maintainer", ! "Gift", "Developer / Configuration Developer", "Konstantin Karpov [QweR]", "Developer / Tester", "", "" --- 36,50 ---- * @author Key * @since Sep 23, 2004 ! * @version v0.31 */ public class Version { ! public final static String CORE_VERSION = "v0.31"; //version of the simulation core public static final String TEAM_MEMBERS[] = { ! "http://sf.net/projects/javanetsim","release date: 25 Sep 2006", "", ! "fork of jFirewallSim project (http://sf.net/projects/jfirewallsim/)", ! "from 03 Nov 2005","", ! "Alexander Bolshev [Key]", "Project Leader / Developer / Maintainer", ! "Ilgar Alekperov [Gift]", "Developer / Configuration Developer", "Konstantin Karpov [QweR]", "Developer / Tester", "", "" |
From: Alexander B. <da...@us...> - 2006-09-23 07:32:18
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20585/guiUI Modified Files: MainScreen.java Log Message: Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** MainScreen.java 2 Sep 2006 11:22:52 -0000 1.42 --- MainScreen.java 23 Sep 2006 07:32:13 -0000 1.43 *************** *** 1943,1948 **** public void Open(){ - System.out.println("testitng code open"); - printLayerInfo(false); --- 1943,1946 ---- *************** *** 1967,1971 **** File inFile = chooser.getSelectedFile(); ! System.out.println(inFile.getPath()); File simFile; --- 1965,1969 ---- File inFile = chooser.getSelectedFile(); ! //System.out.println(inFile.getPath()); File simFile; |
From: Alexander B. <da...@us...> - 2006-09-23 07:31:52
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19442/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** Tcp.java 8 Sep 2006 18:40:30 -0000 1.86 --- Tcp.java 23 Sep 2006 07:31:48 -0000 1.87 *************** *** 1421,1434 **** // System.out.println("1"); ! Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "1")); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { ! Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "2")); Elm.SentACKs.remove(inPacket.get_sequence_number()); ! Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "3")); } // System.out.println("4"); ! Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "4")); // if (Elm.received_segments>2) // listener.RecvData(inPacket.getTCP_message()); --- 1421,1434 ---- // System.out.println("1"); ! //Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "1")); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { ! //Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "2")); Elm.SentACKs.remove(inPacket.get_sequence_number()); ! //Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "3")); } // System.out.println("4"); ! //Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "4")); // if (Elm.received_segments>2) // listener.RecvData(inPacket.getTCP_message()); *************** *** 1436,1440 **** PassUpstairs(listener, Elm); // System.out.println("5"); ! Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "5")); } --- 1436,1440 ---- PassUpstairs(listener, Elm); // System.out.println("5"); ! //Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "5")); } |
From: Alexander B. <da...@us...> - 2006-09-09 13:44:05
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20741/core/protocolsuite/tcp_ip Modified Files: Echo.java Echo_tcp.java Log Message: Index: Echo_tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo_tcp.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Echo_tcp.java 3 Sep 2006 14:32:08 -0000 1.28 --- Echo_tcp.java 9 Sep 2006 13:43:58 -0000 1.29 *************** *** 36,39 **** --- 36,40 ---- private long utc1; + public int recieved; /** Creates a new instance of Echo */ *************** *** 50,53 **** --- 51,55 ---- public void Listen() throws TransportLayerException{ //throw new TransportLayerException("Cannot bind port " + listenPort + "."); + recieved = 0; try{ if(appType != 0) mParentStack.ListenTCP(this, listenPort); *************** *** 68,71 **** --- 70,74 ---- { mParentStack.FreeTCPApplication(this); + recieved = 0; } *************** *** 174,177 **** --- 177,182 ---- public void RecvData(String Data) throws LowLinkException, TransportLayerException { //processing the protocol doings. + recieved++; + if(appType == 0){ //client processing recieve *************** *** 200,204 **** protInfo2.setDataType("Echo Protocol Data"); protInfo2.setLayer("Application "); ! protInfo2.setDescription("Connection time: " + (long)(System.currentTimeMillis () - utc1) + " ms."); Simulation.addLayerInfo(protInfo2); }else{ --- 205,209 ---- protInfo2.setDataType("Echo Protocol Data"); protInfo2.setLayer("Application "); ! protInfo2.setDescription("Connection time: " + (long)(System.currentTimeMillis () - utc1) + " ms. Total recieved messages: " + recieved + "."); Simulation.addLayerInfo(protInfo2); }else{ *************** *** 226,230 **** protInfo.setDataType("Echo Protocol Data"); protInfo.setLayer("Application "); ! protInfo.setDescription("Recieving echo message '" + Data + "' from client."); Simulation.addLayerInfo(protInfo); --- 231,235 ---- protInfo.setDataType("Echo Protocol Data"); protInfo.setLayer("Application "); ! protInfo.setDescription("Recieving echo message '" + Data + "' from client. Total recieved messages: " + recieved + "."); Simulation.addLayerInfo(protInfo); *************** *** 258,261 **** --- 263,267 ---- mParentStack.FreeTCPApplication(this); + recieved = 0; this.counts = counts; Index: Echo.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Echo.java 28 Feb 2006 18:14:22 -0000 1.20 --- Echo.java 9 Sep 2006 13:43:58 -0000 1.21 *************** *** 29,32 **** --- 29,33 ---- long utc1; + public int recieved; /** Creates a new instance of Echo */ *************** *** 131,134 **** --- 132,136 ---- */ public void RecvData(String Data) throws LowLinkException, TransportLayerException { + recieved++; //processing the protocol doings. if(appType == 0){ *************** *** 157,161 **** protInfo.setDataType("Echo Protocol Data"); protInfo.setLayer("Application "); ! protInfo.setDescription("Recieving echo message '" + Data + "' from client."); Simulation.addLayerInfo(protInfo); --- 159,163 ---- protInfo.setDataType("Echo Protocol Data"); protInfo.setLayer("Application "); ! protInfo.setDescription("Recieving echo message '" + Data + "' from client. Total recieved messages: " + recieved); Simulation.addLayerInfo(protInfo); *************** *** 196,199 **** --- 198,202 ---- utc1 = System.currentTimeMillis () ; + recieved = 0; for(int c=0; c<counts; c++){ *************** *** 223,227 **** protInfo2.setDataType("Echo Protocol Data"); protInfo2.setLayer("Application "); ! protInfo2.setDescription("Connection time: " + (long)(System.currentTimeMillis () - utc1) + " ms."); Simulation.addLayerInfo(protInfo2); } --- 226,230 ---- protInfo2.setDataType("Echo Protocol Data"); protInfo2.setLayer("Application "); ! protInfo2.setDescription("Connection time: " + (long)(System.currentTimeMillis () - utc1) + " ms. Sent messages: " + counts + " Recieved messages: " + recieved); Simulation.addLayerInfo(protInfo2); } |
From: Alexander B. <da...@us...> - 2006-09-09 13:44:05
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20741/core Modified Files: EthernetLink.java FalseRandom.java Log Message: Index: EthernetLink.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/EthernetLink.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** EthernetLink.java 3 Sep 2006 13:49:15 -0000 1.9 --- EthernetLink.java 9 Sep 2006 13:43:58 -0000 1.10 *************** *** 86,94 **** if (!temp.getSourceName().equals(inSourceName)) { ! /*if( ((sievingCoefficient)/100)>Math.random()) temp.receivePacket(inPacket); ! else throw new LowLinkException("Packet lost due to physical link problems!"); ! */ ! int cat = FalseRandom.Kotochigov(); System.out.println("Cat runs across the blackboard and generates... " + cat + "!"); --- 86,94 ---- if (!temp.getSourceName().equals(inSourceName)) { ! if( ((sievingCoefficient)/100)>Math.random()) temp.receivePacket(inPacket); ! else throw new LowLinkException("(***) Packet lost due to physical link problems!"); ! ! /*int cat = FalseRandom.Kotochigov(); System.out.println("Cat runs across the blackboard and generates... " + cat + "!"); *************** *** 96,100 **** if(cat==1) temp.receivePacket(inPacket); ! else throw new LowLinkException("(***) Packet lost due to physical link problems!"); } } --- 96,100 ---- if(cat==1) temp.receivePacket(inPacket); ! else throw new LowLinkException("(***) Packet lost due to physical link problems!");*/ } } Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** FalseRandom.java 8 Sep 2006 18:40:30 -0000 1.18 --- FalseRandom.java 9 Sep 2006 13:43:58 -0000 1.19 *************** *** 10,13 **** --- 10,15 ---- //int sequence[] = {1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + //int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; *************** *** 17,25 **** //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1}; if(count >= sequence.length) count = 0; --- 19,32 ---- //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! //int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + //int sequence[] = {1}; + + + //int sequence[] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + if(count >= sequence.length) count = 0; |
From: gift <gi...@us...> - 2006-09-08 18:40:37
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30581/core Modified Files: FalseRandom.java Log Message: no window :( Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** FalseRandom.java 8 Sep 2006 15:39:43 -0000 1.17 --- FalseRandom.java 8 Sep 2006 18:40:30 -0000 1.18 *************** *** 17,21 **** //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; --- 17,21 ---- //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
From: gift <gi...@us...> - 2006-09-08 18:40:35
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30581/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: no window :( Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** Tcp.java 8 Sep 2006 17:19:55 -0000 1.85 --- Tcp.java 8 Sep 2006 18:40:30 -0000 1.86 *************** *** 791,808 **** Elm = (TCP_HashTableElement) PortTable.get(insrcPort); // System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); ! Integer gg = new Integer(0); ! System.out.println(" [*** TCP ***] GetTCPPacket_tosend call."); ! if (!Elm.ReceivedACKs.isEmpty()) gg = GetNumber(Elm.ReceivedACKs); ! System.out.println(" [*** TCP ***] gg after GetNumber =" + gg + "."); ! System.out.println(" [*** TCP ***] if condition: " + (Elm.seq_number <= gg+window_size || flags[1] || flags[4] || flags[5]) + "."); // System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); ! if (Elm.seq_number <= gg+window_size || flags[1] || flags[4] || flags[5]) { int s_num; --- 791,810 ---- Elm = (TCP_HashTableElement) PortTable.get(insrcPort); // System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); ! //Integer gg = new Integer(0); ! System.out.println(" [*** TCP ***] GetTCPPacket_tosend call on host " + inSourceIPAddress + "."); ! System.out.println(" [*** TCP ***] Going to send SEQ=" + Elm.seq_number + " ACK=" + acknow_num + "."); ! //if (!Elm.ReceivedACKs.isEmpty()) gg = GetNumber(Elm.ReceivedACKs); ! //System.out.println(" [*** TCP ***] gg after GetNumber =" + gg + "."); ! ! //System.out.println(" [*** TCP ***] if condition: " + (Elm.seq_number <= gg+window_size || flags[1] || flags[4] || flags[5]) + "."); // System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); ! // if (Elm.seq_number <= gg+window_size || flags[1] || flags[4] || flags[5]) { int s_num; *************** *** 833,837 **** //here we push out segment in Hashtable SegmentsToResend and increment counters ! s_num=Elm.seq_number; //getting sequence number 0-for SYN if (Elm.ReceivedSegments.isEmpty()) a_num=0; else a_num=acknow_num; //(Integer)Elm.ReceivedSegments.lastElement()+1; //getting ACK number 0 - for SYN, 1 - as a reply for SYN ... so on --- 835,842 ---- //here we push out segment in Hashtable SegmentsToResend and increment counters ! ! //s_num = (flags[1] && !flags[4] && !flags[5]) ? -1 : Elm.seq_number; //getting sequence number 0-for SYN, -1 for ACK ! s_num = Elm.seq_number; //getting sequence number 0-for SYN, -1 for ACK ! if (Elm.ReceivedSegments.isEmpty()) a_num=0; else a_num=acknow_num; //(Integer)Elm.ReceivedSegments.lastElement()+1; //getting ACK number 0 - for SYN, 1 - as a reply for SYN ... so on *************** *** 844,848 **** //counters inc Elm.sent_segments++; //UNIQUE ID ! Elm.seq_number++; //inc for next segment if (!(flags[4] && a_num==0) && flags[1]) Elm.sent_ACK++; //inc in case this is an ACK-segment --- 849,853 ---- //counters inc Elm.sent_segments++; //UNIQUE ID ! Elm.seq_number++; //= ((flags[1] && !flags[4] && !flags[5])) ? Elm.seq_number : Elm.seq_number+1; //inc for next segment if (!(flags[4] && a_num==0) && flags[1]) Elm.sent_ACK++; //inc in case this is an ACK-segment *************** *** 882,891 **** Simulation.addLayerInfo(TCP_Info); ! System.out.println(" [*** TCP ***] GetTCPPacket_tosend end of call."); return tosend; ! } else{ ! throw new TransportLayerException("TCP Error: window size limit reached! Can not send segments. Wait for acknowledgenemts. Current window size is \"" + window_size +"\"."); ! } } --- 887,896 ---- Simulation.addLayerInfo(TCP_Info); ! System.out.println(" [*** TCP ***] GetTCPPacket_tosend end of call on host " + inSourceIPAddress + "."); return tosend; ! // } else{ ! // throw new TransportLayerException("TCP Error: window size limit reached! Can not send segments. Wait for acknowledgenemts. Current window size is \"" + window_size +"\"."); ! // } } *************** *** 1083,1087 **** Elm.ReceivedSegments.addElement(chk); //adding seq_number that we have received Integer our_ack = (Integer)inPacket.get_acknowledgment_number(); ! Elm.ReceivedACKs.addElement(our_ack); //adding ACK that we have received // everything is OK now we decompose TCP datagram --- 1088,1092 ---- Elm.ReceivedSegments.addElement(chk); //adding seq_number that we have received Integer our_ack = (Integer)inPacket.get_acknowledgment_number(); ! //Elm.ReceivedACKs.addElement(our_ack); //adding ACK that we have received //COMMENTED 8/09/2006 // everything is OK now we decompose TCP datagram *************** *** 1203,1207 **** Integer our_ack = (Integer)inPacket.get_acknowledgment_number(); ! Elm.ReceivedACKs.addElement(our_ack); //adding ACK that we have received // everything is OK now we decompose TCP datagram --- 1208,1212 ---- Integer our_ack = (Integer)inPacket.get_acknowledgment_number(); ! //Elm.ReceivedACKs.addElement(our_ack); //adding ACK that we have received //COMMENTED 8/09/2006 // everything is OK now we decompose TCP datagram *************** *** 1339,1343 **** if (inPacket.get_ACK_flag()) { // we have received an ACK for our segment!!! ! Elm.ReceivedACKs.addElement(our_ack); //adding ACK that we have received // everything is OK now we decompose TCP datagram --- 1344,1348 ---- if (inPacket.get_ACK_flag()) { // we have received an ACK for our segment!!! ! //Elm.ReceivedACKs.addElement(our_ack); //adding ACK that we have received //COMMENTED 8/09/2006 // everything is OK now we decompose TCP datagram |
From: gift <gi...@us...> - 2006-09-08 17:19:59
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv29593/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: ... Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Tcp.java 8 Sep 2006 17:01:42 -0000 1.84 --- Tcp.java 8 Sep 2006 17:19:55 -0000 1.85 *************** *** 747,752 **** */ ! int mx = 1; while (inV.contains((Integer)mx)) { --- 747,759 ---- */ ! System.out.println(" [*** TCP ***] GetNumber call."); + + Enumeration vEnum = inV.elements(); + while (vEnum.hasMoreElements()) { + System.out.println(" [*** TCP ***] Vector contains: "+ ((Integer)vEnum.nextElement()) + "."); + } + + int mx = 1; while (inV.contains((Integer)mx)) { *************** *** 754,758 **** } ! return mx--; } --- 761,769 ---- } ! mx--; ! ! System.out.println(" [*** TCP ***] GetNumber end of call, returning number=" + mx + "."); ! ! return mx; } |
From: gift <gi...@us...> - 2006-09-08 17:01:53
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22338/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: .. Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** Tcp.java 8 Sep 2006 16:29:13 -0000 1.83 --- Tcp.java 8 Sep 2006 17:01:42 -0000 1.84 *************** *** 173,177 **** public void TCPsetTimer(TCP_HashTableElement Elm, int inREP) { if(Elm.busy) return; ! //System.out.println("TCPSETTIMER: " + Elm.timer); try{ Elm.busy = true; --- 173,177 ---- public void TCPsetTimer(TCP_HashTableElement Elm, int inREP) { if(Elm.busy) return; ! // System.out.println("TCPSETTIMER: " + Elm.timer); try{ Elm.busy = true; *************** *** 188,202 **** Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP, ++timerid),TCP_CONNECT_TIME,TCP_CONNECT_TIME); ! System.out.println("##################################### ^^^^^^^^^^^^ Sender timer init! Elm id = " + Elm.returnID() + " ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort); } else { ! System.out.println("##################################### ############ Sender Timer REinit due to new packet arrival! Elm id = " + Elm.returnID() + " && OLDID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort); ! System.out.println(Elm.timer); Elm.timer.cancel(); Elm.timer=null; Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_SENDER_TIME,this, inREP, ++timerid), TCP_SENDER_TIME, TCP_SENDER_TIME); ! System.out.println("##################################### ############ Sender Timer REinit DONE! ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort); ! System.out.println(Elm.timer); } Elm.busy = false; --- 188,202 ---- Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP, ++timerid),TCP_CONNECT_TIME,TCP_CONNECT_TIME); ! // System.out.println("##################################### ^^^^^^^^^^^^ Sender timer init! Elm id = " + Elm.returnID() + " ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort); } else { ! // System.out.println("##################################### ############ Sender Timer REinit due to new packet arrival! Elm id = " + Elm.returnID() + " && OLDID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort); ! // System.out.println(Elm.timer); Elm.timer.cancel(); Elm.timer=null; Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_SENDER_TIME,this, inREP, ++timerid), TCP_SENDER_TIME, TCP_SENDER_TIME); ! // System.out.println("##################################### ############ Sender Timer REinit DONE! ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort); ! // System.out.println(Elm.timer); } Elm.busy = false; *************** *** 231,235 **** public void run() { try{ ! System.out.println("##################################### ############ In Timer.run()! ID: " + id); if(!Elm.SegmentsToResend.isEmpty() && numRepeat>0) { // this.cancel(); --- 231,235 ---- public void run() { try{ ! // System.out.println("##################################### ############ In Timer.run()! ID: " + id); if(!Elm.SegmentsToResend.isEmpty() && numRepeat>0) { // this.cancel(); *************** *** 262,266 **** } else { if (numRepeat==0) { ! System.out.println("TIMEtoLIVE - OUT - connection timeout!"); //Create Layer info --- 262,266 ---- } else { if (numRepeat==0) { ! // System.out.println("TIMEtoLIVE - OUT - connection timeout!"); //Create Layer info *************** *** 275,293 **** Elm.reset(); } else { //nothing to resend, but numRepeat>0 ! System.out.println("Timer cancel - part1! NumRepeat = " + numRepeat + " Elm id = " + Elm.returnID() + " Elm connected to port:" + Elm.connectedtoPort); try{ numRepeat = 0; ! System.out.println(">>>>>>>>>>>>>>>>>>>> " + Elm.timer); if(Elm.timer!=null){ Elm.timer.cancel(); this.cancel(); // ??? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ! System.out.println("\n\n\n\n@@@@@@@@@@@@@@@@@@@@@@@@@ Elm.timer <<<<<<<<<<<<<<<<<<<<<<<\n\n\n\n"); } Elm.timer = null; }catch(Exception e){ ! System.out.println("Timer cancel error."); Error.Report(e); } ! System.out.println("Timer cancel - part2! Elm id = " + Elm.returnID()); } } --- 275,293 ---- Elm.reset(); } else { //nothing to resend, but numRepeat>0 ! // System.out.println("Timer cancel - part1! NumRepeat = " + numRepeat + " Elm id = " + Elm.returnID() + " Elm connected to port:" + Elm.connectedtoPort); try{ numRepeat = 0; ! // System.out.println(">>>>>>>>>>>>>>>>>>>> " + Elm.timer); if(Elm.timer!=null){ Elm.timer.cancel(); this.cancel(); // ??? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ! // System.out.println("\n\n\n\n@@@@@@@@@@@@@@@@@@@@@@@@@ Elm.timer <<<<<<<<<<<<<<<<<<<<<<<\n\n\n\n"); } Elm.timer = null; }catch(Exception e){ ! // System.out.println("Timer cancel error."); Error.Report(e); } ! // System.out.println("Timer cancel - part2! Elm id = " + Elm.returnID()); } } *************** *** 310,323 **** public void TCPsetServerTimer(TCP_HashTableElement Elm, int inlocalPort, int inREP) { if(Elm.Servertimer==null) { ! System.out.println("Server Timer init == " + inlocalPort); Elm.Servertimer=new Timer(); Elm.Servertimer.schedule(new TCPServerTask(Elm,inlocalPort,TCP_CONNECT_SERVER_TIME,this, inREP),TCP_CONNECT_SERVER_TIME,TCP_CONNECT_SERVER_TIME); } else { ! System.out.println("Server Timer REinit due to new packet arrival!"); Elm.Servertimer.cancel(); Elm.Servertimer=null; Elm.Servertimer=new Timer(); Elm.Servertimer.schedule(new TCPServerTask(Elm,inlocalPort,TCP_SERVER_TIME,this, inREP),TCP_SERVER_TIME,TCP_SERVER_TIME); ! System.out.println(" Server Timer REinit DONE!"); } --- 310,323 ---- public void TCPsetServerTimer(TCP_HashTableElement Elm, int inlocalPort, int inREP) { if(Elm.Servertimer==null) { ! // System.out.println("Server Timer init == " + inlocalPort); Elm.Servertimer=new Timer(); Elm.Servertimer.schedule(new TCPServerTask(Elm,inlocalPort,TCP_CONNECT_SERVER_TIME,this, inREP),TCP_CONNECT_SERVER_TIME,TCP_CONNECT_SERVER_TIME); } else { ! // System.out.println("Server Timer REinit due to new packet arrival!"); Elm.Servertimer.cancel(); Elm.Servertimer=null; Elm.Servertimer=new Timer(); Elm.Servertimer.schedule(new TCPServerTask(Elm,inlocalPort,TCP_SERVER_TIME,this, inREP),TCP_SERVER_TIME,TCP_SERVER_TIME); ! // System.out.println(" Server Timer REinit DONE!"); } *************** *** 351,355 **** numRepeat--; if (numRepeat==0) { ! System.out.println("SERVER TIMEtoLIVE - OUT - awaiting connection timeout!"); Elm.addstats(TCPptr); ((Application)Elm.application).DisconnectEvent(); --- 351,355 ---- numRepeat--; if (numRepeat==0) { ! // System.out.println("SERVER TIMEtoLIVE - OUT - awaiting connection timeout!"); Elm.addstats(TCPptr); ((Application)Elm.application).DisconnectEvent(); *************** *** 369,373 **** Simulation.addLayerInfo(TCP_Info); ! System.out.println("SERVER reorganized!"); } } --- 369,373 ---- Simulation.addLayerInfo(TCP_Info); ! // System.out.println("SERVER reorganized!"); } } *************** *** 518,522 **** if (Elm.PortStatus==1 || Elm.PortStatus==2) //&& PortToClose<=PORT_START_NUMBER { ! System.out.println("!!!"); Elm.addstats(this); Elm.reset(); --- 518,522 ---- if (Elm.PortStatus==1 || Elm.PortStatus==2) //&& PortToClose<=PORT_START_NUMBER { ! // System.out.println("!!!"); Elm.addstats(this); Elm.reset(); *************** *** 540,547 **** Integer PortToFree=getApplicationLocalPortNumber(application); Elm=(TCP_HashTableElement) PortTable.get((Integer)PortToFree); ! System.out.println("###"); Elm.addstats(this); Elm.reset(); ! System.out.println("111"); }catch(Exception e){} } --- 540,547 ---- Integer PortToFree=getApplicationLocalPortNumber(application); Elm=(TCP_HashTableElement) PortTable.get((Integer)PortToFree); ! // System.out.println("###"); Elm.addstats(this); Elm.reset(); ! // System.out.println("111"); }catch(Exception e){} } *************** *** 779,788 **** TCP_HashTableElement Elm; Elm = (TCP_HashTableElement) PortTable.get(insrcPort); ! System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); Integer gg = new Integer(0); if (!Elm.ReceivedACKs.isEmpty()) gg = GetNumber(Elm.ReceivedACKs); ! if (Elm.seq_number <= gg+window_size) { int s_num; --- 779,797 ---- TCP_HashTableElement Elm; Elm = (TCP_HashTableElement) PortTable.get(insrcPort); ! // System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); Integer gg = new Integer(0); + System.out.println(" [*** TCP ***] GetTCPPacket_tosend call."); + if (!Elm.ReceivedACKs.isEmpty()) gg = GetNumber(Elm.ReceivedACKs); ! System.out.println(" [*** TCP ***] gg after GetNumber =" + gg + "."); ! ! System.out.println(" [*** TCP ***] if condition: " + (Elm.seq_number <= gg+window_size || flags[1] || flags[4] || flags[5]) + "."); ! ! ! // System.out.println(inSourceIPAddress + ": ************************ " + Elm + " ************************** " + Elm.timer); ! ! if (Elm.seq_number <= gg+window_size || flags[1] || flags[4] || flags[5]) { int s_num; *************** *** 862,865 **** --- 871,875 ---- Simulation.addLayerInfo(TCP_Info); + System.out.println(" [*** TCP ***] GetTCPPacket_tosend end of call."); return tosend; *************** *** 895,899 **** if (inPacket.get_ACK_flag()) sd=sd+" ACK-packet"; sd=sd + ":" + " !!!!!!!!!! SEQ_numb==" + inPacket.get_sequence_number(); ! System.out.println(sd); //test: check sum of TCP packet --- 905,909 ---- if (inPacket.get_ACK_flag()) sd=sd+" ACK-packet"; sd=sd + ":" + " !!!!!!!!!! SEQ_numb==" + inPacket.get_sequence_number(); ! // System.out.println(sd); //test: check sum of TCP packet *************** *** 973,980 **** //we are going to send ACK for received segment => adding it to SentACKs ! System.out.println(mParentStack.getHostName() + ":" + "Server received first SYN: I=" + inPacket.get_sequence_number()); ! if (inPacket.get_sequence_number() == 1) System.out.println("SYN-flags EVERYTHING IS OK 1-st place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! System.out.println(mParentStack.getHostName() + ":" + " FIRST SYN DONE I=" + inPacket.get_sequence_number()); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { --- 983,990 ---- //we are going to send ACK for received segment => adding it to SentACKs ! // System.out.println(mParentStack.getHostName() + ":" + "Server received first SYN: I=" + inPacket.get_sequence_number()); ! // if (inPacket.get_sequence_number() == 1) System.out.println("SYN-flags EVERYTHING IS OK 1-st place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! // System.out.println(mParentStack.getHostName() + ":" + " FIRST SYN DONE I=" + inPacket.get_sequence_number()); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { *************** *** 1101,1108 **** //we are going to send ACK for received segment => adding it to SentACKs ! System.out.println(mParentStack.getHostName() + ":" + "CLIENT, ANSWER FOR SYN, I=" + inPacket.get_sequence_number()); ! if (inPacket.get_sequence_number() == 1) System.out.println("SYN-flags with ACK EVERYTHING IS OK 2-nd place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! System.out.println(mParentStack.getHostName() + ":" + " CLIENT, ANSWER FOR SYN DONE I=" + inPacket.get_sequence_number()); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { --- 1111,1118 ---- //we are going to send ACK for received segment => adding it to SentACKs ! //System.out.println(mParentStack.getHostName() + ":" + "CLIENT, ANSWER FOR SYN, I=" + inPacket.get_sequence_number()); ! //if (inPacket.get_sequence_number() == 1) System.out.println("SYN-flags with ACK EVERYTHING IS OK 2-nd place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! //System.out.println(mParentStack.getHostName() + ":" + " CLIENT, ANSWER FOR SYN DONE I=" + inPacket.get_sequence_number()); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { *************** *** 1221,1228 **** AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs ! System.out.println(mParentStack.getHostName() + ":" + "FIN-packet FIN not sent, BEFORE: I=" + inPacket.get_sequence_number()); ! if (inPacket.get_sequence_number() == 1) System.out.println("EVERYTHING IS OK, ready 3-rd place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! System.out.println(mParentStack.getHostName() + ":" + " FIN-packet FIN not sent, 3-rd place DONE I=" + inPacket.get_sequence_number()); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { --- 1231,1238 ---- AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs ! // System.out.println(mParentStack.getHostName() + ":" + "FIN-packet FIN not sent, BEFORE: I=" + inPacket.get_sequence_number()); ! // if (inPacket.get_sequence_number() == 1) System.out.println("EVERYTHING IS OK, ready 3-rd place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! // System.out.println(mParentStack.getHostName() + ":" + " FIN-packet FIN not sent, 3-rd place DONE I=" + inPacket.get_sequence_number()); if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { *************** *** 1287,1293 **** //now we have to resend our ACK again mParentStack.sendPacket((TCP_packet) Elm.SentACKs.get((Integer)inPacket.get_sequence_number())); - } } catch(NullPointerException e){ - System.out.println(mParentStack.getHostName() + ":" + "TCP.java: case 2 - 1368 " + e.toString()); } } --- 1297,1304 ---- //now we have to resend our ACK again mParentStack.sendPacket((TCP_packet) Elm.SentACKs.get((Integer)inPacket.get_sequence_number())); } + } catch(NullPointerException e){ + System.out.println(mParentStack.getHostName() + ":" + "TCP.java: case 2 - 1368 " + e.toString()); + } } *************** *** 1350,1354 **** //we do not have to send ACK for ACK-segment ! System.out.println("[*** TCP ***] ACK received, port status: 2."); PassUpstairs( (Application) Elm.application, Elm); --- 1361,1365 ---- //we do not have to send ACK for ACK-segment ! // System.out.println("[*** TCP ***] ACK received, port status: 2."); PassUpstairs( (Application) Elm.application, Elm); *************** *** 1369,1376 **** listener = (Application)Elm.application; ! System.out.println(mParentStack.getHostName() + ":" + " Data exchange mode, BEFORE: I=" + inPacket.get_sequence_number()); ! if (inPacket.get_sequence_number() == 1) System.out.println("EVERYTHING IS OK, ready 6-th place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! System.out.println(mParentStack.getHostName() + ":" + " Data exchange mode, 6-th place DONE I=" + inPacket.get_sequence_number()); if (Elm.ApplicationStatus!=2) { --- 1380,1387 ---- listener = (Application)Elm.application; ! // System.out.println(mParentStack.getHostName() + ":" + " Data exchange mode, BEFORE: I=" + inPacket.get_sequence_number()); ! // if (inPacket.get_sequence_number() == 1) System.out.println("EVERYTHING IS OK, ready 6-th place I==1"); Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); ! // System.out.println(mParentStack.getHostName() + ":" + " Data exchange mode, 6-th place DONE I=" + inPacket.get_sequence_number()); if (Elm.ApplicationStatus!=2) { *************** *** 1393,1397 **** Simulation.addLayerInfo(TCP_Info); ! System.out.println("1"); Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "1")); --- 1404,1408 ---- Simulation.addLayerInfo(TCP_Info); ! // System.out.println("1"); Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "1")); *************** *** 1402,1412 **** } ! System.out.println("4"); Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "4")); // if (Elm.received_segments>2) // listener.RecvData(inPacket.getTCP_message()); ! System.out.println("[*** TCP ***] Data received, port status: 2."); PassUpstairs(listener, Elm); ! System.out.println("5"); Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "5")); --- 1413,1423 ---- } ! // System.out.println("4"); Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "4")); // if (Elm.received_segments>2) // listener.RecvData(inPacket.getTCP_message()); ! // System.out.println("[*** TCP ***] Data received, port status: 2."); PassUpstairs(listener, Elm); ! // System.out.println("5"); Simulation.addLayerInfo(new LayerInfo(getClass().getName(), mParentStack.getParentNodeName(), "TCP Protocol", "Transport", "5")); *************** *** 1439,1443 **** //F#CKING SH*T: is it right sequence??? ! System.out.println(mParentStack.getHostName() + ":" + "I=" + ik); if (Tpl==null) {System.out.println(mParentStack.getHostName() + ":" + "Error: PACKET = null when I=" + ik); } --- 1450,1454 ---- //F#CKING SH*T: is it right sequence??? ! // System.out.println(mParentStack.getHostName() + ":" + "I=" + ik); if (Tpl==null) {System.out.println(mParentStack.getHostName() + ":" + "Error: PACKET = null when I=" + ik); } *************** *** 1698,1707 **** Integer kkey=Elm.last_passed+1;//=new Integer(Elm.last_passed+1); ! System.out.println(" [*** TCP ***] Pass upstairs call."); ! System.out.println(" [*** TCP ***] Last passed: " + Elm.last_passed + ", going to pass: " + kkey + "."); ! ! System.out.println(" [*** TCP ***] Buffer isEmpty: " + Elm.OutputBuffer.isEmpty() + "."); ! System.out.println(" [*** TCP ***] While condition: " + Elm.OutputBuffer.containsKey(kkey) + "."); ! while(Elm.OutputBuffer.containsKey(kkey)) { Elm.last_passed=kkey; --- 1709,1718 ---- Integer kkey=Elm.last_passed+1;//=new Integer(Elm.last_passed+1); ! // System.out.println(" [*** TCP ***] Pass upstairs call."); ! // System.out.println(" [*** TCP ***] Last passed: " + Elm.last_passed + ", going to pass: " + kkey + "."); ! // ! // System.out.println(" [*** TCP ***] Buffer isEmpty: " + Elm.OutputBuffer.isEmpty() + "."); ! // System.out.println(" [*** TCP ***] While condition: " + Elm.OutputBuffer.containsKey(kkey) + "."); ! // while(Elm.OutputBuffer.containsKey(kkey)) { Elm.last_passed=kkey; *************** *** 1713,1724 **** //if(!Packet.get_ACK_flag()) listener.RecvData(Packet.getTCP_message()); ! System.out.println(" [*** TCP ***] [*P*] Passed packet SEQ: " + Packet.get_sequence_number() + ", packet destination: " + Packet.getDestIPAddress() + "."); } else { ! System.out.println(" [*** TCP ***] [S] Skipped packet SEQ: " + Packet.get_sequence_number() + ", packet destination: " + Packet.getDestIPAddress() + "."); } } ! System.out.println(" [*** TCP ***] Pass upstairs end of call."); } --- 1724,1735 ---- //if(!Packet.get_ACK_flag()) listener.RecvData(Packet.getTCP_message()); ! // System.out.println(" [*** TCP ***] [*P*] Passed packet SEQ: " + Packet.get_sequence_number() + ", packet destination: " + Packet.getDestIPAddress() + "."); } else { ! // System.out.println(" [*** TCP ***] [S] Skipped packet SEQ: " + Packet.get_sequence_number() + ", packet destination: " + Packet.getDestIPAddress() + "."); } } ! // System.out.println(" [*** TCP ***] Pass upstairs end of call."); } |
From: gift <gi...@us...> - 2006-09-08 16:29:18
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9381/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: ..... Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** Tcp.java 8 Sep 2006 15:39:44 -0000 1.82 --- Tcp.java 8 Sep 2006 16:29:13 -0000 1.83 *************** *** 110,124 **** * * Created on 25 November 2005, 17:33 ! */ ! ! ! ! private static int iiiiii=0; ! ! ! private Hashtable PortTable = new Hashtable(); private ProtocolStack mParentStack; ! private int window_size=2000; //25 // private int total_received=0; --- 110,117 ---- * * Created on 25 November 2005, 17:33 ! */ private Hashtable PortTable = new Hashtable(); private ProtocolStack mParentStack; ! private int window_size=25; //2000; //25 // private int total_received=0; *************** *** 731,736 **** /** ! * This method returns the ORD ACK number in * Elm.ReceivedACKs * @author gift (sourceforge.net user) * @param inV vector of Integers --- 724,730 ---- /** ! * This method returns the maximum ordered ACK number in * Elm.ReceivedACKs + * !!CHECK IF isEmpty * @author gift (sourceforge.net user) * @param inV vector of Integers *************** *** 738,741 **** --- 732,736 ---- */ private int GetNumber(Vector inV) { + /* int mx=0; boolean ordered=true; *************** *** 750,753 **** --- 745,758 ---- return previous; + */ + + int mx = 1; + + while (inV.contains((Integer)mx)) + { + mx++; + } + + return mx--; } *************** *** 994,999 **** //everything is OK ! //MAYBE A DUPLICATE? ! if ((Elm.ReceivedSegments.contains((Integer)inPacket.get_sequence_number()))) { try { --- 999,1003 ---- //everything is OK ! //MAYBE A DUPLICATE? if ((Elm.ReceivedSegments.contains((Integer)inPacket.get_sequence_number()))) { try { |
From: gift <gi...@us...> - 2006-09-08 15:40:04
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21451/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: more... Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** Tcp.java 8 Sep 2006 12:30:52 -0000 1.81 --- Tcp.java 8 Sep 2006 15:39:44 -0000 1.82 *************** *** 993,996 **** --- 993,1028 ---- //now we decompose TCP segment //everything is OK + + //MAYBE A DUPLICATE? + + if ((Elm.ReceivedSegments.contains((Integer)inPacket.get_sequence_number()))) { + try { + if (Elm.isServer) { + //init ServerTask + TCPsetServerTimer(Elm,inPacket.get_destPort(), 60); + } else TCPsetTimer(Elm, 50); + Elm.received_duplicates++; + if (!inPacket.get_ACK_flag()) { + Elm.sent_ACK++; + //Create Layer info + LayerInfo TCP_Info = new LayerInfo(getClass().getName()); + TCP_Info.setObjectName(mParentStack.getParentNodeName()); + TCP_Info.setDataType("TCP Protocol"); + //System.out.println("[*** TCP ***] At the beginnig of case 2, line 1009"); + TCP_Info.setLayer("Transport"); + TCP_packet to_resend = (TCP_packet) Elm.SentACKs.get((Integer)inPacket.get_sequence_number()); + + TCP_Info.setDescription("Resending ACK packet (SEQ = " + to_resend.get_sequence_number() + " ACK = " + to_resend.get_acknowledgment_number()+ ") due to duplicate (SEQ = " + inPacket.get_sequence_number() + " ACK = " + inPacket.get_acknowledgment_number()+ ") arrival. Total duplicates received: " + Elm.received_duplicates + "."); + Simulation.addLayerInfo(TCP_Info); + //now we have to resend our ACK again + mParentStack.sendPacket(to_resend); + } + } catch(NullPointerException e){ + System.out.println(mParentStack.getHostName() + ":" + "TCP.java: duplicate at the beginnig of case 2, line 1017 " + e.toString()); + break; + } + break; + } + //Check for SYN if (inPacket.get_SYN_flag()) { *************** *** 1007,1011 **** //we have received an answer for our SYN-segment //a little test ! // if (!(inPacket.get_ACK_flag())) throw new TransportLayerPortException("TCP Error: No ACK flag in answer for SYN packet is set in the segment!"); //in case this is not duplicate --- 1039,1043 ---- //we have received an answer for our SYN-segment //a little test ! if (!(inPacket.get_ACK_flag())) throw new TransportLayerPortException("TCP Error: No ACK flag in answer for SYN packet is set in the segment!"); //in case this is not duplicate |
From: gift <gi...@us...> - 2006-09-08 15:39:59
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21451/core Modified Files: FalseRandom.java Log Message: more... Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FalseRandom.java 8 Sep 2006 12:30:52 -0000 1.16 --- FalseRandom.java 8 Sep 2006 15:39:43 -0000 1.17 *************** *** 15,27 **** //int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! ! //int sequence[] = {1}; ! ! int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; if(count >= sequence.length) count = 0; --- 15,26 ---- //int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + //int sequence[] = {1}; + if(count >= sequence.length) count = 0; |
From: QweR <qw...@us...> - 2006-09-08 12:30:57
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10165/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Tcp.java 7 Sep 2006 17:20:29 -0000 1.80 --- Tcp.java 8 Sep 2006 12:30:52 -0000 1.81 *************** *** 114,117 **** --- 114,121 ---- + private static int iiiiii=0; + + + private Hashtable PortTable = new Hashtable(); private ProtocolStack mParentStack; *************** *** 189,193 **** Error.Report(e); }*/ - Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP, ++timerid),TCP_CONNECT_TIME,TCP_CONNECT_TIME); --- 193,196 ---- *************** *** 208,212 **** Elm.busy = false; Error.Report(e); ! } } --- 211,215 ---- Elm.busy = false; Error.Report(e); ! } } *************** *** 286,289 **** --- 289,293 ---- Elm.timer.cancel(); this.cancel(); // ??? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + System.out.println("\n\n\n\n@@@@@@@@@@@@@@@@@@@@@@@@@ Elm.timer <<<<<<<<<<<<<<<<<<<<<<<\n\n\n\n"); } Elm.timer = null; *************** *** 1003,1007 **** //we have received an answer for our SYN-segment //a little test ! if (!(inPacket.get_ACK_flag())) throw new TransportLayerPortException("TCP Error: No ACK flag in answer for SYN packet is set in the segment!"); //in case this is not duplicate --- 1007,1011 ---- //we have received an answer for our SYN-segment //a little test ! // if (!(inPacket.get_ACK_flag())) throw new TransportLayerPortException("TCP Error: No ACK flag in answer for SYN packet is set in the segment!"); //in case this is not duplicate |
From: QweR <qw...@us...> - 2006-09-08 12:30:57
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10165/core Modified Files: FalseRandom.java Log Message: Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** FalseRandom.java 8 Sep 2006 07:37:42 -0000 1.15 --- FalseRandom.java 8 Sep 2006 12:30:52 -0000 1.16 *************** *** 6,13 **** public static int Kotochigov(){ ! //int sequence[] = {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; --- 6,14 ---- public static int Kotochigov(){ ! //int sequence[] = {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + //int sequence[] = {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; |
From: gift <gi...@us...> - 2006-09-08 07:38:07
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21403/core/protocolsuite/tcp_ip Modified Files: TCP_HashTableElement.java Log Message: .. Index: TCP_HashTableElement.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/TCP_HashTableElement.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TCP_HashTableElement.java 7 Sep 2006 16:13:15 -0000 1.4 --- TCP_HashTableElement.java 8 Sep 2006 07:37:42 -0000 1.5 *************** *** 48,51 **** --- 48,54 ---- /*database*/ + /** + * Timer access flag + */ public boolean busy = false; *************** *** 159,163 **** this.Servertimer = null; } ! this.PortStatus=0; this.application=null; --- 162,166 ---- this.Servertimer = null; } ! this.busy = false; this.PortStatus=0; this.application=null; |
From: gift <gi...@us...> - 2006-09-08 07:38:02
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21403/core Modified Files: FalseRandom.java Log Message: .. Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** FalseRandom.java 7 Sep 2006 17:20:29 -0000 1.14 --- FalseRandom.java 8 Sep 2006 07:37:42 -0000 1.15 *************** *** 10,17 **** //int sequence[] = {1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //int sequence[] = {1}; ! if(count >= sequence.length) count = 0; --- 10,26 ---- //int sequence[] = {1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! //int sequence[] = {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! ! //int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + //int sequence[] = {1}; ! ! ! int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! ! //int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; ! if(count >= sequence.length) count = 0; |