Pcap
  • Introduction
  • Getting Started
    • Dependency management
    • Installing Libpcap or Npcap
    • Run as non root user
    • Logging
    • Obtaining the device list
    • Opening an adapter and capturing the packets
    • Capturing the packets without the callback
    • Capture statistics
    • Filtering the traffic
    • Write the packets to a capture file
    • Read packets from a capture file.
    • Sending packets
    • I/O Multiplexing
    • Restricted Method
  • Developer Guide
    • Branches to look
    • Build from Source
    • Notes
  • Packet Structure
    • Packet Header
    • Packet Buffer
  • Packet Codec
    • Using packet codec
    • Adding protocol support
  • Others
  • Thanks to
  • Fork me on Github
Powered by GitBook
On this page

Was this helpful?

  1. Packet Structure

Packet Header

Generic per-packet information.

This packet header structure contains:

Field Name

Description

Timestamp

Specify a time interval (elapsed time)

Capture Length

Length of portion present (must be less then or equal to Length)

Length

Length of current received packet (off wire)

This header are not freed by the caller, and not guaranteed to be valid after the next call to Pcap.next(PacketHeader), Pcap.nextEx(PacketHeader, PacketBuffer), Pcap.loop(int cnt, PacketHandler, <T>), and Pcap.dispatch(int cnt, PacketHandler, <T>).

PreviousPacket StructureNextPacket Buffer

Last updated 4 years ago

Was this helpful?