[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip ProtocolStack.java, 1.45, 1.46 Tcp.java, 1.55
Status: Beta
Brought to you by:
darkkey
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 ---- |