Package jpcap.packet
Class Packet
- java.lang.Object
-
- jpcap.packet.Packet
-
- All Implemented Interfaces:
java.io.Serializable
public class Packet extends java.lang.Object implements java.io.Serializable
This is a root class of the all the packets captured byJpcap
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
caplen
Captured lengthbyte[]
data
Packet data (excluding the header)DatalinkPacket
datalink
Datalink layer headerstatic Packet
EOF
Returned by JpcapCaptor.getPacket() when EOF was reached while reading from an offline file.byte[]
header
Header dataint
len
Length of this packetlong
sec
Captured timestamp (sec)long
usec
Captured timestamp (micro sec)
-
Constructor Summary
Constructors Constructor Description Packet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
Returns a string representation of this packet
Format: sec:usec
-
-
-
Field Detail
-
sec
public long sec
Captured timestamp (sec)
-
usec
public long usec
Captured timestamp (micro sec)
-
caplen
public int caplen
Captured length
-
len
public int len
Length of this packet
-
datalink
public DatalinkPacket datalink
Datalink layer header
-
header
public byte[] header
Header data
-
data
public byte[] data
Packet data (excluding the header)
-
EOF
public static final Packet EOF
Returned by JpcapCaptor.getPacket() when EOF was reached while reading from an offline file.
-
-