|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.sourceforge.jpcap.net.Packet
|
+--net.sourceforge.jpcap.net.EthernetPacket
|
+--net.sourceforge.jpcap.net.IPPacket
|
+--net.sourceforge.jpcap.net.TCPPacket
A TCP packet.
Extends an IP packet, adding a TCP header and TCP data payload.
| Fields inherited from interface net.sourceforge.jpcap.net.TCPFields |
TCP_ACK_LEN, TCP_ACK_MASK, TCP_ACK_POS, TCP_CSUM_LEN, TCP_CSUM_POS, TCP_DP_POS, TCP_FIN_MASK, TCP_FLAG_LEN, TCP_FLAG_POS, TCP_HEADER_LEN, TCP_PORT_LEN, TCP_PSH_MASK, TCP_RST_MASK, TCP_SEQ_LEN, TCP_SEQ_POS, TCP_SP_POS, TCP_SYN_MASK, TCP_URG_LEN, TCP_URG_MASK, TCP_URG_POS, TCP_WIN_LEN, TCP_WIN_POS |
| Fields inherited from interface net.sourceforge.jpcap.net.IPFields |
IP_CODE_LEN, IP_CODE_POS, IP_CSUM_LEN, IP_CSUM_POS, IP_DST_POS, IP_FRAG_LEN, IP_FRAG_POS, IP_HEADER_LEN, IP_ID_LEN, IP_ID_POS, IP_LEN_LEN, IP_LEN_POS, IP_SRC_POS, IP_TOS_LEN, IP_TOS_POS, IP_TTL_LEN, IP_TTL_POS, IP_VER_LEN, IP_VER_POS |
| Fields inherited from interface net.sourceforge.jpcap.net.EthernetFields |
ETH_CODE_LEN, ETH_CODE_POS, ETH_DST_POS, ETH_HEADER_LEN, ETH_SRC_POS |
| Constructor Summary | |
TCPPacket(int lLen,
byte[] bytes)
Create a new TCP packet. |
|
| Method Summary | |
int |
getAcknowledgmentNumber()
Fetch the packet acknowledgment number. |
int |
getChecksum()
Fetch the header checksum. |
byte[] |
getData()
Fetch data portion of the tcp header. |
int |
getDestinationPort()
Fetch the port number on the target host. |
byte[] |
getHeader()
Fetch the tcp header, excluding tcp data payload. |
int |
getHeaderLength()
Fetch the packet header length. |
int |
getSequenceNumber()
Fetch the packet sequence number. |
int |
getSourcePort()
Fetch the port number on the source host. |
int |
getUrgentPointer()
Fetch the urgent pointer. |
int |
getWindowSize()
Fetch the window size. |
boolean |
isAck()
Check the ACK flag. |
boolean |
isFin()
Check the FIN flag. |
boolean |
isPsh()
Check the PSH flag. |
boolean |
isRst()
Check the RST flag. |
boolean |
isSyn()
Check the SYN flag. |
boolean |
isUrg()
Check the URG flag. |
java.lang.String |
toString()
Convert this TCP packet to a readable string. |
java.lang.String |
toVerboseString()
Convert this TCP packet to a verbose. |
| Methods inherited from class net.sourceforge.jpcap.net.IPPacket |
getDestinationAddress, getFragmentFlags, getFragmentOffset, getId, getLength, getProtocol, getSourceAddress, getTimeToLive, getTypeOfService, getVersion |
| Methods inherited from class net.sourceforge.jpcap.net.EthernetPacket |
getDestinationHwAddress, getSourceHwAddress |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TCPPacket(int lLen,
byte[] bytes)
| Method Detail |
public int getSourcePort()
public int getDestinationPort()
public int getSequenceNumber()
public int getAcknowledgmentNumber()
public int getHeaderLength()
getHeaderLength in class IPPacketpublic int getWindowSize()
public int getChecksum()
getChecksum in class IPPacketpublic int getUrgentPointer()
public boolean isUrg()
public boolean isAck()
public boolean isPsh()
public boolean isRst()
public boolean isSyn()
public boolean isFin()
public byte[] getHeader()
getHeader in class IPPacketpublic byte[] getData()
getData in class IPPacketpublic java.lang.String toString()
toString in class IPPacketpublic java.lang.String toVerboseString()
toVerboseString in class IPPacket
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||