net.sourceforge.jpcap.net
Class Packet

java.lang.Object
  |
  +--net.sourceforge.jpcap.net.Packet
Direct Known Subclasses:
EthernetPacket

public class Packet
extends java.lang.Object

A network packet.

This class currently contains no implementation because only ethernet is supported. In other words, all instances of packets returned by packet factory will always be at least as specific as EthernetPacket.

On large ethernet networks, I sometimes see packets which don't have link-level ethernet headers. If and when I figure out what these are, maybe this class will be the root node of a packet hierarchy derived from something other than ethernet.


Constructor Summary
Packet()
           
 
Method Summary
 byte[] getData()
          Fetch data portion of the packet.
 byte[] getHeader()
          Fetch data portion of the packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Packet

public Packet()
Method Detail

getHeader

public byte[] getHeader()
Fetch data portion of the packet.

getData

public byte[] getData()
Fetch data portion of the packet.