SSF.OS.TCP
Class TCP_Message

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--SSF.OS.TCP.TCP_Header
              |
              +--SSF.OS.TCP.TCP_Message

public class TCP_Message
extends TCP_Header

TCP_Message represents a TCP header and data segment together with the prepended IpHeader.


Field Summary
 int seglen
          segment length of this TCP message
 
Fields inherited from class SSF.OS.TCP.TCP_Header
ACK, ACKno, AdvertisedWnd, DEST_port, FIN, flags, PSH, RST, SEQno, SOURCE_port, SYN, URG
 
Constructor Summary
TCP_Message(TCP_Header th, int destAddr, int len)
          Construct a TCP message with TCP header th, including a prepended IpHeader with given destination IP address destAddr, source IP address set to -1, and virtual segment length len bytes.
TCP_Message(TCP_Header th, int srcAddr, int destAddr, int len)
          Construct a TCP message with TCP header th, including a prepended IpHeader with source IP address srcAddr, destination IP address destAddr, and virtual segment length len bytes.
TCP_Message(TCP_Message msg)
          Copy constructor used with retransmission: copies the prepended IpHeader's fields SOURCE_IP, DEST_IP, TOS, but NOT the TTL field, which is set to the default value.
 
Method Summary
 int bytecount()
          Returns the total number of bytes contained in this TCP packet (header + data).
 long getLastSEQ()
          Returns the sequence number of the last byte in this segment.
 void printMsg()
           
 
Methods inherited from class SSF.OS.TCP.TCP_Header
version
 
Methods inherited from class SSF.OS.ProtocolMessage
carryPayload, copy, dropHeader, dropPayload, frombytes, fromVersion, header_bytecount, payload, previous, size, tobytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

seglen

public int seglen
segment length of this TCP message

Constructor Detail

TCP_Message

public TCP_Message(TCP_Header th,
                   int destAddr,
                   int len)
Construct a TCP message with TCP header th, including a prepended IpHeader with given destination IP address destAddr, source IP address set to -1, and virtual segment length len bytes. Obsolete.


TCP_Message

public TCP_Message(TCP_Header th,
                   int srcAddr,
                   int destAddr,
                   int len)
Construct a TCP message with TCP header th, including a prepended IpHeader with source IP address srcAddr, destination IP address destAddr, and virtual segment length len bytes. Modification here and in other SSF.OS.TCP classes by BJ Premore 9/22/00.


TCP_Message

public TCP_Message(TCP_Message msg)
            throws ProtocolException
Copy constructor used with retransmission: copies the prepended IpHeader's fields SOURCE_IP, DEST_IP, TOS, but NOT the TTL field, which is set to the default value. Fragile: should not be used except by SSF.OS.TCP. Modification by ato 9/24/00.

Method Detail

printMsg

public void printMsg()

getLastSEQ

public long getLastSEQ()
Returns the sequence number of the last byte in this segment.


bytecount

public int bytecount()
Returns the total number of bytes contained in this TCP packet (header + data).

Overrides:
bytecount in class TCP_Header