Skip to main content

Module packet

Module packet 

Source
Expand description

Zero-copy packet representation and manipulation.

This module implements the core Packet struct using a “Lazy Zero-Copy View” architecture. Packets are represented as:

  1. A contiguous buffer of raw bytes (Bytes)
  2. A lightweight index of layer boundaries (SmallVec<LayerIndex>)

Field access is lazy - values are read directly from the buffer only when requested, avoiding the allocation overhead of eager parsing.

Structs§

Packet
A network packet with zero-copy buffer storage.