concast.base
Class TCPHeader
java.lang.Object
|
+--concast.base.TCPHeader
- public class TCPHeader
- extends java.lang.Object
Class to parse TCP header
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPHeader
public TCPHeader()
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.