public final class TcpPacketImpl extends TransportPacketImpl implements TCPPacket
| Constructor and Description |
|---|
TcpPacketImpl(IPPacket parent,
Buffer headers,
Buffer options,
Buffer payload) |
| Modifier and Type | Method and Description |
|---|---|
TransportPacket |
clone() |
long |
getAcknowledgementNumber() |
int |
getChecksum() |
int |
getHeaderLength()
Get the header length in bytes
|
short |
getReserved() |
long |
getSequenceNumber() |
int |
getUrgentPointer() |
int |
getWindowSize() |
boolean |
isACK() |
boolean |
isCWR() |
boolean |
isECE() |
boolean |
isFIN() |
boolean |
isNS() |
boolean |
isPSH()
Check whether the psh (push) flag is turned on
|
boolean |
isRST() |
boolean |
isSYN() |
boolean |
isTCP() |
boolean |
isURG() |
void |
write(OutputStream out,
Buffer payload)
Writes this packet to the
OutputStream with the supplied payload. |
getArrivalTime, getDestinationPort, getNextPacket, getParentPacket, getSourcePort, isSCTP, isUDP, setDestinationPort, setSourcePort, verifycheckParent, getName, getPacket, getPayload, getProtocol, hasProtocol, writeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParentPacketgetDestinationPort, getSourcePort, isSCTP, isUDP, setDestinationPort, setSourcePortgetArrivalTime, getName, getNextPacket, getPacket, getPayload, getProtocol, hasProtocol, verify, writepublic boolean isTCP()
isTCP in interface TransportPacketisTCP in class TransportPacketImplpublic int getChecksum()
getChecksum in interface TCPPacketpublic int getUrgentPointer()
getUrgentPointer in interface TCPPacketpublic int getWindowSize()
getWindowSize in interface TCPPacketpublic short getReserved()
getReserved in interface TCPPacketpublic int getHeaderLength()
getHeaderLength in interface TransportPacketpublic boolean isPSH()
public long getSequenceNumber()
getSequenceNumber in interface TCPPacketpublic long getAcknowledgementNumber()
getAcknowledgementNumber in interface TCPPacketpublic TransportPacket clone()
clone in interface Packetclone in interface TransportPacketclone in class TransportPacketImplpublic final void write(OutputStream out, Buffer payload) throws IOException
PacketOutputStream with the supplied payload.
You can use this method to e.g. write a raw UDPPacket to the
stream with this payload. Note, if the UDPPacket already had a
payload it will be ignored so use this method with care.write in interface PacketIOExceptionCopyright © 2021. All Rights Reserved.