|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.jpcap.RawPacket
public class RawPacket
A captured packet containing raw data.
Encapsulation for data captured on a network device by PacketCapture's raw capture interface.
Constructor Summary | |
---|---|
RawPacket(Timeval timeval,
byte[] bytes,
int droplen)
Create a new raw packet. |
Method Summary | |
---|---|
byte[] |
getData()
Fetch the raw packet data. |
int |
getDroplen()
Fetch the number of bytes dropped (if any) when the packet was captured. |
Timeval |
getTimeval()
Fetch the timeval containing the time the packet arrived on the device where it was captured. |
java.lang.String |
toString()
Convert this packet to a readable string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RawPacket(Timeval timeval, byte[] bytes, int droplen)
timeval
- the time the packet arrived on the device where it was
captured.bytes
- the raw packet data, including headers.droplen
- the number of bytes dropped (if any) when the packet
was captured.Method Detail |
---|
public Timeval getTimeval()
public byte[] getData()
public int getDroplen()
Bytes are dropped when the snapshot length (a ceiling on the number of bytes per packet to capture) is smaller than the actual number of bytes in the packet on the wire. In other words, when caplen exceeds snaplen, bytes are dropped and droplen will be nonzero. Otherwise, all the packet bytes were captured and droplen is zero.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |