API Reference

Core Interfaces

Configuration (Spec)

Interface
Description

ProtocolStack

User-facing configuration container for protocols and packet policy

Protocol

Base class for protocol configuration, extends Settings

PacketPolicy

Controls packet acquisition, binding, and lifecycle

PacketPoolSettings

Configuration for packet pool capacity and sizing

PoolPolicy

Resource protection policy for pool-managed objects

Resolved (ResolvedSpec)

Interface
Description

ProtocolTree

Validated, immutable protocol structure template

ProtocolNode

Node in the protocol tree with routing rules

ResolvedPacketPolicy

Validated packet policy with backend constraints applied

Runtime (RuntimeSpec)

Interface
Description

ProcessorTree

Executable processor tree, one per stream

Processor

Protocol processing unit with state management

Router

Routes packets to downstream processors

Analyzer

Optional analysis attachment for token emission

RuntimePacketPolicy

Operational packet policy with acquire/release

Context

Interface
Description

ProcessorContext

Per-packet processing state with payload view

LayerContext

Per-layer extracted fields (IpContext, TcpContext)

BackendContext

Backend capabilities and constraints

StreamContext

Stream-specific context for building runtime

Output

Interface
Description

Packet

Processed packet with attached tokens

Token

Analysis result with 16-byte header + extensions

ProtocolObject

Protocol-specific output (IpDatagram, TcpSegment)

ProtocolStack

Primary configuration container for protocol processing.

Usage

PacketPolicy

Controls packet acquisition, memory management, and lifecycle.

RuntimePacketPolicy

Policy Types

Factory Method
Memory Strategy
Use Case

zeroCopy()

Bind to native memory

High-speed capture, short-lived packets

memoryCopy()

Copy to pool buffers

Packet persistence, cross-thread passing

factoryCopy()

Custom allocator

Arena-based allocation, special requirements

Protocol

Base class for protocol-specific configuration. Extends Settings for layered resolution.

Built-in Protocol Classes

Class
Layer
Key Settings

IpProtocol

L3

enableReassembly(), fragmentTimeout(), tableSize()

TcpProtocol

L4

enableReassembly(), maxOutOfOrder(), windowSize()

UdpProtocol

L4

Basic configuration

TlsProtocol

L5

enableDecryption(), keyLogFile()

HttpProtocol

L5

maxHeaderSize(), enableDecompression()

VlanProtocol

L2

decap() for VLAN stripping

GreProtocol

L3

decap() for tunnel termination

Settings Resolution Order

  1. Explicit value (fluent setter)

  2. System property (-Dprotocol.ip.reassembly.enabled=true)

  3. Environment variable (PROTOCOL_IP_REASSEMBLY_ENABLED=true)

  4. Loaded configuration file

  5. Pack defaults (from protocol module JAR)

  6. Coded default

Processor

Protocol processing unit within the processor tree.

Token

Analysis result container with compact binary format.

Token Header (16 bytes)

Offset
Size
Field

0

8

timestamp_ns

8

4

token_id (packed bits)

12

3

total_length

15

1

hdr_len (8-byte words)

Token ID Bit Layout

Common Token Types

Pack
Tokens

PACK_CORE

Flow boundary, reassembly status

PACK_TCP

TCP state changes, retransmissions

PACK_TLS

Handshake events, cipher info

PACK_IDS

IDS/IPS alerts

PACK_INDEX

Sparse/dense index beacons

Analyzer

Optional analysis attachment for processors.

Router

Routes packets to downstream processors.

Routing Lookup Order

  1. Flow cache (runtime detection results)

  2. Tunnel/VLAN context override

  3. Domain context override

  4. Global defaults (protocol field / port)

  5. Heuristics (payload inspection)

  6. Catch-all or null

Layer Markers

Interfaces for protocol layer classification.

Usage

SPI Services

PacketPolicyService

ProtocolStackService

ProtocolProvider

Javadoc

Full API documentation is available at:

Last updated