concast.base
Class TCPHeader

java.lang.Object
  |
  +--concast.base.TCPHeader

public class TCPHeader
extends java.lang.Object

Class to parse TCP header


Constructor Summary
TCPHeader()
           
 
Method Summary
 long ack_seq()
           
 boolean ack()
           
 void build_checksum()
           
 int check()
           
 boolean cwr()
           
 int dest()
           
 boolean ece()
           
 boolean fin()
           
 byte[] getBytes()
          Returns the TCP header.
 int hlen()
           
 int length()
          Returns size
 void processIncomingTCPSeg(ConcastPacket msg)
          Retrieve the header
 boolean psh()
           
 int res1()
           
 boolean rst()
           
 long seq()
           
 void set_ack_seq(long ack_seq)
           
 void setchecksum(int checksum)
           
 void setCheckSum(int value)
          Put checksum, otherwise the receivers kernel will drop it.
 void setwindow(int window)
           
 int source()
           
 boolean syn()
           
 int urg_ptr()
           
 boolean urg()
           
 int window()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPHeader

public TCPHeader()
Method Detail

processIncomingTCPSeg

public void processIncomingTCPSeg(ConcastPacket msg)
Retrieve the header

getBytes

public byte[] getBytes()
Returns the TCP header. processIncomingTCPSeg() has to be called first

length

public int length()
Returns size

source

public int source()

dest

public int dest()

seq

public long seq()

ack_seq

public long ack_seq()

hlen

public int hlen()

res1

public int res1()

cwr

public boolean cwr()

ece

public boolean ece()

urg

public boolean urg()

ack

public boolean ack()

psh

public boolean psh()

rst

public boolean rst()

syn

public boolean syn()

fin

public boolean fin()

setwindow

public void setwindow(int window)

set_ack_seq

public void set_ack_seq(long ack_seq)

window

public int window()

check

public int check()

setchecksum

public void setchecksum(int checksum)

build_checksum

public void build_checksum()

urg_ptr

public int urg_ptr()

setCheckSum

public void setCheckSum(int value)
Put checksum, otherwise the receivers kernel will drop it.