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() { }
/**
|