public static final class TcpPacket.TcpHeader extends AbstractPacket.AbstractHeader
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildString()
This method builds the value
toString() will return. |
protected int |
calcHashCode()
This method builds the value
hashCode() will return using
the byte array getRawData() returns. |
protected int |
calcLength()
This method calculates the value
length() will return by
adding up the lengths of byte arrays in the list
getRawFields() returns. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one using
return values of
getRawData(). |
boolean |
getAck() |
int |
getAcknowledgmentNumber() |
long |
getAcknowledgmentNumberAsLong() |
short |
getChecksum() |
byte |
getDataOffset() |
int |
getDataOffsetAsInt() |
TcpPort |
getDstPort() |
boolean |
getFin() |
List<TcpPacket.TcpOption> |
getOptions() |
byte[] |
getPadding() |
boolean |
getPsh() |
protected List<byte[]> |
getRawFields()
Returns a list of byte arrays which represents this header's fields.
|
byte |
getReserved() |
boolean |
getRst() |
int |
getSequenceNumber() |
long |
getSequenceNumberAsLong() |
TcpPort |
getSrcPort() |
boolean |
getSyn() |
boolean |
getUrg() |
short |
getUrgentPointer() |
int |
getUrgentPointerAsInt() |
short |
getWindow() |
int |
getWindowAsInt() |
buildHexString, buildRawData, getRawData, hashCode, length, toHexString, toStringpublic TcpPort getSrcPort()
public TcpPort getDstPort()
public int getSequenceNumber()
public long getSequenceNumberAsLong()
public int getAcknowledgmentNumber()
public long getAcknowledgmentNumberAsLong()
public byte getDataOffset()
public int getDataOffsetAsInt()
public byte getReserved()
public boolean getUrg()
public boolean getAck()
public boolean getPsh()
public boolean getRst()
public boolean getSyn()
public boolean getFin()
public short getWindow()
public int getWindowAsInt()
public short getChecksum()
public short getUrgentPointer()
public int getUrgentPointerAsInt()
public List<TcpPacket.TcpOption> getOptions()
public byte[] getPadding()
protected List<byte[]> getRawFields()
AbstractPacket.AbstractHeadercalcLength()
and buildRawData().getRawFields in class AbstractPacket.AbstractHeaderprotected int calcLength()
AbstractPacket.AbstractHeaderlength() will return by
adding up the lengths of byte arrays in the list
getRawFields() returns.calcLength in class AbstractPacket.AbstractHeaderprotected String buildString()
AbstractPacket.AbstractHeadertoString() will return.buildString in class AbstractPacket.AbstractHeaderpublic boolean equals(Object obj)
AbstractPacket.AbstractHeadergetRawData().
This method should be overridden so that it does more strict comparisons
more efficiently.equals in class AbstractPacket.AbstractHeaderprotected int calcHashCode()
AbstractPacket.AbstractHeaderhashCode() will return using
the byte array getRawData() returns.
This method may be better to be overridden for performance reason.calcHashCode in class AbstractPacket.AbstractHeaderCopyright © 2011–2016 Pcap4J.org. All rights reserved.