public class TCP extends BasePacket
| Modifier and Type | Field and Description |
|---|---|
protected int |
acknowledge |
protected short |
checksum |
protected byte |
dataOffset |
protected short |
destinationPort |
protected short |
flags |
protected byte[] |
options |
protected int |
sequence |
protected short |
sourcePort |
protected short |
urgentPointer |
protected short |
windowSize |
parent, payload| Constructor and Description |
|---|
TCP() |
| Modifier and Type | Method and Description |
|---|---|
IPacket |
deserialize(byte[] data,
int offset,
int length)
Deserializes this packet layer and all possible payloads
|
boolean |
equals(java.lang.Object obj) |
int |
getAcknowledge() |
short |
getChecksum() |
byte |
getDataOffset() |
short |
getDestinationPort() |
short |
getFlags() |
byte[] |
getOptions() |
int |
getSequence() |
short |
getSourcePort() |
short |
getTcpChecksum() |
short |
getUrgentPointer(short urgentPointer) |
short |
getWindowSize() |
int |
hashCode() |
void |
resetChecksum()
Reset any checksums as needed, and call resetChecksum on all parents
|
byte[] |
serialize()
Serializes the packet.
|
TCP |
setAcknowledge(int ack) |
TCP |
setChecksum(short checksum) |
TCP |
setDataOffset(byte offset) |
TCP |
setDestinationPort(short destinationPort) |
TCP |
setFlags(short flags) |
TCP |
setOptions(byte[] options) |
TCP |
setSequence(int seq) |
TCP |
setSourcePort(short sourcePort) |
TCP |
setTcpChecksum(short checksum) |
TCP |
setUrgentPointer(short urgentPointer) |
TCP |
setWindowSize(short windowSize) |
clone, getParent, getPayload, setParent, setPayloadprotected short sourcePort
protected short destinationPort
protected int sequence
protected int acknowledge
protected byte dataOffset
protected short flags
protected short windowSize
protected short checksum
protected short urgentPointer
protected byte[] options
public short getSourcePort()
public TCP setSourcePort(short sourcePort)
sourcePort - the sourcePort to setpublic short getDestinationPort()
public TCP setDestinationPort(short destinationPort)
destinationPort - the destinationPort to setpublic short getChecksum()
public int getSequence()
public TCP setSequence(int seq)
public int getAcknowledge()
public TCP setAcknowledge(int ack)
public byte getDataOffset()
public TCP setDataOffset(byte offset)
public short getFlags()
public TCP setFlags(short flags)
public short getWindowSize()
public TCP setWindowSize(short windowSize)
public short getTcpChecksum()
public TCP setTcpChecksum(short checksum)
public void resetChecksum()
IPacketresetChecksum in interface IPacketresetChecksum in class BasePacketpublic short getUrgentPointer(short urgentPointer)
public TCP setUrgentPointer(short urgentPointer)
public byte[] getOptions()
public TCP setOptions(byte[] options)
public TCP setChecksum(short checksum)
checksum - the checksum to setpublic byte[] serialize()
public int hashCode()
hashCode in class BasePacketpublic boolean equals(java.lang.Object obj)
equals in class BasePacket