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.

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).

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]
Transport MTU: The largest datagram veilid-core sends to one destination in one piece: 1,200 bytes until a probe settles the address family in use, then up to what the interface allows, within 576 to 1,500 bytes. MTU is the maximum transmission unit, the largest packet a network link carries in one piece.
FOURCC: A four‑character code that names a type. In Veilid, a FOURCC at the start of a message names the message type: ENV0 marks an envelope, RCP0 a receipt, and BOOT or B01T a bootstrap request. The crypto kind in an envelope or receipt header, such as VLD0, is also a FOURCC.
Envelope: Veilid’s container for a message between two nodes: a header with a nonce and the sender and recipient node IDs, an encrypted body, and a signature.
Receipt: A short Veilid message, signed but not encrypted. To test whether a node’s address can be reached, the node signs a receipt and asks a peer to send the receipt to that address by itself, outside an envelope.
WebSocket: A protocol (RFC 6455) that opens with an HTTP handshake and then holds a two‑way connection open over TCP. Browsers use WebSocket, and so do Veilid nodes running in a browser.
QUIC: A transport protocol (RFC 9000) that runs over UDP and carries encrypted, multiplexed streams.