style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

3.1.4 - Working with packet's capture header

Pcap packets, the ones that were retrieved using libpcap library, also maintain a reference to a separate PcapHeader class. The baseclass JPacket abstracts that information away using a JCaptureHeader interface, but it is also possible to work directly with the PcapHeader class. It is peered with native C structure defined in libpcap library itself struct pcap_pkthdr. It provides information such as packet captured length, original length and capture timestamp.

Most user's do not need to deal with this detail and is sufficient to work with JCaptureHeader interface.