[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip Tcp.java, 1.57, 1.58
Status: Beta
Brought to you by:
darkkey
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); |