ABOUT THIS DISSECTOR
wireshark-veilid-plugin.lua is a Wireshark Lua dissector for the Veilid peer-to-peer network protocol, maintained by the Veilid Foundation (veilid.org). Written against veilid-core 0.5.2, the dissector began as hand-decoding of live traffic before a protocol specification existed and was then checked against the veilid-core source with AI assistance, reviewed by the maintainer (AI transparency). That check compares the dissector to the source and 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. The headers and framing the plugin parses are byte-identical through 0.5.7. Veilid 0.5.8 keeps every header unchanged and sizes UDP datagrams by the . The dissector is part of the QX9 Network Analysis Toolkit, an open-source project by QX9. QX9 researches encrypted infrastructure for critical communications and publishes protocol documentation and wire-format analysis tools under open licenses. QX9's intended applications are next-generation 911 (NENA i3) and radio dispatch (P25) interoperability; both are unpublished.
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.
DISSECTOR.md is the dissector manual, covering display filters, expert info, coloring rules, installation, troubleshooting, and the roadmap. The wire reference lists the message types, transports, and constants with their veilid-core source locations, and the release history records each veilid-core release since 0.5.2.
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 , unknown crypto kinds, ENV1 , fragment version errors, oversize envelopes, timestamp skew (over 300 s from capture time), oversize , 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 does not pass an 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 (FOURCC at byte 0, or a bootstrap response). A 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. The flowchart's zero-length branch never runs, because Wireshark does not pass an empty UDP payload to a dissector.
Incoming Packet
│
├─ TCP (port_type == 2)
│ │
│ ├─ VL frame detected? ──→ dissect_tcp_pdus()
│ │ │
│ │ ├─ get_len: read VL payload length
│ │ └─ dissect: VL frame → FOURCC dispatch
│ │
│ └─ No VL frame ──→ FOURCC dispatch directly (segment not starting with VL)
│
├─ UDP (port_type != 2)
│ │
│ ├─ Zero-length? ──→ Hole Punch (never reached)
│ │
│ ├─ Over 8 bytes, first byte ≥ 1?
│ │ │
│ │ ├─ Version ≠ 1 ──→ Unknown-version warning
│ │ ├─ Actual fragment ──→ Show fragment fields
│ │ └─ Unfragmented ──→ Strip 8-byte header → FOURCC dispatch
│ │
│ └─ FOURCC dispatch directly
│
└─ FOURCC Dispatch Table
│
├─ JSON reply to a captured BOOT/B01T ──→ dissect_bootstrap_response()
├─ "BOOT" ──→ dissect_bootstrap("BOOT")
├─ "B01T" ──→ dissect_bootstrap("B01T")
├─ "RCP0" ──→ dissect_rcp0()
├─ "ENV0" ──→ dissect_env0()
├─ "ENV1" ──→ dissect_env1()
└─ Unknown ──→ Expert Info warning
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 as of 0.5.8, so those two layouts are anticipated. The bootstrap figure also draws the response, which the dissector matches to the request earlier on the same flow. Bootstrap, a discovery exchange carried over the transports, comes first; then the transports (TCP, UDP, WebSocket, and the anticipated QUIC); then the message types (RCP0, ENV0, and the anticipated ENV1).