jpcap
Class Packet

java.lang.Object
  |
  +--jpcap.Packet
Direct Known Subclasses:
ARPPacket, IPPacket

public class Packet
extends java.lang.Object

This is a root class of the all the packets captured by Jpcap.


Field Summary
 int caplen
          Captured length
 byte[] data
          Packet data (excluding the header)
 DatalinkPacket datalink
          Datalink layer header
 byte[] header
          Header data
 int len
          Length of this packet
 long sec
          Captured timestamp (sec)
 long usec
          Captured timestamp (micro sec)
 
Constructor Summary
Packet()
           
 
Method Summary
 java.lang.String toString()
          Returns a string representation of this packet
Format: sec:usec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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)

Constructor Detail

Packet

public Packet()
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this packet
Format: sec:usec

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this packet