|
SourceForge Jpcap | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jpcap.net.Packet
net.sourceforge.jpcap.net.EthernetPacket
net.sourceforge.jpcap.net.DTP.Packet
public static class DTP.Packet
DTP packet class.
Field Summary |
---|
Fields inherited from class net.sourceforge.jpcap.net.EthernetPacket |
---|
_byteBuffer, _bytes, _ethOffset, _timeval |
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 | |
---|---|
DTP.Packet(int lLen,
byte[] bytes)
Creates a new DTP packet |
|
DTP.Packet(int lLen,
byte[] bytes,
Timeval tv)
Create a new DTP packet. |
|
DTP.Packet(int lLen,
ByteBuffer bb,
Timeval tv)
Create a new DTP packet |
Method Summary | |
---|---|
byte[] |
getData()
Fetch the data portion of the packet. |
byte[] |
getDTPData()
|
int |
getDTPVersion()
|
void |
setDTPData(byte[] data)
Set the DTP data payload. |
void |
setDTPVersion(int version)
Set the DTP protocol version |
String |
toColoredString(boolean colored)
Generate string with contents describing this packet. |
Methods inherited from class net.sourceforge.jpcap.net.EthernetPacket |
---|
equals, getColor, getDestinationHwAddress, getDestinationMACAddress, getEthernetCRC32, getEthernetData, getEthernetHeader, getEthernetHeaderLength, getEthernetProtocol, getHeader, getHeaderLength, getPacketData, getPacketLength, getProtocol, getSourceHwAddress, getSourceMACAddress, getTimeval, hashCode, setChecksums, setDestinationMACAddress, setEthernetProtocol, setSourceMACAddress, toByteArray, toString |
Methods inherited from class net.sourceforge.jpcap.net.Packet |
---|
getChecksum, ipChecksum, isValidChecksum |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DTP.Packet(int lLen, byte[] bytes)
public DTP.Packet(int lLen, byte[] bytes, Timeval tv)
public DTP.Packet(int lLen, ByteBuffer bb, Timeval tv)
lLen
- Packet lengthbb
- Packet bytes in a ByteBuffertv
- TimeValueMethod Detail |
---|
public int getDTPVersion()
public void setDTPVersion(int version)
version
- DTP protocol versionpublic byte[] getData()
EthernetPacket
EthernetPacket.getData()
returns the entire Ethernet payload excluding the Ethernet header
IP.Packet.getData()
only returns the IP payload, i.e. excluding the IP header which is in the Ethernet payload
TCPPacket.getData()
only returns the TCP payload, i.e. excluding the TCP header which is in the IP payload
getData
in class EthernetPacket
public byte[] getDTPData()
public void setDTPData(byte[] data)
data
- Payload data.public String toColoredString(boolean colored)
EthernetPacket
toColoredString
in class EthernetPacket
colored
- whether or not the string should contain ansi
color escape sequences.
|
Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |