public interface IPPacket extends Packet, Cloneable
| Modifier and Type | Method and Description |
|---|---|
IPPacket |
clone() |
String |
getDestinationIP()
Convenience method for returning the destination IP in a more human readable form.
|
short |
getFragmentOffset()
The fragment offset field, measured in units of eight-byte blocks, is 13
bits long and specifies the offset of a particular fragment relative to
the beginning of the original unfragmented IP datagram.
|
int |
getHeaderLength()
Get the length of the IP headers (in bytes)
|
int |
getIdentification()
Note, this should be treated as a unsigned short.
|
byte[] |
getRawDestinationIP()
Get the raw bytes, either 4 or 16, that represent the destination IP address.
|
byte[] |
getRawSourceIP()
Get the raw bytes, either 4 or 16, that represent the source IP.
|
String |
getSourceIP()
Convenience method for returning the source IP in a more human readable form.
|
int |
getTotalIPLength()
This 16-bit field defines the entire packet (fragment) size, including
header and data, in bytes.
|
int |
getVersion()
The IP version (4 or 6)
|
boolean |
isFragmented() |
void |
setDestinationIP(String destinationIP)
Set the destination IP of this
IPPacket. |
void |
setSourceIP(String sourceIp)
Set the source IP of this
IPPacket. |
getArrivalTime, getName, getNextPacket, getPacket, getParentPacket, getPayload, getProtocol, hasProtocol, verify, write, writeString getSourceIP()
byte[] getRawSourceIP()
void setSourceIP(String sourceIp)
IPPacket.sourceIp - String getDestinationIP()
byte[] getRawDestinationIP()
void setDestinationIP(String destinationIP)
IPPacket.int getTotalIPLength()
int getVersion()
int getHeaderLength()
int getIdentification()
boolean isFragmented()
short getFragmentOffset()
Copyright © 2021. All Rights Reserved.