javanetsim-cvs Mailing List for javaNetSim (Page 25)
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-09-03 13:56:57
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21170/core/protocolsuite/tcp_ip Modified Files: 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.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Echo_tcp.java 3 Sep 2006 13:49:15 -0000 1.25 --- Echo_tcp.java 3 Sep 2006 13:56:54 -0000 1.26 *************** *** 33,36 **** --- 33,37 ---- private byte ConnectionAttempts=1; private int counts; + private int crecv; private long utc1; *************** *** 172,176 **** */ public void RecvData(String Data) throws LowLinkException, TransportLayerException { ! System.out.println(Data); //processing the protocol doings. if(appType == 0){ --- 173,178 ---- */ public void RecvData(String Data) throws LowLinkException, TransportLayerException { ! crecv++; ! System.out.println(Data + ":" + crecv); //processing the protocol doings. if(appType == 0){ *************** *** 256,259 **** --- 258,263 ---- mParentStack.FreeTCPApplication(this); + crecv = 0; + this.counts = counts; |
From: Alexander B. <da...@us...> - 2006-09-03 13:56:57
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21170/core Modified Files: FalseRandom.java Log Message: Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FalseRandom.java 3 Sep 2006 13:49:15 -0000 1.8 --- FalseRandom.java 3 Sep 2006 13:56:54 -0000 1.9 *************** *** 10,16 **** //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}; if(count >= sequence.length) count = 0; --- 10,16 ---- //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}; if(count >= sequence.length) count = 0; |
From: Alexander B. <da...@us...> - 2006-09-03 13:49:19
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18187/core Modified Files: EthernetLink.java FalseRandom.java Log Message: Index: EthernetLink.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/EthernetLink.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EthernetLink.java 2 Sep 2006 12:35:00 -0000 1.8 --- EthernetLink.java 3 Sep 2006 13:49:15 -0000 1.9 *************** *** 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.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FalseRandom.java 3 Sep 2006 13:05:31 -0000 1.7 --- FalseRandom.java 3 Sep 2006 13:49:15 -0000 1.8 *************** *** 10,14 **** //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}; if(count >= sequence.length) count = 0; --- 10,16 ---- //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}; if(count >= sequence.length) count = 0; |
From: Alexander B. <da...@us...> - 2006-09-03 13:49:18
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18187/core/protocolsuite/tcp_ip Modified Files: Echo_tcp.java Tcp.java Log Message: Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Tcp.java 3 Sep 2006 13:05:31 -0000 1.63 --- Tcp.java 3 Sep 2006 13:49:15 -0000 1.64 *************** *** 1527,1530 **** --- 1527,1531 ---- // listener.RecvData(inPacket.getTCP_message()); PassUpstairs(listener, Elm); + } Index: Echo_tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo_tcp.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Echo_tcp.java 3 Sep 2006 09:53:38 -0000 1.24 --- Echo_tcp.java 3 Sep 2006 13:49:15 -0000 1.25 *************** *** 20,23 **** --- 20,25 ---- import core.Packet; + import core.Error; + import core.Simulation; *************** *** 170,173 **** --- 172,176 ---- */ public void RecvData(String Data) throws LowLinkException, TransportLayerException { + System.out.println(Data); //processing the protocol doings. if(appType == 0){ *************** *** 200,205 **** --- 203,216 ---- this.counts--; try { + LayerInfo protInfo3 = new LayerInfo(getClass().getName()); + protInfo3.setObjectName(mParentStack.getParentNodeName()); + protInfo3.setDataType("Echo Protocol Data"); + protInfo3.setLayer("Application "); + protInfo3.setDescription("Sending echo message '" + Data + "' to server..."); + Simulation.addLayerInfo(protInfo); + SendData(Data); }catch(Exception e){ + Error.Report(e); ///*TODO*: here to catch } *************** *** 226,229 **** --- 237,241 ---- SendData(Data); }catch(Exception e){ + Error.Report(e); ///*TODO*: here to catch } |
From: gift <gi...@us...> - 2006-09-03 13:05:35
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2539/core Modified Files: FalseRandom.java Log Message: VVVVV Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FalseRandom.java 3 Sep 2006 12:31:47 -0000 1.6 --- FalseRandom.java 3 Sep 2006 13:05:31 -0000 1.7 *************** *** 8,14 **** //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}; if(count >= sequence.length) count = 0; --- 8,14 ---- //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}; if(count >= sequence.length) count = 0; |
From: gift <gi...@us...> - 2006-09-03 13:05:34
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2539/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: VVVVV Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Tcp.java 3 Sep 2006 12:31:48 -0000 1.62 --- Tcp.java 3 Sep 2006 13:05:31 -0000 1.63 *************** *** 1135,1139 **** listener = (Application)Elm.application; ! //AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs --- 1135,1139 ---- listener = (Application)Elm.application; ! AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs *************** *** 1228,1232 **** listener = (Application)Elm.application; ! //AddOutputBuffer(Elm, inPacket); try{ --- 1228,1232 ---- listener = (Application)Elm.application; ! AddOutputBuffer(Elm, inPacket); try{ *************** *** 1349,1353 **** listener = (Application)Elm.application; //Elm.isFIN_sent=true; - will be set in "sendTCPSegment" ! //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()); --- 1349,1353 ---- listener = (Application)Elm.application; //Elm.isFIN_sent=true; - will be set in "sendTCPSegment" ! 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()); *************** *** 1379,1383 **** Elm.isFIN_confirmed=true; ! //AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs // Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); --- 1379,1383 ---- Elm.isFIN_confirmed=true; ! AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs // Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); *************** *** 1465,1468 **** --- 1465,1469 ---- s="TCP packet with establishing connection ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Connection confirmed!"; Elm.ApplicationStatus=2; + //Elm.last_passed=chk-1; } *************** *** 1501,1512 **** if (Elm.ApplicationStatus!=2) { ! s="TCP packet with establishing connection ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Connection confirmed!"; Elm.ApplicationStatus=2; ! } else s = "TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + " sent ACK = " + ack_num + ")."; ! ! if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { ! Elm.SentACKs.remove(inPacket.get_sequence_number()); ! } ! //Create Layer info LayerInfo TCP_Info = new LayerInfo(getClass().getName()); --- 1502,1510 ---- if (Elm.ApplicationStatus!=2) { ! s="TCP packet with establishing connection ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Connection confirmed! Data will be passed to the application!"; Elm.ApplicationStatus=2; ! Elm.last_passed=chk-1; ! } else s = "TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + " sent ACK = " + ack_num + ")."; ! //Create Layer info LayerInfo TCP_Info = new LayerInfo(getClass().getName()); *************** *** 1522,1525 **** --- 1520,1527 ---- Simulation.addLayerInfo(TCP_Info); + if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { + Elm.SentACKs.remove(inPacket.get_sequence_number()); + } + // if (Elm.received_segments>2) // listener.RecvData(inPacket.getTCP_message()); *************** *** 1815,1819 **** Elm.last_passed=kkey; TCP_packet Packet=(TCP_packet) Elm.OutputBuffer.remove(kkey); ! kkey++; if((!Packet.get_ACK_flag()) && (!Packet.get_SYN_flag())) //if(!Packet.get_ACK_flag()) --- 1817,1822 ---- Elm.last_passed=kkey; TCP_packet Packet=(TCP_packet) Elm.OutputBuffer.remove(kkey); ! kkey++; ! if((!Packet.get_ACK_flag()) && (!Packet.get_SYN_flag())) //if(!Packet.get_ACK_flag()) |
From: gift <gi...@us...> - 2006-09-03 12:31:53
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21387/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: aaaa Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Tcp.java 3 Sep 2006 10:38:20 -0000 1.61 --- Tcp.java 3 Sep 2006 12:31:48 -0000 1.62 *************** *** 1109,1113 **** Elm.connectedtoPort=inPacket.get_srcPort(); //0 - no status; 1 - is being connected; 2 - is connected; 3 - connection error ! Elm.ApplicationStatus=2; Elm.received_segments++; --- 1109,1113 ---- Elm.connectedtoPort=inPacket.get_srcPort(); //0 - no status; 1 - is being connected; 2 - is connected; 3 - connection error ! Elm.ApplicationStatus=1; Elm.received_segments++; *************** *** 1135,1139 **** listener = (Application)Elm.application; ! AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs --- 1135,1139 ---- listener = (Application)Elm.application; ! //AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs *************** *** 1209,1213 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\". (SEQ = " + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); --- 1209,1213 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\". Connection confirmed! (SEQ = " + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1228,1232 **** listener = (Application)Elm.application; ! AddOutputBuffer(Elm, inPacket); try{ --- 1228,1232 ---- listener = (Application)Elm.application; ! //AddOutputBuffer(Elm, inPacket); try{ *************** *** 1349,1353 **** listener = (Application)Elm.application; //Elm.isFIN_sent=true; - will be set in "sendTCPSegment" ! 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()); --- 1349,1353 ---- listener = (Application)Elm.application; //Elm.isFIN_sent=true; - will be set in "sendTCPSegment" ! //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()); *************** *** 1460,1464 **** String s; ! if (Elm.received_segments>2) s="TCP packet with data ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "."; else { s="TCP packet with establishing connection ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Connection confirmed!"; --- 1460,1465 ---- String s; ! // if (Elm.received_segments>2) s="TCP packet with data ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "."; ! if (Elm.ApplicationStatus==2) s="TCP packet with data ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "."; else { s="TCP packet with establishing connection ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Connection confirmed!"; *************** *** 1486,1489 **** --- 1487,1491 ---- //now we have to send our ACK-segment (with SYN=false, seq_num=XX, ack_num=XX) String msg=""; + String s=""; boolean flags[]={false,true,false,false,false,false}; /* URG, !ACK!, PSH, RST, SYN, FIN */ int ack_num=chk+1; *************** *** 1498,1501 **** --- 1500,1508 ---- System.out.println(mParentStack.getHostName() + ":" + " Data exchange mode, 6-th place DONE I=" + inPacket.get_sequence_number()); + if (Elm.ApplicationStatus!=2) { + s="TCP packet with establishing connection ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Connection confirmed!"; + Elm.ApplicationStatus=2; + } else s = "TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + " sent ACK = " + ack_num + ")."; + if (!(mParentStack.sendTCPSegment(listener,msg,flags,ack_num))) { Elm.SentACKs.remove(inPacket.get_sequence_number()); *************** *** 1511,1517 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + " sent ACK = " + ack_num + ")."); ! Simulation.addLayerInfo(TCP_Info); // if (Elm.received_segments>2) --- 1518,1524 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription(s); ! Simulation.addLayerInfo(TCP_Info); // if (Elm.received_segments>2) *************** *** 1810,1813 **** --- 1817,1821 ---- kkey++; if((!Packet.get_ACK_flag()) && (!Packet.get_SYN_flag())) + //if(!Packet.get_ACK_flag()) listener.RecvData(Packet.getTCP_message()); } |
From: gift <gi...@us...> - 2006-09-03 12:31:52
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv21387/core Modified Files: FalseRandom.java Log Message: aaaa Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FalseRandom.java 3 Sep 2006 09:53:38 -0000 1.5 --- FalseRandom.java 3 Sep 2006 12:31:47 -0000 1.6 *************** *** 8,14 **** //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}; if(count >= sequence.length) count = 0; --- 8,14 ---- //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}; if(count >= sequence.length) count = 0; |
From: gift <gi...@us...> - 2006-09-03 10:38:25
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19048/core/protocolsuite/tcp_ip Modified Files: ProtocolStack.java Tcp.java Log Message: tcp Index: ProtocolStack.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ProtocolStack.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** ProtocolStack.java 2 Sep 2006 16:38:34 -0000 1.46 --- ProtocolStack.java 3 Sep 2006 10:38:20 -0000 1.47 *************** *** 1842,1846 **** { int ack_num=-1; ! String msg=""; boolean flags[]={false,false,false,false,false,true}; /* URG, ACK, PSH, RST, SYN, !FIN! */ sendTCPSegment(application, msg, flags,ack_num); --- 1842,1846 ---- { int ack_num=-1; ! String msg="EMPTY STRING the problem is in FinalizeTCP"; boolean flags[]={false,false,false,false,false,true}; /* URG, ACK, PSH, RST, SYN, !FIN! */ sendTCPSegment(application, msg, flags,ack_num); Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Tcp.java 3 Sep 2006 09:53:38 -0000 1.60 --- Tcp.java 3 Sep 2006 10:38:20 -0000 1.61 *************** *** 1285,1289 **** * FIN,ACK -> receive * receive <- FIN,ACK ! * CLOSE * closed <- FIN,ACK * 0-port -> FIN,ACK --- 1285,1295 ---- * FIN,ACK -> receive * receive <- FIN,ACK ! * CLOSE ! * receive ! * CLOSE ! * ! *========================================================== ! *=================TEMP SCHEME============================= ! *========================================================== * closed <- FIN,ACK * 0-port -> FIN,ACK *************** *** 1304,1307 **** --- 1310,1314 ---- Elm.received_segments++; 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 *************** *** 1322,1327 **** else { if (!Elm.isFIN_confirmed) ! s="TCP FIN-packet ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Now sending our FIN confirmation!"; ! else s="TCP FIN-packet ACK confirmation received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Now closing connection!"; } --- 1329,1334 ---- else { if (!Elm.isFIN_confirmed) ! s="TCP FIN-packet ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Now disconnecting application!"; ! else s="TCP FIN-packet ACK confirmation received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Now disconnecting!"; } *************** *** 1336,1348 **** if (!Elm.isFIN_sent) { - if (Elm.isPassive) { - Application serv; - serv=(Application)Elm.application; - ClosePort(serv); //FIN sent and confirmed!!! Closing connection in case isPassive==true - serv.DisconnectEvent(); - serv.Listen(); - } - - Elm.isPassive=true; String msg=""; boolean flags[]={false,true,false,false,false,true}; /* URG, !ACK!, PSH, RST, SYN, !FIN! */ //maybe not like in RFC page 37 p3.5 --- 1343,1346 ---- *************** *** 1361,1364 **** --- 1359,1373 ---- Elm.SentACKs.remove(inPacket.get_sequence_number()); } + + Elm.isPassive=true; + + if (Elm.isPassive) { + Application serv; + serv=(Application)Elm.application; + ClosePort(serv); //FIN sent and confirmed!!! Closing connection in case isPassive==true + serv.DisconnectEvent(); + serv.Listen(); + } + } else { if (!Elm.isFIN_confirmed) { |
From: gift <gi...@us...> - 2006-09-03 09:53:44
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30946/core Modified Files: FalseRandom.java Log Message: more Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FalseRandom.java 2 Sep 2006 18:01:04 -0000 1.4 --- FalseRandom.java 3 Sep 2006 09:53:38 -0000 1.5 *************** *** 8,14 **** //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}; if(count >= sequence.length) count = 0; --- 8,14 ---- //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}; if(count >= sequence.length) count = 0; |
From: gift <gi...@us...> - 2006-09-03 09:53:44
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30946/core/protocolsuite/tcp_ip Modified Files: Echo_tcp.java Tcp.java Log Message: more Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Tcp.java 2 Sep 2006 18:01:04 -0000 1.59 --- Tcp.java 3 Sep 2006 09:53:38 -0000 1.60 *************** *** 1086,1098 **** // everything is OK now we decompose TCP datagram boolean flags[]={false,true,false,false,false,true}; /* URG, !ACK!, PSH, RST, SYN, !FIN! */ ! int ack_num=chk+1; ! //we are going to send ACK for received segment ! if (!(mParentStack.sendTCPSegment(null,"",flags,ack_num))) { ! Elm.SentACKs.remove(inPacket.get_sequence_number()); ! } } else ! throw new TransportLayerPortException("TCP Error: no application listening to port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"!"); ! //no break needed ;) case 1: // port is being listened to by a new application. //Check for SYN --- 1086,1096 ---- // everything is OK now we decompose TCP datagram boolean flags[]={false,true,false,false,false,true}; /* URG, !ACK!, PSH, RST, SYN, !FIN! */ ! int ack_num=chk+1; //we are going to send ACK for received segment ! mParentStack.sendTCPSegment(null,"",flags,ack_num); ! } else ! throw new TransportLayerPortException("TCP Error: no application listening to port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"!"); ! break; case 1: // port is being listened to by a new application. //Check for SYN *************** *** 1337,1340 **** --- 1335,1339 ---- //now we have to send ACK-segment (with SYN=false, seq_num=XX, ack_num=XX) if (!Elm.isFIN_sent) { + if (Elm.isPassive) { Application serv; *************** *** 1371,1375 **** Elm.isFIN_confirmed=true; ! AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs // Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); --- 1370,1374 ---- Elm.isFIN_confirmed=true; ! //AddOutputBuffer(Elm, inPacket); //we are going to send ACK for received segment => adding it to SentACKs // Elm.SentACKs.put(new Integer(inPacket.get_sequence_number()), (TCP_packet) mParentStack.getTCPSegment_clone(listener,msg,flags,ack_num)); Index: Echo_tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo_tcp.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Echo_tcp.java 28 Feb 2006 18:14:22 -0000 1.23 --- Echo_tcp.java 3 Sep 2006 09:53:38 -0000 1.24 *************** *** 143,147 **** */ ! public void DisconnectEvent(){ } /** --- 143,147 ---- */ ! public void DisconnectEvent() { } /** |
From: gift <gi...@us...> - 2006-09-02 18:01:08
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13531/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: Enough for today :) Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Tcp.java 2 Sep 2006 16:57:19 -0000 1.58 --- Tcp.java 2 Sep 2006 18:01:04 -0000 1.59 *************** *** 174,177 **** --- 174,178 ---- public boolean isFIN_confirmed=false; public boolean isPassive=false; + // public boolean isConnected=false; /** * 0 - no status; 1 - is being connected; 2 - is connected; 3 - connection error *************** *** 315,318 **** --- 316,320 ---- this.isFIN_confirmed=false; this.isPassive=false; + //this.isConnected=false; this.ApplicationStatus=0; //no status this.isServer=false; *************** *** 347,351 **** private static final long TCP_CONNECT_SERVER_TIME = 250; //msec //server closing idle connection time private static final long TCP_SENDER_TIME = 200; //msec time to resend all segments in SegmentsToresend queue ! private static final long TCP_CONNECT_TIME = 200; //msec time to resend all segments in SegmentsToresend queue whn connecting /** --- 349,353 ---- private static final long TCP_CONNECT_SERVER_TIME = 250; //msec //server closing idle connection time private static final long TCP_SENDER_TIME = 200; //msec time to resend all segments in SegmentsToresend queue ! private static final long TCP_CONNECT_TIME = 200; //msec time to resend all segments in SegmentsToresend queue when connecting /** *************** *** 992,997 **** //this.total_sent++; //overall stats ! //IF NOT ACK then pushing a copy into Hashtable ! if (!flags[1] || a_num<=1) Elm.SegmentsToResend.put(new Integer(s_num), tosend_clone); if (flags[4]) reps=5; --- 994,1000 ---- //this.total_sent++; //overall stats ! //IF NOT ACK then push a copy into Hashtable ! //if (!flags[1] || a_num<=1) Elm.SegmentsToResend.put(new Integer(s_num), tosend_clone); ! if (!flags[1]) Elm.SegmentsToResend.put(new Integer(s_num), tosend_clone); if (flags[4]) reps=5; *************** *** 1500,1504 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + "sent ACK =" + ack_num + ")."); Simulation.addLayerInfo(TCP_Info); --- 1503,1507 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + " sent ACK = " + ack_num + ")."); Simulation.addLayerInfo(TCP_Info); |
From: gift <gi...@us...> - 2006-09-02 18:01:08
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13531/core Modified Files: FalseRandom.java Log Message: Enough for today :) Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FalseRandom.java 2 Sep 2006 16:38:34 -0000 1.3 --- FalseRandom.java 2 Sep 2006 18:01:04 -0000 1.4 *************** *** 9,12 **** --- 9,14 ---- 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}; if(count >= sequence.length) count = 0; |
From: gift <gi...@us...> - 2006-09-02 16:57:23
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv17656/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.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Tcp.java 2 Sep 2006 16:45:12 -0000 1.57 --- Tcp.java 2 Sep 2006 16:57:19 -0000 1.58 *************** *** 422,425 **** --- 422,426 ---- while (HTkeys.hasMoreElements()) { curkey= (Integer) HTkeys.nextElement(); + TCP_packet T_packet = (TCP_packet)Elm.SegmentsToResend.get(curkey); try{ //Create Layer info *************** *** 428,432 **** TCP_Info.setDataType("TCP Protocol"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending packet due to timer out: " + repTime + " msec has passed. (SEQ=" + curkey + ")"); Simulation.addLayerInfo(TCP_Info); --- 429,433 ---- TCP_Info.setDataType("TCP Protocol"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending packet due to timer out: " + repTime + " msec has passed. (SEQ = " + T_packet.get_sequence_number() + " ACK = "+ T_packet.get_acknowledgment_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1016,1023 **** String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); --- 1017,1024 ---- String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ = " + s_num + " ACK = " + a_num +")"; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ = " + s_num + " ACK = " + a_num +")"; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ = " + s_num + " ACK = " + a_num +")"; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ = " + s_num + " ACK = " + a_num +")"; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); *************** *** 1122,1126 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " has status \"busy\" from now. (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); --- 1123,1127 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " has status \"busy\" from now. (SEQ = " + inPacket.get_sequence_number() + " ACK = " + inPacket.get_acknowledgment_number()+ ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1207,1211 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); --- 1208,1212 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\". (SEQ = " + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1262,1266 **** //System.out.println("%%% - in here"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again --- 1263,1267 ---- //System.out.println("%%% - in here"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ = " + inPacket.get_sequence_number() + " ACK = " + inPacket.get_acknowledgment_number()+ ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again *************** *** 1401,1405 **** //System.out.println("%%% - in here - !!!"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again --- 1402,1406 ---- //System.out.println("%%% - in here - !!!"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ = " + inPacket.get_sequence_number() + " ACK = " + inPacket.get_acknowledgment_number()+ ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again *************** *** 1499,1503 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ=" + inPacket.get_sequence_number() + "sent ACK =" + ack_num + ")."); Simulation.addLayerInfo(TCP_Info); --- 1500,1504 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ = " + inPacket.get_sequence_number() + "sent ACK =" + ack_num + ")."); Simulation.addLayerInfo(TCP_Info); *************** *** 1526,1530 **** TCP_Info.setLayer("Transport"); //System.out.println("%%% - in here ^^^"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. (SEQ=" + inPacket.get_sequence_number() + ") Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); --- 1527,1531 ---- TCP_Info.setLayer("Transport"); //System.out.println("%%% - in here ^^^"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. (SEQ = " + inPacket.get_sequence_number() + " ACK = " + inPacket.get_acknowledgment_number()+ ") Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); |
From: gift <gi...@us...> - 2006-09-02 16:45:21
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12626/core/protocolsuite/tcp_ip Modified Files: Tcp.java Log Message: SEQ and ACK for now Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Tcp.java 2 Sep 2006 16:38:34 -0000 1.56 --- Tcp.java 2 Sep 2006 16:45:12 -0000 1.57 *************** *** 1016,1023 **** String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); --- 1016,1023 ---- String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + " ACK = " + a_num +")"; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); |
From: gift <gi...@us...> - 2006-09-02 16:38:39
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9987/core/protocolsuite/tcp_ip Modified Files: ProtocolStack.java Tcp.java Log Message: TCP update .... ... Index: ProtocolStack.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ProtocolStack.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ProtocolStack.java 2 Sep 2006 10:55:00 -0000 1.45 --- ProtocolStack.java 2 Sep 2006 16:38:34 -0000 1.46 *************** *** 1877,1881 **** try{ //let's get a reserved local port number for this application ! srcPort=mTCPprotocol.getApplicationLocalPortNumber(application); //and destination IP of the other host DestIPAddress=mTCPprotocol.getApplicationDestIP(srcPort); --- 1877,1881 ---- try{ //let's get a reserved local port number for this application ! srcPort = (application != null) ? mTCPprotocol.getApplicationLocalPortNumber(application) : 0 ; //and destination IP of the other host DestIPAddress=mTCPprotocol.getApplicationDestIP(srcPort); Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Tcp.java 2 Sep 2006 15:46:27 -0000 1.55 --- Tcp.java 2 Sep 2006 16:38:34 -0000 1.56 *************** *** 1459,1462 **** --- 1459,1464 ---- } + s=s + "received SEQ_NUMBER =" + chk + "; will be removed from segments_to_resend SEQ = " + (our_ack-1); + TCP_Info.setDescription(s); *************** *** 1475,1481 **** int ack_num=chk+1; - //our_ack==2 when connection is established - // if ((our_ack!=2 || Elm.sent_segments!=2) && Elm.PortStatus!=1) - //{ //we are going to send ACK for received segment => adding it to SentACKs Application listener; --- 1477,1480 ---- *************** *** 1490,1494 **** Elm.SentACKs.remove(inPacket.get_sequence_number()); } - //} //Create Layer info --- 1489,1492 ---- *************** *** 1501,1505 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); --- 1499,1503 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (received SEQ=" + inPacket.get_sequence_number() + "sent ACK =" + ack_num + ")."); Simulation.addLayerInfo(TCP_Info); *************** *** 1528,1532 **** TCP_Info.setLayer("Transport"); //System.out.println("%%% - in here ^^^"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); --- 1526,1530 ---- TCP_Info.setLayer("Transport"); //System.out.println("%%% - in here ^^^"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. (SEQ=" + inPacket.get_sequence_number() + ") Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); *************** *** 1840,1842 **** } //EOF - --- 1838,1839 ---- |
From: gift <gi...@us...> - 2006-09-02 16:38:39
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9987/core Modified Files: FalseRandom.java Log Message: TCP update .... ... Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FalseRandom.java 2 Sep 2006 14:50:49 -0000 1.2 --- FalseRandom.java 2 Sep 2006 16:38:34 -0000 1.3 *************** *** 5,11 **** public static int Kotochigov(){ ! //int sequence[] = {1, 1, 0, 0, 0, 0, 0, 0}; ! 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}; if(count >= sequence.length) count = 0; --- 5,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}; + if(count >= sequence.length) count = 0; |
From: Alexander B. <da...@us...> - 2006-09-02 15:46:30
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22008/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.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Tcp.java 2 Sep 2006 15:40:45 -0000 1.54 --- Tcp.java 2 Sep 2006 15:46:27 -0000 1.55 *************** *** 1,1842 **** ! /* ! ! Java Firewall Simulator (jFirewallSim) ! ! ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! ! [...3655 lines suppressed...] ! try { ! to_buff.setTCP_message(Packet.getTCP_message()); ! } catch(TransportLayerException e) {} //will never be thrown from here ;) ! ! to_buff.set_sequence_number(Packet.get_sequence_number()); ! to_buff.set_acknowledgment_number(Packet.get_acknowledgment_number()); ! ! to_buff.set_URG_flag(Packet.get_URG_flag()); ! to_buff.set_ACK_flag(Packet.get_ACK_flag()); ! to_buff.set_PSH_flag(Packet.get_PSH_flag()); ! to_buff.set_RST_flag(Packet.get_RST_flag()); ! to_buff.set_SYN_flag(Packet.get_SYN_flag()); ! to_buff.set_FIN_flag(Packet.get_FIN_flag()); ! ! Elm.OutputBuffer.put(new Integer(Packet.get_sequence_number()), to_buff); ! } ! } ! ! } //EOF ! |
From: Alexander B. <da...@us...> - 2006-09-02 15:40:48
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19671/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.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Tcp.java 2 Sep 2006 15:32:31 -0000 1.53 --- Tcp.java 2 Sep 2006 15:40:45 -0000 1.54 *************** *** 346,350 **** private static final long TCP_SERVER_TIME = 1000; //msec //server closing idle connection time private static final long TCP_CONNECT_SERVER_TIME = 250; //msec //server closing idle connection time ! private static final long TCP_SENDER_TIME = 1000; //msec time to resend all segments in SegmentsToresend queue private static final long TCP_CONNECT_TIME = 200; //msec time to resend all segments in SegmentsToresend queue whn connecting --- 346,350 ---- private static final long TCP_SERVER_TIME = 1000; //msec //server closing idle connection time private static final long TCP_CONNECT_SERVER_TIME = 250; //msec //server closing idle connection time ! private static final long TCP_SENDER_TIME = 200; //msec time to resend all segments in SegmentsToresend queue private static final long TCP_CONNECT_TIME = 200; //msec time to resend all segments in SegmentsToresend queue whn connecting *************** *** 428,432 **** TCP_Info.setDataType("TCP Protocol"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending packet due to timer out: " + repTime + " msec has passed."); Simulation.addLayerInfo(TCP_Info); --- 428,432 ---- TCP_Info.setDataType("TCP Protocol"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending packet due to timer out: " + repTime + " msec has passed. (SEQ=" + curkey + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1016,1023 **** String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"."; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"."; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"."; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"."; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); --- 1016,1023 ---- String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); *************** *** 1122,1126 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " has status \"busy\" from now."); Simulation.addLayerInfo(TCP_Info); --- 1122,1126 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " has status \"busy\" from now. (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1207,1211 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\"."); Simulation.addLayerInfo(TCP_Info); --- 1207,1211 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1262,1266 **** //System.out.println("%%% - in here"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again --- 1262,1266 ---- //System.out.println("%%% - in here"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again *************** *** 1401,1405 **** //System.out.println("%%% - in here - !!!"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again --- 1401,1405 ---- //System.out.println("%%% - in here - !!!"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again *************** *** 1501,1505 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program."); Simulation.addLayerInfo(TCP_Info); --- 1501,1505 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1528,1532 **** TCP_Info.setLayer("Transport"); //System.out.println("%%% - in here ^^^"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); --- 1528,1532 ---- TCP_Info.setLayer("Transport"); //System.out.println("%%% - in here ^^^"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); |
From: Alexander B. <da...@us...> - 2006-09-02 15:32:35
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16532/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.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Tcp.java 2 Sep 2006 15:04:36 -0000 1.52 --- Tcp.java 2 Sep 2006 15:32:31 -0000 1.53 *************** *** 1,1966 **** ! /* ! ! Java Firewall Simulator (jFirewallSim) ! ! ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! ! [...3779 lines suppressed...] ! try { ! to_buff.setTCP_message(Packet.getTCP_message()); ! } catch(TransportLayerException e) {} //will never be thrown from here ;) ! ! to_buff.set_sequence_number(Packet.get_sequence_number()); ! to_buff.set_acknowledgment_number(Packet.get_acknowledgment_number()); ! ! to_buff.set_URG_flag(Packet.get_URG_flag()); ! to_buff.set_ACK_flag(Packet.get_ACK_flag()); ! to_buff.set_PSH_flag(Packet.get_PSH_flag()); ! to_buff.set_RST_flag(Packet.get_RST_flag()); ! to_buff.set_SYN_flag(Packet.get_SYN_flag()); ! to_buff.set_FIN_flag(Packet.get_FIN_flag()); ! ! Elm.OutputBuffer.put(new Integer(Packet.get_sequence_number()), to_buff); ! } ! } ! ! } //EOF ! |
From: Alexander B. <da...@us...> - 2006-09-02 15:04:41
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv5213/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.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Tcp.java 2 Sep 2006 14:57:37 -0000 1.51 --- Tcp.java 2 Sep 2006 15:04:36 -0000 1.52 *************** *** 452,456 **** TCP_Info.setDataType("TCP Protocol"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending packet due to timer out: " + repTime + " msec has passed."); Simulation.addLayerInfo(TCP_Info); --- 452,456 ---- TCP_Info.setDataType("TCP Protocol"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending packet due to timer out: " + repTime + " msec has passed. (SEQ=" + curkey + ")"); Simulation.addLayerInfo(TCP_Info); |
From: Alexander B. <da...@us...> - 2006-09-02 14:57:41
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2444/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.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** Tcp.java 2 Sep 2006 14:50:50 -0000 1.50 --- Tcp.java 2 Sep 2006 14:57:37 -0000 1.51 *************** *** 1332,1336 **** //System.out.println("%%% - in here"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again --- 1332,1336 ---- //System.out.println("%%% - in here"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again *************** *** 1494,1498 **** //System.out.println("%%% - in here - !!!"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + "."); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again --- 1494,1498 ---- //System.out.println("%%% - in here - !!!"); TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("Resending ACK packet due to duplicate arrival. Total duplicates received: " + Elm.received_duplicates + ". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); //now we have to resend our ACK again *************** *** 1603,1607 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program."); Simulation.addLayerInfo(TCP_Info); --- 1603,1607 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP packet with data received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + ". Passing data to application program. (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); |
From: Alexander B. <da...@us...> - 2006-09-02 14:50:59
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32099/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.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Tcp.java 2 Sep 2006 11:39:19 -0000 1.49 --- Tcp.java 2 Sep 2006 14:50:50 -0000 1.50 *************** *** 359,363 **** private static final long TCP_SERVER_TIME = 1000; //msec //server closing idle connection time private static final long TCP_CONNECT_SERVER_TIME = 250; //msec //server closing idle connection time ! private static final long TCP_SENDER_TIME = 1000; //msec time to resend all segments in SegmentsToresend queue private static final long TCP_CONNECT_TIME = 200; //msec time to resend all segments in SegmentsToresend queue whn connecting --- 359,364 ---- private static final long TCP_SERVER_TIME = 1000; //msec //server closing idle connection time private static final long TCP_CONNECT_SERVER_TIME = 250; //msec //server closing idle connection time ! private static final long TCP_SENDER_TIME = 200; //msec time to resend all segments in SegmentsToresend queue ! // private static final long TCP_CONNECT_TIME = 200; //msec time to resend all segments in SegmentsToresend queue whn connecting *************** *** 1081,1088 **** String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"."; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"."; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"."; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"."; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); --- 1082,1089 ---- String s=new String(); ! if (flags[4]) s="Created TCP SYN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (flags[5]) s="Created TCP FIN-packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (!(flags[4] || flags[5])) s="Created TCP data packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; ! if (!(flags[4] || flags[5]) && flags[1]) s="Created TCP acknowledgement packet for " + inDestIPAddress + ":" + indestPort +"." + "(SEQ=" + s_num + ")"; TCP_Info.setDescription(s); Simulation.addLayerInfo(TCP_Info); *************** *** 1142,1146 **** switch(Elm.PortStatus) { ! case 0: //port is free => Error: no application to receive TCP //have to disconnect listener from port //System.out.println(mParentStack.getHostName() + ":" + " !! 0 SEQ_numb==" + inPacket.get_sequence_number()); --- 1143,1150 ---- switch(Elm.PortStatus) { ! case 0: //port is free => Error: no application to receive TCP ! ! // >>> if FIN send ACK ! //have to disconnect listener from port //System.out.println(mParentStack.getHostName() + ":" + " !! 0 SEQ_numb==" + inPacket.get_sequence_number()); *************** *** 1180,1184 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " has status \"busy\" from now."); Simulation.addLayerInfo(TCP_Info); --- 1184,1188 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " has status \"busy\" from now. (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); *************** *** 1270,1274 **** TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\"."); Simulation.addLayerInfo(TCP_Info); --- 1274,1278 ---- TCP_Info.setLayer("Transport"); ! TCP_Info.setDescription("TCP SYN-packet with ACK received from "+ inPacket.getSourceIPAddress() + ":" + inPacket.get_srcPort() + "." + " TCP Port " + inPacket.get_destPort() + " still has status \"busy\". (SEQ=" + inPacket.get_sequence_number() + ")"); Simulation.addLayerInfo(TCP_Info); |
From: Alexander B. <da...@us...> - 2006-09-02 14:50:57
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32099/core Modified Files: FalseRandom.java Log Message: Index: FalseRandom.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FalseRandom.java 2 Sep 2006 12:35:00 -0000 1.1 --- FalseRandom.java 2 Sep 2006 14:50:49 -0000 1.2 *************** *** 5,9 **** public static int Kotochigov(){ ! int sequence[] = {1, 1, 0, 0, 0, 0, 0, 0}; if(count >= sequence.length) count = 0; --- 5,10 ---- public static int Kotochigov(){ ! //int sequence[] = {1, 1, 0, 0, 0, 0, 0, 0}; ! 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}; if(count >= sequence.length) count = 0; |
From: Alexander B. <da...@us...> - 2006-09-02 12:35:04
|
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11496/core Modified Files: EthernetLink.java Added Files: FalseRandom.java Log Message: Index: EthernetLink.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/EthernetLink.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EthernetLink.java 2 Mar 2006 13:37:04 -0000 1.7 --- EthernetLink.java 2 Sep 2006 12:35:00 -0000 1.8 *************** *** 30,33 **** --- 30,34 ---- package core; import java.util.*; + import core.FalseRandom; /** * EthernetLink extends Link. It sets two Interface links to a pc. *************** *** 85,91 **** if (!temp.getSourceName().equals(inSourceName)) { ! if( ((sievingCoefficient)/100)>Math.random()) temp.receivePacket(inPacket); else throw new LowLinkException("Packet lost due to physical link problems!"); } } --- 86,100 ---- 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 + "!"); + + if(cat==1) + temp.receivePacket(inPacket); + else throw new LowLinkException("Packet lost due to physical link problems!"); } } --- NEW FILE: FalseRandom.java --- package core; public class FalseRandom{ public static int count = 0; public static int Kotochigov(){ int sequence[] = {1, 1, 0, 0, 0, 0, 0, 0}; if(count >= sequence.length) count = 0; return sequence[count++]; } } |