Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2950/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.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** Tcp.java 3 Sep 2006 19:34:31 -0000 1.66
--- Tcp.java 4 Sep 2006 18:43:27 -0000 1.67
***************
*** 1828,1832 ****
*/
private void PassUpstairs(Application listener, TCP_HashTableElement Elm) throws LowLinkException, TransportLayerException {
! Integer kkey=Elm.last_passed+1;//=new Integer(Elm.last_passed+1);
while(Elm.OutputBuffer.containsKey(kkey)) {
--- 1828,1835 ----
*/
private void PassUpstairs(Application listener, TCP_HashTableElement Elm) throws LowLinkException, TransportLayerException {
! 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 + ".");
while(Elm.OutputBuffer.containsKey(kkey)) {
***************
*** 1835,1844 ****
kkey++;
! if((!Packet.get_ACK_flag()) && (!Packet.get_SYN_flag()))
//if(!Packet.get_ACK_flag())
listener.RecvData(Packet.getTCP_message());
}
!
}
--- 1838,1853 ----
kkey++;
! if((!Packet.get_ACK_flag()) && (!Packet.get_SYN_flag()) && (!Packet.get_FIN_flag()))
! {
//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.");
}
***************
*** 1854,1858 ****
*/
private void AddOutputBuffer(TCP_HashTableElement Elm, TCP_packet Packet) throws TransportLayerException {
! if (Elm.OutputBuffer.size()==200) {
throw new TransportLayerException("TCP Error: maximum buffer size reached! Can not keep on receiving TCP segments. Bad connection to: " + Elm.connectedtoIP + ":" + Elm.connectedtoPort + ".");
} else {
--- 1863,1867 ----
*/
private void AddOutputBuffer(TCP_HashTableElement Elm, TCP_packet Packet) throws TransportLayerException {
! if (Elm.OutputBuffer.size()==2000) {
throw new TransportLayerException("TCP Error: maximum buffer size reached! Can not keep on receiving TCP segments. Bad connection to: " + Elm.connectedtoIP + ":" + Elm.connectedtoPort + ".");
} else {
|