ABOUT THIS DISSECTOR

wireshark-veilid-plugin.lua is a Wireshark Lua dissector for the Veilid peer-to-peer network protocol. Written against veilid-core 0.5.2, it began as hand-decoding of live traffic before protocol documentation existed and was then checked against the veilid-core source with Claude Opus 4.6. That check compares the dissector to the source; it is not a conformance test. The dissector was revalidated on the release of 0.5.3 with no logic change and has since been checked against the source of each later release, with wire formats byte-identical through 0.5.7. It was developed as part of the QX9 Network Analysis Toolkit - an open-source project by QX9, which develops encrypted infrastructure for critical communications and publishes protocol documentation and wire-format analysis tools under open licenses, this dissector among them. QX9's current focus is next-generation 911, with radio dispatch interoperability reserved for future work.

This software is not certified for use in life-safety, emergency-dispatch, or mission-critical communications systems. Do not rely on it for emergency response.

This page covers the plugin's structure, the dissector pipeline, and the wire format diagrams, with installation in brief. DISSECTOR.md is the full reference, covering display filters, expert info, coloring rules, installation, troubleshooting, the wire protocol summary, the Veilid source code map, and the roadmap.

INSTALLATION

Copy wireshark-veilid-plugin.lua to your personal Wireshark plugins directory, then restart Wireshark or press Ctrl+Shift+L to reload Lua plugins. The installation section of DISSECTOR.md lists the directory for each platform and how to confirm the plugin loaded.

PLUGIN STRUCTURE

The dissector is a single Lua file organized into the sections below.

SETUP

Setup & Constants

SPDX license, file metadata, development history, wire constants validated against veilid-core (ENV1's are assumed from ENV0), protocol registration, and configurable port preference (default 5150).

DEFINITIONS

Expert Info

Diagnostic entries for malformed packets, unknown FOURCCs, unknown crypto kinds, ENV1 envelopes, fragment version errors, oversize envelopes, timestamp skew (over 300 s from capture time), oversize receipts, a note on each unsigned BOOT (v0) request, and a note on bytes that follow a bootstrap request magic.

Protocol Fields

Filterable display fields organized by group: common, ENV0/ENV1 envelope, RCP0 receipt, bootstrap, TCP framing, UDP fragment, and hole punch (never set).

Utility Functions

Timestamp conversion, FOURCC reading, TCP frame detection, and crypto kind description helpers.

DISSECTION

Message Dissectors

One function per wire message type: dissect_env0(), dissect_env1(), dissect_rcp0(), dissect_bootstrap() and dissect_bootstrap_response(), dissect_udp_fragment(), and dissect_hole_punch(), which never runs because Wireshark passes no empty UDP payload to a dissector.

TCP Reassembly

VL frame header parsing and dissect_tcp_pdus() integration for multi-segment TCP payloads.

Entry Point & Dispatch

Routes packets through TCP (VL framing or direct) or UDP (fragment or direct FOURCC) paths, dispatches by FOURCC to message handlers, and registers on the configured port for both TCP and UDP.

DETECTION

Heuristic Dissectors

Transport-level detection for TCP (VL magic), UDP (a Veilid fragment header as veilid-core builds it, so most other UDP traffic still reaches Wireshark's own heuristics), and WebSocket (FOURCC at byte 0, or a bootstrap response). A QUIC heuristic is written but never registered, so it does not run.

Post-Dissector

Acts on TCP packets to or from the configured port: labels control packets (SYN/FIN/RST/ACK), replaces 'atmp', the IANA service name for port 5150, with 'veilid' in the Info column when transport name resolution is on, and tags the data segments no dissector labeled, such as intermediate reassembly segments and TCP retransmissions.

DISSECTOR PIPELINE

The dissector routes each packet it receives through transport detection, optional reassembly, and FOURCC-based dispatch. The flowchart below traces a packet from arrival to its message handler. Its zero-length branch never runs, because Wireshark passes no empty UDP payload to a dissector.

WIRE FORMAT DIAGRAMS

The diagrams below show Veilid's byte layouts, each drawn from constants and offsets validated against the veilid-core source. ENV1 and QUIC are the two exceptions: they sketch a later envelope version and a QUIC transport that veilid-core does not define today, so those layouts are anticipated rather than validated. The bootstrap figure also draws the response, which the dissector matches to the request before it. Diagrams are presented in protocol order: the transports (TCP, UDP, WebSocket, and the anticipated QUIC), then the message types (RCP0, ENV0, and the anticipated ENV1). Bootstrap leads the sequence, though it is a discovery exchange carried over the transports rather than a transport of its own.

BOOT

BOOT / B01T Bootstrap Discovery wire format diagram
Figure 1 - BOOT / B01T Bootstrap Discovery

TCP

TCP Transport (VL Framing) wire format diagram
Figure 2 - TCP Transport (VL Framing)

UDP

UDP Transport (Fragments + Hole Punch) wire format diagram
Figure 3 - UDP Transport (Fragments + Hole Punch)

WS / WSS

WebSocket Transport wire format diagram
Figure 4 - WebSocket Transport

QUIC

QUIC Transport wire format diagram (anticipated)
Figure 5 - QUIC Transport [Anticipated]

RCP0

RCP0 Out-of-Band Receipt wire format diagram
Figure 6 - RCP0 Out-of-Band Receipt

ENV0

ENV0 Encrypted Envelope wire format diagram
Figure 7 - ENV0 Encrypted Envelope

ENV1

ENV1 Encrypted Envelope wire format diagram (anticipated)
Figure 8 - ENV1 Encrypted Envelope [Anticipated]