SSF.OS.TCP
Class TCP_Header

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--SSF.OS.TCP.TCP_Header
Direct Known Subclasses:
TCP_Message

public class TCP_Header
extends ProtocolMessage

A simplified TCP header.


Field Summary
static byte ACK
           
 long ACKno
          Acknowledgment number (next sequence number expected)
 int AdvertisedWnd
          Advertised receive window size
 int DEST_port
          destination port number
static byte FIN
           
 byte flags
          Control flags of TCP header
static byte PSH
           
static byte RST
           
 long SEQno
          sequence number of the first data byte in segment
 int SOURCE_port
          source port number
static byte SYN
           
static byte URG
           
 
Constructor Summary
TCP_Header()
           
TCP_Header(int source_port, int dest_port, long seqno, long ackno, int advertised, byte flag)
          initialize a TCP_Header object
TCP_Header(TCP_Header th)
          copy constructor of TCP_Header
 
Method Summary
 int bytecount()
          return the number of bytes nominally used by this TCP header
 java.lang.String version()
          Return the SSF.OS.TCP version number for this header
 
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

DEST_port

public int DEST_port
destination port number


SOURCE_port

public int SOURCE_port
source port number


SEQno

public long SEQno
sequence number of the first data byte in segment


ACKno

public long ACKno
Acknowledgment number (next sequence number expected)


AdvertisedWnd

public int AdvertisedWnd
Advertised receive window size


flags

public byte flags
Control flags of TCP header


FIN

public static byte FIN

SYN

public static byte SYN

RST

public static byte RST

PSH

public static byte PSH

ACK

public static byte ACK

URG

public static byte URG
Constructor Detail

TCP_Header

public TCP_Header(int source_port,
                  int dest_port,
                  long seqno,
                  long ackno,
                  int advertised,
                  byte flag)
initialize a TCP_Header object

Parameters:
dest_port - destination port number
source_port - source port number
seqno - sequence number of the first data byte in segment
ackno - acknowledgment number of the ACK packet
advertised - advertised receiver window size
flag - control flag used to indicate packet type

TCP_Header

public TCP_Header()

TCP_Header

public TCP_Header(TCP_Header th)
copy constructor of TCP_Header

Parameters:
th - TCP_Header object to be copied
Method Detail

bytecount

public int bytecount()
return the number of bytes nominally used by this TCP header

Overrides:
bytecount in class ProtocolMessage

version

public java.lang.String version()
Return the SSF.OS.TCP version number for this header

Overrides:
version in class ProtocolMessage