Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

wpg (web-packet-generator) is a Rust packet generator for network verification, driven from a web GUI. It lets you assemble arbitrary packets, including deep OSI-family protocols such as IS-IS and CLNP, and transmit them at high speed. Transmission backends range from pcap/Npcap up to AF_PACKET, AF_XDP and DPDK. It ships as a single binary for Windows, macOS and Linux. Use is limited to lab and verification environments.

Where to start

  1. Choose how to install: build from source on your OS, deploy to a Linux lab host over SSH, or run the Docker image.
  2. Follow the install page for your choice, then Permissions if wpg doctor reports that sending is not allowed.
  3. First login: set the password and walk through the screens.
  4. Work through the tutorials, starting with the ARP sweep.

You can try everything except sending without any privileges: rendering a template to a pcapng file needs no raw socket.

Concepts

TermMeaning
TemplateA .wpg.yaml file describing a packet as a stack of layers (ethernet2, ipv4, udp, …), their field values, variables and generators. Templates are what you save, share and send. See the template schema.
LibraryThe template directories wpg loads, ./templates by default. The bundled library has examples, protocols, scenarios, malformed and interop.
Field generatorA field value that changes from frame to frame: a range, a list, random values, a counter, values from a file or an expression. One template can expand to many frames (streams).
BuilderThe GUI screen that edits a template layer by layer and previews the hex dump and field tree in the browser.
JobOne run of templates on an interface with a rate (pps, bps or % of line rate), a count or a duration. Jobs show live statistics.
BackendHow frames leave the machine: afpacket, afxdp or dpdk on Linux, pcap (libpcap / Npcap / BPF) everywhere, pcapfile to write a pcapng instead of sending (dry run), and null for benchmarks.
wpg doctorThe self-diagnosis that checks privileges, interfaces, kernel features and libraries, and prints the fix for each failed check.

The same binary is both the server (wpg serve, the web UI and REST API) and a command-line tool (wpg send, wpg render, wpg template lint, …); see the CLI reference.

How this manual is organised

  • Getting Started: installation, permissions and the first login.
  • Tutorials: end-to-end tasks such as an ARP sweep, rate control, pcap replay and an IS-IS adjacency.
  • Reference: generated pages for every protocol, the template schema, the API, the CLI and wpg.toml.
  • Operations: deployment, services, Docker, upgrades, fast backends, TLS, receive and verification.
  • Developer Guide: the crate layout and how to add protocols and translations.

Only send on networks you own or are authorised to test; see the legal notice.

Choose how to install

wpg is a single wpg executable with the web UI embedded. Release binaries are not published yet, so every way below builds it from source; they differ in where it is built and how it runs.

What you need

  • A machine to run wpg on: Linux (Ubuntu 20.04 or later and comparable), macOS 12 or later, or Windows 10 21H2 or later.
  • A network interface connected to the lab network you want to test. Sending on a network you do not own or are not authorised to test is not allowed.
  • A browser on the same machine, or on another one if you set a password and bind to a non-local address.

Pick a way

You want toUseNeeds
Run wpg on a Linux lab host (CML2, EVE-NG, a VM), at high rates, as a serviceDeploying with scripts/deploy.sh: a wizard that builds wpg on the host over SSH and installs a systemd unit. Start it from Windows (scripts\deploy.bat), Linux or macOS.SSH access with sudo to the host
Run wpg on a Linux host without installing a Rust toolchainRun with DockerDocker on a Linux host
Use wpg on your own PC, or develop itBuild from source: Linux, macOS, Windowsrustup (scripts/setup.sh or setup.ps1 installs the rest); Npcap on Windows

Notes for the choice:

  • Rates. Windows sends through Npcap only and is meant for the GUI at low to medium rates. macOS sends through BPF. For high rates (AF_PACKET, AF_XDP, DPDK) use Linux.
  • Docker Desktop on macOS and Windows runs containers in a VM, so frames never reach your physical NIC. Use Docker on Linux hosts only.
  • No privileges yet? Every path can render templates to pcapng files and run the web UI without raw-socket rights; only sending needs Permissions.

After installing

Whichever way you chose, the next steps are the same:

  1. Run wpg doctor and fix what it reports for sending (Permissions).
  2. Start the server with wpg serve (the deploy script and Docker start it for you) and open http://127.0.0.1:8080.
  3. Set the password and look around: First login.
  4. Try a dry run (the pcapfile backend writes a pcapng file instead of sending), then send for real in the ARP sweep tutorial.

If something does not work, see FAQ and troubleshooting.

Install on Linux

Supported: Ubuntu 20.04 or later (glibc 2.31) and comparable distributions. Release binaries are not published yet, so you build from source; the result is a single wpg executable with the web UI embedded.

1. Install the prerequisites

# Rust toolchain installer (rustup.rs) and a C toolchain for linking
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install build-essential pkg-config git

git clone https://github.com/SeiyaFunaokaJP/web-packet-generator.git
cd web-packet-generator
./scripts/setup.sh          # add --just to also install the just task runner

scripts/setup.sh installs the Rust toolchain pinned in rust-toolchain.toml with the WASM target used by the web UI, and a prebuilt trunk (the web UI bundler) at the version pinned in scripts/versions.env. It ends by printing the next command.

Linux sends through AF_PACKET, which needs no extra library. Only the optional libpcap backend (--features pcap) needs sudo apt install libpcap-dev. tshark (package tshark) is optional; the tutorials use it to inspect generated captures.

2. Build

./scripts/build.sh --release        # or: just release

The script builds the web UI with trunk, then the wpg binary with cargo, and prints ==> done: target/release/wpg. Add --features pcap, --features afxdp or --dpdk for optional backends. Without trunk the script still builds the binary but skips the web UI.

3. Try it without any privileges

Rendering to a file needs no special rights, so you can check the installation first:

./target/release/wpg doctor
./target/release/wpg template lint templates/examples/*.wpg.yaml
./target/release/wpg render templates/examples/arp-sweep.wpg.yaml -o /tmp/arp.pcapng

wpg doctor reports what is missing for sending (see Permissions); a failing caps.raw_socket check is expected until the next step.

4. Allow raw sending

Either run as root or grant capabilities to the binary once (it is lost when the file is replaced):

sudo setcap cap_net_raw,cap_net_admin+ep ./target/release/wpg
./target/release/wpg doctor

5. Start the server

./target/release/wpg serve            # or: just run for development with hot reload

By default wpg listens on 127.0.0.1:8080 and loads the templates under ./templates. Open http://127.0.0.1:8080 in a browser; the next page, First login, covers the password and the first screens. To reach it from another machine, set a password and use --bind 0.0.0.0:8080 (or bind in wpg.toml, written by wpg config init); see Configuration. For a permanent installation on a lab host, scripts/deploy.sh copies the binary, applies setcap and installs a systemd unit; see CML2 notes.

Send your first frames

./target/release/wpg ifaces
./target/release/wpg send templates/examples/arp-sweep.wpg.yaml -i eth1 --rate 1000pps

Only send on networks you own or are authorised to test. Continue with the ARP sweep tutorial.

Install on macOS

Supported: macOS 12 or later. Release binaries are not published yet, so you build from source; the result is a single wpg executable with the web UI embedded. macOS ships libpcap, so no extra library is needed: scripts/build.sh (and just release) build the libpcap backend (pcap feature) automatically on macOS, because it is the only way wpg can send there (--no-pcap leaves it out). Release archives include it too.

1. Install the prerequisites

xcode-select --install                     # compiler and linker
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
brew install wireshark                     # optional: tshark, and ChmodBPF (see below)

git clone https://github.com/SeiyaFunaokaJP/web-packet-generator.git
cd web-packet-generator
./scripts/setup.sh                         # add --just to also install the just task runner

scripts/setup.sh installs the Rust toolchain pinned in rust-toolchain.toml with the WASM target, and a prebuilt trunk at the version pinned in scripts/versions.env.

2. Build

./scripts/build.sh --release        # or: just release

The last line printed is ==> done: target/release/wpg.

3. Try it without any privileges

./target/release/wpg doctor
./target/release/wpg template lint templates/examples/*.wpg.yaml
./target/release/wpg render templates/examples/arp-sweep.wpg.yaml -o /tmp/arp.pcapng

4. Allow sending

Sending goes through /dev/bpf*. Either run wpg with sudo, or make the devices accessible: installing Wireshark with its ChmodBPF helper does this for members of the access_bpf group. wpg doctor prints the exact hint for your machine; see Permissions.

5. Start the server

./target/release/wpg serve

wpg listens on 127.0.0.1:8080 by default and loads the templates under ./templates. Open http://127.0.0.1:8080 in a browser and continue with First login.

Send your first frames

./target/release/wpg ifaces
sudo ./target/release/wpg send templates/examples/arp-sweep.wpg.yaml -i en0 --rate 1000pps

Only send on networks you own or are authorised to test. Continue with the ARP sweep tutorial.

Release binaries: Gatekeeper and quarantine

Release archives (wpg-<version>-aarch64-apple-darwin.tar.gz for Apple silicon, ...-x86_64-apple-darwin.tar.gz for Intel) are not signed or notarised. A file downloaded with a browser gets the com.apple.quarantine attribute, and Gatekeeper then refuses to run it (““wpg” cannot be opened because Apple cannot check it for malicious software” or “… is damaged”). Building from source as above avoids this completely.

Check the download first, then remove the attribute from the extracted files:

shasum -a 256 -c wpg-0.2.0-aarch64-apple-darwin.tar.gz.sha256   # or compare with SHA256SUMS
tar -xzf wpg-0.2.0-aarch64-apple-darwin.tar.gz
xattr -dr com.apple.quarantine wpg-0.2.0-aarch64-apple-darwin
./wpg-0.2.0-aarch64-apple-darwin/wpg --version

Alternatives:

  • Download with curl -LO instead of a browser: curl does not set the quarantine attribute.
  • Try to run it once, then allow it in System Settings → Privacy & Security (“Open Anyway”); macOS asks again on the next start and then remembers it.
  • The Finder shortcut (Control-click → Open) was removed in macOS 15 and never applied to command-line tools; use xattr or System Settings.

Do not disable Gatekeeper globally (spctl --master-disable). Remove the attribute again after every upgrade, since each new download is quarantined. For running wpg at boot, see Running as a service.

Install on Windows

Supported: Windows 10 21H2 or later. Release binaries are not published yet, so you build from source. Transmission uses Npcap only and is intended for GUI use at low to medium rates; use Linux for high rates. Commands below are for PowerShell.

Installing wpg on a Linux lab host from Windows? You do not need to build anything on Windows. Get the repository (git clone, or “Download ZIP” on GitHub and unpack it), then double-click scripts\deploy.bat. A wizard asks for the host, the SSH user and password, the sudo password, the admin password of the web UI and the interfaces to send on, builds wpg on the host and installs it as a service. Only the OpenSSH client that ships with Windows 10 / 11 is needed. See Deploying.

1. Install the prerequisites

  1. Install rustup (choose the default MSVC toolchain; it asks for the Visual Studio Build Tools “Desktop development with C++” workload if it is missing).

  2. Install Npcap (the default options are fine; the WinPcap API-compatible mode is not needed). Sending needs it.

  3. Get the repository and run the setup script:

    git clone https://github.com/SeiyaFunaokaJP/web-packet-generator.git
    cd web-packet-generator
    .\scripts\setup.ps1              # add -Just to also install the just task runner
    

    It installs the Rust toolchain pinned in rust-toolchain.toml with the WASM target, a prebuilt trunk and the Npcap SDK (unpacked to C:\Npcap-SDK) at the versions pinned in scripts\versions.env, and lists anything still missing (the C++ build tools, Npcap). If PowerShell refuses to run scripts, start it with powershell -ExecutionPolicy Bypass -File .\scripts\setup.ps1.

    The SDK is needed to link the Npcap backend (pcap feature), the only way wpg can send on Windows. scripts\build.ps1 also finds an SDK you unpacked yourself in C:\npcap-sdk-<version> (the name of the zip; the newest version wins), in the directory named by the environment variable NPCAP_SDK, or through LIBPCAP_LIBDIR set to its Lib\x64 directory. Without the SDK the build still succeeds, but the resulting wpg.exe cannot send and build.ps1 warns about it.

  4. Optional: Wireshark (for tshark).

2. Build

.\scripts\build.ps1 -Release       # or: just release

It prints ==> Npcap SDK: LIBPCAP_LIBDIR=... when it found the SDK and ends with ==> done: target\release\wpg.exe. The variants:

CommandResult
.\scripts\build.ps1Debug build (target\debug\wpg.exe); adds the Npcap backend when the SDK is found
.\scripts\build.ps1 -ReleaseOptimised build (target\release\wpg.exe), same SDK detection
.\scripts\build.ps1 -NoPcapBuild without the Npcap backend even when the SDK is present (cannot send)
.\scripts\build.ps1 -Features pcapRequire the Npcap backend: stops with an error when the SDK is not found
Get-Help .\scripts\build.ps1 -DetailedEvery parameter

Without trunk the frontend is skipped with a warning (the web UI then serves a stale or missing crates\wpg-web\dist).

3. Try it without any privileges

.\target\release\wpg.exe doctor
.\target\release\wpg.exe render templates\examples\arp-sweep.wpg.yaml -o $env:TEMP\arp.pcapng

4. Allow sending

Check that wpg doctor reports Npcap as installed (npcap) and the Npcap backend as built in (backend.pcap). If backend.pcap fails, build.ps1 did not find the Npcap SDK: run .\scripts\setup.ps1 (step 1) and build again. With Npcap’s default install an ordinary PowerShell can send (caps.raw_socket is ok); if Npcap was installed with “Restrict Npcap driver’s access to Administrators only”, caps.raw_socket fails and you must open PowerShell as Administrator for sending. See Permissions.

5. Start the server

.\scripts\run.ps1                  # or: .\target\release\wpg.exe serve

wpg listens on 127.0.0.1:8080 by default and loads the templates under .\templates. Open http://127.0.0.1:8080 in a browser and continue with First login. Windows Firewall may ask whether to allow wpg.exe; allow private networks only if you bind to a non-local address.

Send your first frames

.\target\release\wpg.exe ifaces
.\target\release\wpg.exe send templates\examples\arp-sweep.wpg.yaml -i <interface> --rate 1000pps

Use the interface name printed by wpg ifaces (the bare {GUID}; \Device\NPF_{GUID} as printed by tshark -D works too). The Npcap loopback adapter (\Device\NPF_Loopback) does not accept Ethernet frames (PacketSendPacket failed ... (50)); to try sending without touching a real network, use a host-only virtual adapter such as Hyper-V’s vEthernet (Default Switch) or a VMware host-only adapter, and watch it with wpg capture -i <interface> --backend pcap --include-outgoing or tshark. Only send on networks you own or are authorised to test. Continue with the ARP sweep tutorial.

Release archive and Npcap check

Release archives (wpg-<version>-x86_64-pc-windows-msvc.zip) contain wpg.exe with the web UI and the Npcap backend, the sample templates and packaging\windows\wpg-service.ps1. They are not code-signed:

# Verify, then clear the "downloaded from the Internet" mark before extracting
(Get-FileHash .\wpg-0.2.0-x86_64-pc-windows-msvc.zip -Algorithm SHA256).Hash   # compare with SHA256SUMS
Unblock-File .\wpg-0.2.0-x86_64-pc-windows-msvc.zip
Expand-Archive .\wpg-0.2.0-x86_64-pc-windows-msvc.zip -DestinationPath "C:\Program Files\wpg"

If SmartScreen still shows “Windows protected your PC”, choose More info → Run anyway once.

Npcap is not bundled (its licence does not allow redistribution with the free edition). wpg.exe loads wpcap.dll only when the pcap backend is first used (it is linked with /DELAYLOAD) and adds System32\Npcap to the DLL search path itself, so it starts without Npcap and works with either Npcap install mode. Both wpg doctor and scripts\build.ps1 check for it:

  • wpg doctor fails the npcap check when Npcap is missing and warns when Npcap looks installed but wpcap.dll is in neither System32\Npcap nor System32. The fix line links to https://npcap.com/#download.
  • Sending without Npcap stops with Npcap is not installed; install it from https://npcap.com/#download and run wpg doctor instead of crashing.
  • wpg doctor also fails backend.pcap when this wpg.exe was built without the Npcap backend, and tells you to unpack the SDK and run scripts\build.ps1 again.
  • When Npcap was installed in administrator-only mode, caps.raw_socket fails in an unelevated terminal; the fix is an Administrator terminal or reinstalling Npcap without that option.
  • scripts\build.ps1 prints a warning before building, since a build without Npcap succeeds but cannot send, and another one when it builds without the Npcap SDK.

To run wpg in the background at boot, see Running as a service.

Run with Docker

The image builds wpg and its web UI inside the container, so the host needs Docker and nothing else: no Rust toolchain, no trunk. Use a Linux host: Docker Desktop on macOS and Windows runs containers in a VM, and frames sent there never reach your physical NIC.

This page is the short path. Build options, proxies, every setting and the limits are in Docker.

1. Get the repository and start

git clone https://github.com/SeiyaFunaokaJP/web-packet-generator.git
cd web-packet-generator
WPG_PASSWORD='change me' WPG_ALLOWED_IFACES='["eth1"]' docker compose up -d --build
  • WPG_PASSWORD is required: the server listens on every address of the host, so it refuses to start without a password. Pick your own; it is the administrator password of the web UI.
  • WPG_ALLOWED_IFACES lists the interfaces jobs may send on. Use the name of your lab interface (ip -br link lists them); leave it out to allow all.
  • The first build compiles everything and takes a while. Later starts reuse the image.

The container uses the host network and gets only CAP_NET_RAW and CAP_NET_ADMIN, so it can send on the host’s interfaces without running wpg as root on the host.

2. Check it

docker compose ps                         # STATUS shows "healthy" once the server answers
docker compose exec wpg wpg doctor        # raw sockets and interfaces, as the container sees them

Open http://127.0.0.1:8080 on the host (or http://<host>:8080 from another machine) and log in with the password. First login walks through the screens.

3. Try a template

The bundled templates are in /usr/share/wpg/templates inside the container and appear in the Templates screen. From the command line, render one to a file first (nothing is sent), then send it:

docker compose exec wpg wpg render /usr/share/wpg/templates/examples/arp-sweep.wpg.yaml -o /var/lib/wpg/arp.pcapng
docker compose exec wpg wpg send /usr/share/wpg/templates/examples/arp-sweep.wpg.yaml -i eth1 --rate 1000pps

/var/lib/wpg is the wpg-data volume: the database, your own templates and files such as the pcapng above survive restarts and image upgrades. Only send on networks you own or are authorised to test. Continue with the ARP sweep tutorial, using docker compose exec wpg wpg ... where the tutorial runs wpg ....

Stop, upgrade, remove

docker compose logs -f wpg                # follow the log
docker compose down                       # stop; the wpg-data volume is kept
git pull && WPG_PASSWORD='change me' docker compose up -d --build   # upgrade
docker compose down -v                    # stop and delete the wpg-data volume

To keep the settings out of your shell history, put them in a .env file next to docker-compose.yml (WPG_PASSWORD=..., WPG_ALLOWED_IFACES=..., WPG_BIND=...). The repository ignores .env in both git and the Docker build context, so the password is neither committed nor copied into the image.

Permissions

Sending raw frames is a privileged operation and the requirement differs per OS. At startup and on demand (wpg doctor) wpg runs a self-diagnosis and shows OS-specific guidance. Administrators can also restrict allowed interfaces and the maximum rate.

Linux

The afpacket backend needs CAP_NET_RAW (and CAP_NET_ADMIN is granted with it). Either run as root or grant the capabilities to the binary:

sudo setcap cap_net_raw,cap_net_admin+eip /path/to/wpg

This is the hint wpg doctor prints, with the real path of the running binary. If a backend is refused with EPERM/EACCES, the error says:

AF_PACKET needs CAP_NET_RAW: run as root or grant it with `sudo setcap cap_net_raw,cap_net_admin+ep $(command -v wpg)`

File capabilities are lost when the binary is replaced and are ignored on nosuid mounts; under systemd use AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN. See CML2 notes.

macOS

Needs read/write access to /dev/bpf*. Run with sudo, or make the devices accessible (for example with Wireshark’s ChmodBPF). The hint printed by wpg doctor is sudo /path/to/wpg … (or make /dev/bpf* accessible, e.g. via Wireshark's ChmodBPF).

Windows

Needs Npcap (either install mode; wpg finds wpcap.dll in System32\Npcap itself) and, only when Npcap was installed in administrator-only mode, an Administrator terminal. wpg doctor reads that setting (the AdminOnly value under HKLM\SYSTEM\CurrentControlSet\Services\npcap\Parameters): unelevated with the default install, caps.raw_socket is ok (npcap_admin_only=no); with administrator-only mode it fails with the hint Run from an elevated (Administrator) terminal, or reinstall Npcap ... without "Restrict Npcap driver's access to Administrators only"; when the setting cannot be read it is a warning. A missing Npcap points to https://npcap.com/#download.

Checking with wpg doctor

wpg doctor prints one line per check with a stable id in brackets; wpg doctor --json gives the same data for scripts. The exit status is non-zero when a check fails.

Check idStatus when unmetMeaning
caps.raw_socketfail (Windows: per Npcap admin-only mode)Raw-socket privilege: CAP_NET_RAW / root / BPF access / elevation
iface.any_upwarnAt least one non-loopback interface is up with carrier
kernel.af_xdpwarnKernel 5.10 or newer for the AF_XDP backend
kernel.tpacket_v3warnKernel 3.2 or newer; otherwise afpacket falls back to sendmmsg
hugepageswarnHugepages configured; only needed for the DPDK backend
npcapfail / warn (Windows only)Npcap installed and wpcap.dll present (System32\Npcap or System32); skipped elsewhere
backend.pcapfail (Windows, macOS)Built with the pcap backend, the only way to send on Windows and macOS; skipped on Linux
pcap_libwarnlibpcap found (needed by the pcap backend); skipped on Windows and when the backend is not built in
webui.embeddedwarnThe web UI is included in this binary

Each check reports ok, warn, fail or skip (not applicable on this OS).

First login

Start the server and open the address it prints:

wpg serve                       # listens on 127.0.0.1:8080

Setting the administrator password

The password can come from any of these (highest priority first; run wpg serve --help to see which ones your build supports):

  1. wpg serve --password … or --password-file <file>
  2. the WPG_PASSWORD environment variable
  3. [auth] password_hash / password_file in wpg.toml (an argon2id hash, written by wpg config set-password)
  4. the setup screen shown on the first visit, if none of the above is set

While no password exists wpg accepts connections from the local machine only and warns at startup; do not bind it to a non-local address until a password is set. Passwords are stored as argon2id hashes, sessions use HttpOnly, SameSite=Strict cookies, and repeated failed logins are rate limited. For access over a network, put TLS in front (--tls, a certificate in wpg.toml, or a reverse proxy).

The first screens

After logging in you land on the dashboard: interface state, running jobs and recent statistics. Then:

  1. Templates: the bundled library (examples, protocols, scenarios, malformed) is listed here, searchable by tag (protocol:ipv4, layer:l3, scenario, malformed). Open one, or duplicate it to make your own.
  2. Builder: stack layers, edit fields (Auto/Manual, generators) and watch the hex dump and field tree update. An empty builder offers common stacks such as “Ethernet II / IPv4 / UDP”, and every field shows an input prefilled with its default (MAC address, IP address, …). Typing makes it a manual value; ↺ goes back to the default.
    • By default the builder only makes packets that follow the protocol definitions. Computed fields such as lengths and checksums stay locked, and out-of-spec values (a length or checksum that does not match, a value outside its constraints, …) are shown as errors under the field and in the toolbar, and block saving and creating a job.
    • For malformed test traffic, turn on Allow malformed packets in the toolbar: computed fields get an “Override” button and out-of-spec values are only warnings. The switch is remembered per browser and turns on by itself when you open a template that is already out of spec (such as the malformed ones).
  3. Jobs: pick templates, an interface, a rate and a count, and start. Write to a file instead of sending makes a dry run (a pcapng file). Burst, workers and the verification signature are under Advanced. A finished job can be started again with Run again, or copied into the form with Edit as new job.
  4. Settings: language (Japanese, English, Simplified Chinese, Traditional Chinese, Korean, German, French, Spanish), theme, template library paths.

The language menu and the theme toggle are in the header of every screen.

If sending is refused, run wpg doctor and read Permissions. Then work through the ARP sweep tutorial.

Tutorial: ARP sweep

Time: about 15 minutes. Privileges: none until Step 5 (everything before it is a dry run).

What you will build

A stream of ARP requests (“who has 10.0.0.x?”) that walks every host address of a /22, and then the same sweep repeated inside several VLANs. ARP sweeps are the classic way to populate an ARP cache, to check that a switch floods broadcasts correctly, and to exercise a router’s ARP glean rate limiting.

You will use three bundled templates:

TemplateFramesWhat it shows
templates/examples/arp-sweep.wpg.yaml254the smallest sweep: one range generator
templates/scenarios/arp-sweep-slash22.wpg.yaml1022a CIDR block as the generator
templates/scenarios/vlan-arp-sweep.wpg.yaml1016two generators (VLAN x address) in nested mode

Before you start

Build wpg once (see Install on Linux, macOS or Windows) and run the commands from the repository root. The examples call the binary wpg; use ./target/release/wpg (or target\release\wpg.exe) if it is not on your PATH. tshark is optional but makes the checks below more convincing.

Only send on networks you own or are authorised to test; see the legal notice.

Step 1. Read the smallest sweep

layers:
  - protocol: ethernet2
    fields:
      dst: ff:ff:ff:ff:ff:ff
      src: ${src_mac}

  - protocol: arp
    fields:
      oper: request
      sha: ${src_mac}
      spa: ${src_ip}
      tha: 00:00:00:00:00:00
    generators:
      tpa: ${first}-${last}   # shorthand for a range generator

Two things do the work. generators.tpa varies the ARP target protocol address across the stream, and ${...} placeholders are template variables (declared in the variables: list with defaults) that you can override at run time with --var name=value. ethertype in the Ethernet layer is not written: it is Auto and becomes 0x0806 because the next layer is ARP.

Print the first frame:

$ wpg template show templates/scenarios/vlan-arp-sweep.wpg.yaml
Hex dump (60 bytes)
0000  ff ff ff ff ff ff 02 00  00 00 00 01 81 00 00 64  ...............d
0010  08 06 00 01 08 00 06 04  00 01 02 00 00 00 00 01  ................
0020  0a 00 00 fa 00 00 00 00  00 00 0a 00 00 01 00 00  ................
0030  00 00 00 00 00 00 00 00  00 00 00 00              ................
...

The last 14 octets are zero padding: an ARP request is 42 octets long and Ethernet needs 60 (the FCS is added by the NIC).

Step 2. Sweep a whole /22

arp-sweep-slash22.wpg.yaml swaps the range for a CIDR block held in a variable:

variables:
  - name: net
    default: 10.0.0.0/22
layers:
  - protocol: arp
    generators:
      tpa: ${net}

A CIDR generator yields the host addresses only, so a /22 gives 1022 frames (10.0.0.1 to 10.0.3.254). Render it to a pcapng file without touching the network:

$ wpg render templates/scenarios/arp-sweep-slash22.wpg.yaml -o /tmp/sweep.pcapng
Wrote 1022 packets to /tmp/sweep.pcapng.

Point the same template at another subnet without editing it:

$ wpg render templates/scenarios/arp-sweep-slash22.wpg.yaml -o /tmp/sweep.pcapng --var net=10.1.0.0/22

Step 3. Repeat the sweep in several VLANs

vlan-arp-sweep.wpg.yaml inserts an 802.1Q tag and adds a second generator:

  - protocol: dot1q
    generators:
      vid: ${vids}          # default 100-103

  - protocol: arp
    generators:
      tpa: ${first}-${last} # default 10.0.0.1-10.0.0.254

stream:
  mode: nested
  order: [dot1q.vid, arp.tpa] # slowest first

With two generators you have to say how they combine. zip advances both in lockstep, product is the Cartesian product, and nested is a product with an explicit order: here the VLAN is the slow loop, so all 254 addresses are asked in VLAN 100, then in VLAN 101, and so on: 4 x 254 = 1016 frames. Restrict it to two VLANs with a list:

$ wpg render templates/scenarios/vlan-arp-sweep.wpg.yaml -o /tmp/vlan-sweep.pcapng --var vids=100,200
Wrote 508 packets to /tmp/vlan-sweep.pcapng.

Step 4. Check the frames

$ tshark -r /tmp/vlan-sweep.pcapng -T fields -e vlan.id -e arp.dst.proto_ipv4 | sed -n '1p;254p;255p;$p'
100	10.0.0.1
100	10.0.0.254
200	10.0.0.1
200	10.0.0.254

Also run wpg template lint on any template you edit: it catches unknown fields, out-of-range values and bad generator syntax before you send.

Step 5. Send it

First rehearse with a backend that writes a file (for pcapfile the -i argument is the output path) or discards the frames (null):

$ wpg send templates/scenarios/arp-sweep-slash22.wpg.yaml --backend null -i lo --rate 100kpps
Sending on lo via null: rate 100000pps, burst 1, 1022 packets, 1 worker(s), plan PreRender (...)
state      finished (stream exhausted)
packets    1022
bytes      61320

Then send for real on your lab interface. Raw sending needs privileges (see Permissions); run wpg ifaces to pick the interface and wpg doctor if the backend is refused:

$ wpg ifaces
$ wpg send templates/scenarios/vlan-arp-sweep.wpg.yaml -i eth1 --rate 2000pps

The command runs the stream once (1016 frames at 2000 frames per second is about half a second) and prints a summary. Add --count 10000 to loop the sweep, or --duration 30s to run for a fixed time.

Step 6. Read the result

  • On the device under test, look at the ARP or neighbour table (ip neigh, show ip arp) and at the MAC table of the switch (the sender MAC 02:00:00:00:00:01 should appear on the port and in the VLANs you used).
  • On a Linux host in the same segment, tcpdump -e -n -i eth1 arp shows the requests with their VLAN tags.
  • The sweep uses a made-up sender address (10.0.0.250). Change src_mac and src_ip with --var so that replies come back to an address you can observe.

Next steps

Tutorial: VLAN-tagged TCP SYN flood

Time: about 20 minutes. Privileges: none until Step 5.

What you will build

A stream of 100,000 TCP SYN segments in an 802.1Q VLAN, each with a random source address, source port and initial sequence number, and the usual SYN options (MSS, SACK-permitted, window scale). It is the standard way to load a firewall, load balancer or connection-tracking table from many “clients” while you watch the device’s SYN handling. wpg is stateless: it never completes a handshake and does not answer SYN-ACKs.

Use it only against equipment in a lab that you own or are authorised to test.

Before you start

Build wpg and run from the repository root (see Install on Linux). The template is templates/scenarios/vlan-syn-flood.wpg.yaml; a smaller relative is templates/examples/vlan-tcp-syn.wpg.yaml.

Step 1. Read the template

layers:
  - protocol: ethernet2
    fields: { dst: ${dst_mac}, src: ${src_mac} }

  - protocol: dot1q                 # TPID 0x8100 goes into ethernet2 automatically
    fields:
      vid: ${vid}

  - protocol: ipv4
    fields:
      dst: ${dst_ip}
      ttl: 64
      flags: df
    generators:
      src: { kind: random, min: 10.0.0.1, max: 10.255.255.254 }

  - protocol: tcp
    fields:
      dst_port: ${dst_port}
      flags: syn
      window: 64240
      options:
        - mss: 1460
        - sack_permitted
        - ws: 7
    generators:
      src_port: { kind: random, min: 1024, max: 65535 }
      seq: { kind: random, min: 0, max: 4294967295 }

stream:
  seed: 7
  count: 100000

tx:
  rate: 50kpps
  burst: 32

Points worth knowing:

  • Nothing else is written. IPv4 ihl, total_length, protocol and header_checksum, TCP data_offset and checksum (with the IPv4 pseudo header), and the dot1q/Ethernet EtherTypes are all Auto and are recomputed for every frame. The TCP options region is padded to a 32-bit boundary automatically.
  • Options are typed. mss: 1460, sack_permitted, ws: 7, nop and timestamps: { tsval: 1000, tsecr: 0 } are the built-in names; anything else can be written as { type: 99, data: "01 02" }.
  • stream.seed makes random reproducible. The same seed produces the same 100,000 frames on every run and on every machine.
  • tx.rate and tx.burst are only defaults; wpg send --rate overrides them.

Step 2. Look at the first frames

$ wpg render templates/scenarios/vlan-syn-flood.wpg.yaml -o /tmp/syn.pcapng --count 3
Wrote 3 packets to /tmp/syn.pcapng.
$ tshark -r /tmp/syn.pcapng -o tcp.check_checksum:TRUE
    1   0.000000 10.114.228.243 → 198.51.100.7 TCP 70 2311 → 443 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM WS=128
    2   0.000001 10.99.228.10 → 198.51.100.7 TCP 70 51321 → 443 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM WS=128
    3   0.000002 10.251.163.120 → 198.51.100.7 TCP 70 10483 → 443 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM WS=128

Wireshark reports no bad checksum. (Seq=0 is the relative sequence number Wireshark displays; the raw values are random.) tshark -V -c 1 shows the 802.1Q header with ID: 100.

Step 3. Change the target without editing the file

All the ${...} placeholders are variables; their defaults are in the variables: list at the top of the file. Override any of them on the command line:

$ wpg render templates/scenarios/vlan-syn-flood.wpg.yaml -o /tmp/syn.pcapng \
      --var vid=200 --var dst_ip=203.0.113.9 --var dst_port=8443 --count 1000

Use --var src_mac=… and --var dst_mac=… to set the MAC addresses; the next hop’s MAC on the sending interface is what the device under test expects as the destination.

Step 4. Understand count, seed and the pre-render plan

The stream has a fixed length (stream.count: 100000). wpg send pre-renders small streams into memory (limit 256 MiB by default) and expands large ones on the fly; force either with --plan prerender or --plan onthefly.

Step 5. Send it

Rehearse first, then send on the lab interface (see Permissions):

$ wpg send templates/scenarios/vlan-syn-flood.wpg.yaml --backend null -i lo --rate 20kpps --count 5000
$ wpg send templates/scenarios/vlan-syn-flood.wpg.yaml -i eth1 --rate 50kpps \
      --var vid=200 --var dst_ip=203.0.113.9 --var dst_mac=00:11:22:33:44:55

Start gently and climb: --ramp-up 10s increases the rate linearly from zero, which is kind to devices that fall over at the first burst. See Load and rate control.

Step 6. Read the result

  • Watch the connection or SYN counters on the firewall or load balancer (show conn count, conntrack -C, SYN-cookie counters).
  • On a Linux target, nstat -az TcpExtTCPReqQFullDoCookies and ss -s show what the SYN queue did.
  • On the sending side, the summary at the end of wpg send gives packets, bytes, dropped and the achieved rate compared to the target.

Next steps

  • Replace flags: syn with syn|ack, rst, or fin|ack to test how a stateful device treats out-of-state segments.
  • Use templates/scenarios/tcp-syn-port-scan.wpg.yaml to scan destination ports 1-1024 instead.
  • pcap to template replay turns a real capture into a template you can edit.

Tutorial: IPv6 and Neighbor Discovery

Time: about 25 minutes. Privileges: none until Step 6.

This page uses the IPv6 stack to practise two ideas: several layers whose type, length and checksum fields are derived from each other, and a link-layer multicast address computed from a network-layer one. The OSI stack without IP (IS-IS over LLC) is covered in Bringing up an IS-IS adjacency with Hellos.

What you will build

The four kinds of Neighbor Discovery messages that make IPv6 work on a link, then a sweep of Neighbor Solicitations:

TemplateMessage
templates/protocols/l3/ndp-rs.wpg.yamlRouter Solicitation to ff02::2
templates/protocols/l3/ndp-ra.wpg.yamlRouter Advertisement with SLLA, MTU and a /64 prefix
templates/protocols/l3/ndp-ns.wpg.yamlNeighbor Solicitation to a solicited-node group
templates/protocols/l3/ndp-na.wpg.yamlNeighbor Advertisement (S=1, O=1) with a target link-layer address
templates/protocols/l3/ndp-redirect.wpg.yamlRedirect
templates/scenarios/ndp-ns-sweep.wpg.yaml256 Neighbor Solicitations, 2001:db8::1 to ::100
templates/scenarios/ra-flood.wpg.yaml10,000 RAs from random link-local sources (for RA-guard tests)

Before you start

Build wpg and run from the repository root. Only send on lab networks you own or are authorised to test: forged RAs can disrupt every host on a segment.

Step 1. Follow the layers of one Neighbor Solicitation

$ wpg template show templates/protocols/l3/ndp-ns.wpg.yaml
Hex dump (86 bytes)
0000  33 33 ff 00 00 02 02 00  00 00 00 01 86 dd 60 00  33............`.
0010  00 00 00 20 3a ff 20 01  0d b8 00 00 00 00 00 00  ... :. .........
...
Layout
[0] ethernet2  bytes 0..86
  dst: 33:33:ff:00:00:02
  src: 02:00:00:00:00:01
  ethertype: 0x86dd (ipv6)  (auto)
[1] ipv6  bytes 14..86
  payload_length: 32  (auto)
  next_header: 0x3a (icmpv6)  (auto)
  hop_limit: 255
  src: 2001:db8::1
  dst: ff02::1:ff00:2
[2] icmpv6  bytes 54..86
  type: 0x87 (neighbor_solicitation)  (auto)
  code: 0
  checksum: 7207  (auto)
[3] ndp_ns  bytes 58..86
  reserved: 0
  target: 2001:db8::2
  options: 01 01 02 00 00 00 00 01

Every (auto) value was derived, not typed:

  • ethernet2.ethertype = 0x86dd because the next layer is ipv6.
  • ipv6.next_header = 58 because the next layer is icmpv6, and payload_length counts everything after the 40-octet header.
  • icmpv6.type = 135 because the next layer is ndp_ns. The ICMPv6 message is split in two layers on purpose: icmpv6 holds type, code and checksum, and the body layer (ndp_ns, ndp_na, ndp_rs, ndp_ra, ndp_redirect, icmpv6_echo) selects the type.
  • icmpv6.checksum covers the IPv6 pseudo header, the ICMPv6 header and the whole body, so it changes whenever any field below it changes.

The YAML behind it is short:

layers:
  - protocol: ethernet2
    fields: { dst: "33:33:ff:00:00:02", src: "02:00:00:00:00:01" }
  - protocol: ipv6
    fields:
      src: 2001:db8::1
      dst: ff02::1:ff00:2
      hop_limit: 255          # NDP requires 255
  - protocol: icmpv6          # type: auto
  - protocol: ndp_ns
    fields:
      target: ${target}
      options: "01 01 02 00 00 00 00 01"   # source link-layer address

Step 2. Two addresses that must agree

A Neighbor Solicitation for 2001:db8::2 goes to the solicited-node multicast group ff02::1:ff00:2 (ff02::1:ff plus the low 24 bits of the target) and, on Ethernet, to the multicast MAC 33:33: plus the low 32 bits of the IPv6 destination: 33:33:ff:00:00:02. wpg does not derive one address from the other, so if you change target you must change ipv6.dst and ethernet2.dst too (or send to the all-nodes group ff02::1 / 33:33:00:00:00:01 as the sweep does).

Also note hop_limit: 255. Receivers drop NDP messages that arrive with any other value, so leaving the default of 64 produces packets that look right in Wireshark and do nothing.

Step 3. Options are raw bytes

NDP options (options) are written as hex. 01 01 02 00 00 00 00 01 is type 1 (source link-layer address), length 1 (in 8-octet units), then the six-octet MAC. The Router Advertisement template chains three options:

options: >-
  01 01 02 00 00 00 00 01
  05 01 00 00 00 00 05 dc
  03 04 40 c0 00 27 8d 00 00 09 3a 80 00 00 00 00
  20 01 0d b8 00 01 00 00 00 00 00 00 00 00 00 00
OctetsOption
01 01 02 00 00 00 00 01source link-layer address 02:00:00:00:00:01
05 01 00 00 00 00 05 dcMTU 1500
03 04 40 c0 00 27 8d 00 00 09 3a 80 00 00 00 00 20 01 0d b8 00 01 00 00 00 00 00 00 00 00 00 00prefix information: /64 (40), on-link + autonomous (c0), valid lifetime 2592000 s, preferred 604800 s, prefix 2001:db8:1::

Because the options are raw octets you can also build deliberately odd ones: a zero-length option, an option that runs past the end of the packet, or an unknown type.

Step 4. Verify with Wireshark

$ wpg render templates/protocols/l3/ndp-ns.wpg.yaml -o /tmp/ns.pcapng
$ tshark -r /tmp/ns.pcapng -V | sed -n '/Internet Control/,$p'
Internet Control Message Protocol v6
    Type: Neighbor Solicitation (135)
    Code: 0
    Checksum: 0x1c27 [correct]
    [Checksum Status: Good]
    Reserved: 00000000
    Target Address: 2001:db8::2
    ICMPv6 Option (Source link-layer address : 02:00:00:00:00:01)

[correct] is the important part: wpg computed the pseudo-header checksum itself.

Step 5. Sweep it

ndp-ns-sweep.wpg.yaml puts an IPv6 range in the target generator:

  - protocol: ndp_ns
    generators:
      target: 2001:db8::1-2001:db8::100
$ wpg render templates/scenarios/ndp-ns-sweep.wpg.yaml -o /tmp/ns-sweep.pcapng
Wrote 256 packets to /tmp/ns-sweep.pcapng.

Since the destination is the all-nodes group, every host on the segment sees all 256 solicitations and answers only for the addresses it owns. A real host would send each one to that target’s own solicited-node group; the sweep trades that for a single, simple template.

ra-flood.wpg.yaml shows random generators for the source MAC (random_mac with a fixed OUI) and the source link-local address, both reproducible via stream.seed.

Step 6. Send it

$ wpg send templates/scenarios/ndp-ns-sweep.wpg.yaml --backend null -i lo --rate 1000pps
$ wpg send templates/scenarios/ndp-ns-sweep.wpg.yaml -i eth1 --rate 1000pps

(Privileges: see Permissions.) On the target, ip -6 neigh, ndisc6 output or show ipv6 neighbors show what was learned, and tcpdump -n -i eth1 icmp6 on another host shows the solicitations and any advertisements.

Where other ICMPv6 types go

For a type that has no body protocol yet (for example MLD), set icmpv6.type explicitly and follow it with a raw layer that contains the four octets after the checksum and then the message. The same trick lets you send IPv6 extension-header chains, which have their own samples: templates/protocols/l3/ipv6-hopopts, ipv6-dstopts, ipv6-routing, ipv6-frag and ipv6-ext-chain.

Next steps

Tutorial: Load and rate control

Time: about 20 minutes. Privileges: none (the null and pcapfile backends are used throughout).

The skills below (mass generation, rate, duration, ramp-up, workers) work with any template. For an example that loads a real server and counts its answers, see Load-testing a DHCP server.

What you will build

Commands that push a template at a chosen rate for a chosen amount of time, read the summary that comes back, and stay inside the limits of a lab. The example templates are the MAC flood (templates/scenarios/mac-flood.wpg.yaml, 100,000 frames with random source MACs) and the SYN flood (templates/scenarios/vlan-syn-flood.wpg.yaml).

Before you start

Build wpg and run from the repository root. Real transmission needs privileges and a lab interface; this tutorial uses --backend null (frames are built and counted but not sent), so you can run every command anywhere. Replace --backend null -i lo with -i eth1 to send for real.

Only load devices you own or are authorised to test.

Step 1. Count, duration and rate

The stopping condition and the speed come from the template’s tx: block and can be overridden on the command line:

OptionMeaningExamples
--count Nstop after N frames (the stream wraps around if N is longer than the stream)--count 50000
--duration Tstop after T seconds/minutes--duration 10s, --duration 2m
--rate Rtarget rate250kpps, 1Mpps, 1Gbps, 50%, ifg=10us, unlimited
--burst Bframes sent back to back per rate-control step--burst 32

If both count and duration are set, whichever comes first ends the run. Rates in bps count Layer-1 bytes (preamble, FCS and inter-frame gap included, as on the wire); % needs a real interface with a known link speed (it fails on lo).

$ wpg send templates/scenarios/udp-qos-matrix.wpg.yaml --backend null -i lo --rate 250kpps --count 50000
Sending on lo via null: rate 250000pps, burst 1, 50000 packets, 1 worker(s), plan PreRender (...)
state      finished (count reached)
backend    null
packets    50000
bytes      10100000
dropped    0
elapsed    0.200 s
average    250.00 kpps  404.00 Mbps (L2)  452.00 Mbps (L1)
accuracy   target 250.00 kpps  achieved 100.00%  max jitter 454.12µs  mean jitter 202ns

(The numbers on your machine will differ.) Read the last two lines first: average is what was actually sent, and accuracy tells you how close the pacing got to the target. A large dropped means the backend could not keep up.

Step 2. Ramp up

Devices that fall over on the first burst are easier to characterise if the rate climbs. --ramp-up increases the rate linearly from zero to the target over the given time:

$ wpg send templates/scenarios/vlan-syn-flood.wpg.yaml --backend null -i lo --rate 20kpps --ramp-up 1s --duration 3s
[    3.0 s]        50023 pkts  16.67 kpps  9.34 Mbps  dropped 0  rate 100.0%
state      finished (duration elapsed)
packets    50023
elapsed    3.000 s
average    16.67 kpps  9.34 Mbps (L2)  12.54 Mbps (L1)
accuracy   target 20.00 kpps  achieved 100.04%  max jitter 3.196862ms  mean jitter 115.686µs

The average (16.67 kpps) is below the 20 kpps target because the first second was the ramp.

Step 3. Start at a chosen time

--start-at waits before the first frame: a delay (+10s) or an RFC 3339 time (2026-09-29T12:00:00Z). It is handy for starting two senders together or for giving yourself time to start a capture:

$ wpg send templates/scenarios/vlan-syn-flood.wpg.yaml --backend null -i lo --start-at +2s --count 10
Scheduled start at +2s (in 2.0 s); Ctrl-C cancels.

Step 4. Use several workers

A single worker is limited by one CPU core. --workers N starts N transmit threads, each with its own backend instance and its own share of the stream and of the rate; --pin-cores 2,3 pins them to cores (Linux):

$ wpg send templates/scenarios/vlan-syn-flood.wpg.yaml --backend null -i lo --rate unlimited --count 100000 --workers 2
average    10.35 Mpps  5.79 Gbps (L2)  7.78 Gbps (L1)
worker 0     50000 pkts  3500000 bytes
worker 1     50000 pkts  3500000 bytes

unlimited on the null backend measures how fast frames can be built; it is not a network figure. For the afpacket backend also see --batch, --ring-depth, --qdisc-bypass and --no-tx-ring in wpg send --help, and Performance tuning.

Step 5. Pre-render or generate on the fly

--plan auto (default) pre-renders the stream into memory when it is small (256 MiB threshold) so the transmit loop only copies bytes, and expands it on the fly when it is larger. Force one with --plan prerender or --plan onthefly. Random generators take their values from stream.seed, so set one when you need a reproducible stream.

Step 6. Machine-readable results

--json prints the final report as JSON on standard output (progress and banners go to standard error), for CI jobs and scripts:

$ wpg send templates/scenarios/mac-flood.wpg.yaml --backend null -i lo --count 100000 --json | jq '{state: .state.state, packets: .backend.packets, dropped: .backend.dropped}'

The exit status is non-zero when the run failed (for example a refused backend), so wpg send can be a step in a pipeline.

Step 7. Keep it inside limits

  • Set an absolute upper bound for everyone with [tx] max_rate in wpg.toml (for example max_rate = "100kpps") and restrict interfaces with allowed_ifaces; see Configuration.
  • Ctrl-C cancels a run.
  • Use a rehearsal backend (null, or pcapfile with -i out.pcapng) before every new template.

Next steps

Tutorial: pcap to template replay

Time: about 20 minutes. Privileges: none until the last step.

What you will build

A round trip: take a capture (here one produced by wpg so the commands are reproducible, but any Ethernet pcap or pcapng works), convert it into an editable template, and render it back to the same bytes. Along the way wpg recognises which fields vary between packets and turns them into generators.

wpg import reads pcap (both byte orders, microsecond and nanosecond) and pcapng, Ethernet link type only, and assumes frames carry no FCS. It can also read pasted hex.

Before you start

Build wpg and run from the repository root. tshark is only used for checking.

Step 1. Make a capture

$ wpg render templates/examples/arp-sweep.wpg.yaml -o /tmp/arp.pcapng
Wrote 254 packets to /tmp/arp.pcapng.

In real life this file would come from tcpdump -i eth0 -w capture.pcap or Wireshark.

Step 2. Import it

$ wpg import /tmp/arp.pcapng -o /tmp/arp.wpg.yaml
Imported 254 packet(s) into 1 template(s): /tmp/arp.wpg.yaml

The result:

schema: 1
meta:
  name: arp
  description: Imported from /tmp/arp.pcapng (254 packets)
  ...
  tags:
  - imported
layers:
- protocol: ethernet2
  fields:
    dst: ff:ff:ff:ff:ff:ff
    src: 02:00:00:00:00:01
    ethertype: auto
- protocol: arp
  fields:
    htype: ethernet
    ptype: ipv4
    hlen: 6
    plen: 4
    oper: request
    sha: 02:00:00:00:00:01
    spa: 192.168.1.10
    tha: 00:00:00:00:00:00
  generators:
    tpa:
      kind: range
      start: 192.168.1.1
      end: 192.168.1.254
      step: 1
- protocol: raw
  fields:
    data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
stream:
  mode: zip
  count: 254

Three things happened:

  1. Fields are in human notation (192.168.1.10, request, ethernet), and fields that wpg can recompute were put back to auto only where doing so reproduces the captured bytes. A capture with a wrong checksum or length keeps that field as a manual value, so deliberately malformed traffic survives the trip.
  2. Generator inference. All 254 frames have the same layer stack, and arp.tpa changes by +1 each time, so it became a range generator (an exact one). Other patterns are recognised too: a repeating cycle becomes list, a small set of values becomes an approximate list, and anything else becomes a random generator over the observed minimum and maximum (wpg warns when the result is approximate). Use --no-detect-generators to keep only the first packet’s values.
  3. The 18 zero octets after ARP are the Ethernet padding that was in the capture. The importer keeps bytes it cannot attribute to a protocol in a raw layer so the frame is reproduced exactly. You may delete that layer: with packet.pad_to_min (the default) wpg pads the frame itself.

Step 3. Lint and render again

$ wpg template lint /tmp/arp.wpg.yaml
/tmp/arp.wpg.yaml: no issues
0 error(s), 0 warning(s) in 1 file(s)
$ wpg render /tmp/arp.wpg.yaml -o /tmp/arp2.pcapng
Wrote 254 packets to /tmp/arp2.pcapng.
$ diff <(tshark -r /tmp/arp.pcapng -x) <(tshark -r /tmp/arp2.pcapng -x) && echo identical
identical

The frames are byte-for-byte the same (timestamps differ, since wpg writes its own).

Step 4. Edit and reuse

Because it is now a template, you can change anything:

  • Turn constants into variables: replace 192.168.1.10 by ${src_ip} and add variables: [{ name: src_ip, default: 192.168.1.10 }], then run wpg render … --var src_ip=10.9.8.7.
  • Widen the sweep: change the range to 192.168.0.1-192.168.7.254.
  • Set oper: reply to turn the capture into replies.
  • Add packet: { fcs: bad } to see how a device treats a bad FCS.

Step 5. One template per packet, or from pasted hex

For a capture of a conversation rather than a sweep, ask for one template per packet:

$ wpg import /tmp/capture.pcap --per-packet /tmp/templates/

A packet copied from Wireshark (“Copy → as a Hex Stream”), a xxd/hexdump -C listing or plain spaced bytes can be piped in:

$ echo "ff ff ff ff ff ff 02 00 00 00 00 01 08 06 00 01 08 00 06 04 00 01 02 00 00 00 00 01 c0 00 02 01 00 00 00 00 00 00 c0 00 02 02" \
    | wpg import --hex - -o -

For captures that start with something other than Ethernet II, use --first-protocol. Frames that use a protocol wpg does not know are kept as raw bytes after the last layer it could decode, so they still replay.

Step 6. Share and replay

Pack the template and the original capture into a bundle that a colleague can import:

$ wpg template export /tmp/arp.wpg.yaml -o /tmp/arp.wpgbundle --attach /tmp/arp.pcapng
$ wpg template import /tmp/arp.wpgbundle -o ./my-templates

Send the template like any other, with a rate of your choice:

$ wpg send /tmp/arp.wpg.yaml -i eth1 --rate 500pps

See Load and rate control for the options.

Next steps

Tutorial: Load-testing a DHCP server

Time: about 25 minutes. Privileges: none until Step 3; root from Step 4 (network namespace and afpacket).

What you will build

A stream of DHCPDISCOVERs from many simulated clients, and a count of the DHCPOFFERs the server sends back, to find the rate the server can keep up with. Every frame changes the source MAC and chaddr (the client hardware address) together and uses a random transaction ID (xid). The server is dnsmasq running in a network namespace on the same Linux host.

wpg is stateless. It does not answer an OFFER with a DHCPREQUEST, so DORA (Discover / Offer / Request / Ack) never completes and no lease is created. What you measure is how fast the server handles DISCOVERs, not pool exhaustion (Step 6).

Only use this against DHCP servers you own or are authorised to test. A burst of DISCOVERs on a production segment can stop real clients from getting an address.

Before you start

Build wpg and run from the repository root (Installing on Linux). The template is templates/scenarios/dhcp-discover-flood.wpg.yaml; a single-frame example is templates/protocols/app/dhcpv4-discover.wpg.yaml. From Step 4 you need Linux, iproute2, dnsmasq (sudo apt install dnsmasq-base) and root.

Step 1. Read the template

variables:
  - name: oui
    default: "02:00:5e"

layers:
  - protocol: ethernet2
    fields:
      dst: "ff:ff:ff:ff:ff:ff"
    generators:
      src: { kind: range, start: "${oui}:00:00:01", end: "${oui}:ff:ff:ff" } # one MAC per client
  - protocol: ipv4
    fields:
      src: 0.0.0.0
      dst: 255.255.255.255
  - protocol: udp
    fields:
      src_port: 68
      dst_port: 67
  - protocol: dhcpv4
    fields:
      op: boot_request
      flags: broadcast
      options:
        - { message_type: discover }
        - { parameter_request_list: [1, 3, 6, 15, 51] } # mask, router, DNS, domain, lease
        - end
    generators:
      chaddr: { kind: expr, expr: "$0.src" } # the same MAC as the Ethernet source (layer 0)
      xid: { kind: expr, expr: "rand(0, 0xffffffff)" }

stream:
  seed: 1
  count: 10000

tx:
  rate: 200pps

Things worth knowing:

  • Source MACs are sequential. range works on MAC addresses too and counts up from 02:00:5e:00:00:01. The 02 first octet marks a locally administered address that cannot clash with real hardware. --var oui=… changes the upper three octets.
  • chaddr copies the source MAC through an expression. In an expr generator, $0.src means “this frame’s value of the src generator in layer 0 (ethernet2)”. Servers usually identify a client by chaddr, so the two must not drift apart. The expression syntax is in Template schema.
  • xid is random per frame. rand(min, max) is derived from the frame index, so the same stream.seed gives the same values on every run.
  • Fields you do not write are Auto or defaults. IPv4 length and checksum and UDP length and checksum (with the pseudo-header) are Auto; DHCP htype / hlen, the zero-filled sname and file, and the magic cookie come from defaults.

Step 2. Look at the first frames

$ wpg render templates/scenarios/dhcp-discover-flood.wpg.yaml -o /tmp/dhcp.pcapng --count 3
Wrote 3 packets to /tmp/dhcp.pcapng.
$ tshark -r /tmp/dhcp.pcapng
    1   0.000000      0.0.0.0 → 255.255.255.255 DHCP 293 DHCP Discover - Transaction ID 0xc4c98940
    2   0.000001      0.0.0.0 → 255.255.255.255 DHCP 293 DHCP Discover - Transaction ID 0xef7b0650
    3   0.000002      0.0.0.0 → 255.255.255.255 DHCP 293 DHCP Discover - Transaction ID 0x330355d7
$ tshark -r /tmp/dhcp.pcapng -o udp.check_checksum:TRUE -T fields -e eth.src -e dhcp.hw.mac_addr -e udp.checksum.status
02:00:5e:00:00:01	02:00:5e:00:00:01	1
02:00:5e:00:00:02	02:00:5e:00:00:02	1
02:00:5e:00:00:03	02:00:5e:00:00:03	1

The source MAC matches Client MAC address, and the UDP checksum is reported good (1). The same holds for all 10,000 frames:

$ wpg render templates/scenarios/dhcp-discover-flood.wpg.yaml -o /tmp/dhcp-all.pcapng
Wrote 10000 packets to /tmp/dhcp-all.pcapng.
$ tshark -r /tmp/dhcp-all.pcapng -Y 'eth.src != dhcp.hw.mac_addr' | wc -l
0

Step 3. Change the scale

--count sets the number of clients. Past the 10,000 of stream.count the MAC sequence starts over, so for more clients add a second stream with a different --var oui=…:

$ wpg render templates/scenarios/dhcp-discover-flood.wpg.yaml -o /tmp/dhcp-b.pcapng --var oui=02:00:5f
Wrote 10000 packets to /tmp/dhcp-b.pcapng.

The source MACs in this file run from 02:00:5f:00:00:01 to 02:00:5f:00:27:10 (10000 = 0x2710).

Step 4. Set up a DHCP server to test

Start dnsmasq in a namespace wpgdhcp, connected to wpg by a veth pair (dh0 ⇔ dhs0), with a 50-address pool:

sudo ip netns add wpgdhcp
sudo ip link add dh0 type veth peer name dhs0
sudo ip link set dhs0 netns wpgdhcp
sudo ip link set dh0 up
sudo ip netns exec wpgdhcp ip link set lo up
sudo ip netns exec wpgdhcp ip link set dhs0 up
sudo ip netns exec wpgdhcp ip addr add 10.98.0.1/24 dev dhs0
sudo ip netns exec wpgdhcp dnsmasq --no-daemon --port=0 --interface=dhs0 --bind-interfaces \
    --dhcp-range=10.98.0.10,10.98.0.59,10m --dhcp-authoritative --dhcp-leasefile=/tmp/wpg-leases \
    --log-dhcp --log-facility=/tmp/wpg-dnsmasq.log &

--port=0 turns DNS off. To test a real DHCP server or router, use the lab interface that reaches it instead of dh0.

Step 5. Send and count the OFFERs

Count OFFERs (source port 67) with wpg capture while another terminal sends 100 DISCOVERs:

$ sudo wpg capture -i dh0 -f "udp src port 67" --duration 3s --show 2 -w /tmp/offers.pcapng
$ sudo wpg send templates/scenarios/dhcp-discover-flood.wpg.yaml -i dh0 --backend afpacket --count 100
Capturing on dh0 via afpacket, filter udp src port 67 (Ctrl-C stops)
#   0  16:14:33.696984775    342 B  ethernet2 / ipv4 / udp / dhcpv4
#   1  16:14:33.703225873    342 B  ethernet2 / ipv4 / udp / dhcpv4
state      finished (duration elapsed)
...
matched    100 pkts  34200 bytes
saved      100 pkts to /tmp/offers.pcapng
$ tshark -r /tmp/offers.pcapng -c 3
    1   0.000000    10.98.0.1 → 255.255.255.255 DHCP 342 DHCP Offer    - Transaction ID 0xc4c98940
    2   0.006241    10.98.0.1 → 255.255.255.255 DHCP 342 DHCP Offer    - Transaction ID 0xef7b0650
    3   0.009784    10.98.0.1 → 255.255.255.255 DHCP 342 DHCP Offer    - Transaction ID 0x330355d7

Each OFFER carries the xid of its DISCOVER (Step 2). The broadcast flag is set, so the OFFERs go to 255.255.255.255.

Your first run will probably look very slow. By default dnsmasq sends an ICMP Echo to an address before offering it, to make sure it is unused. That costs about 3 seconds per DISCOVER, so a 3-second capture counts a single OFFER (the log /tmp/wpg-dnsmasq.log shows one DHCPOFFER every 3 seconds). The result above is with dnsmasq restarted with --no-ping. Finding limits like this one, set by how the server is built, is one of the points of this kind of test.

Now raise the rate to find where the OFFERs stop keeping up:

for r in 1kpps 5kpps 20kpps; do
  sudo wpg capture -i dh0 -f "udp src port 67" --duration 4s --show 0 > /tmp/cap-$r.txt &
  sudo wpg send templates/scenarios/dhcp-discover-flood.wpg.yaml -i dh0 --backend afpacket --count 2000 --rate $r
  wait; grep '^matched' /tmp/cap-$r.txt
done

Results in the development container (--no-ping); yours depend on the host and the server:

Send rateDISCOVERsOFFERsAnswered
1 kpps20002000100%
5 kpps20002000100%
20 kpps2000117559%

The rate at which the answered share starts to fall is a rough measure of the server’s DISCOVER capacity. The unanswered DISCOVERs were dropped in the server’s socket receive buffer. On real equipment, DHCP snooping or CoPP (control-plane policing) may drop them first, so check the switch or router counters too.

Step 6. Read the results

  • An OFFER does not reserve the address. The pool has 50 addresses, yet all 100 DISCOVERs were answered, with 50 distinct addresses offered (tshark -r /tmp/offers.pcapng -T fields -e dhcp.ip.your | sort -u | wc -l). dnsmasq, like most servers, creates the lease on REQUEST / ACK, so DISCOVERs alone do not exhaust a pool. The lease file (/tmp/wpg-leases) stays empty.
  • Tests that create leases are out of scope for wpg. Answering an OFFER with a REQUEST is stateful, which is a non-goal. For pool exhaustion or lease-holding tests use a DHCP client emulator such as perfdhcp.
  • Through a relay: start from templates/protocols/app/dhcpv4-relay.wpg.yaml (unicast, with giaddr and option 82). Set the destination to the server’s address to test a server behind a router.
  • For DHCPv6 there are templates/protocols/app/dhcpv6-solicit.wpg.yaml and dhcpv6-relay-forward.wpg.yaml.

Clean up:

sudo pkill -f 'dnsmasq --no-daemon --port=0 --interface=dhs0'
sudo ip netns del wpgdhcp      # removes dh0 as well

Next steps

  • Use --ramp-up 30s with the target --rate to raise the rate linearly and find where the answered share starts to fall. See Load and rate control.
  • In the GUI, open this scenario from the Templates page, send it from a job, and count the OFFERs on the Receive page (/rx) with the filter udp src port 67 (Receive and verification).

Tutorial: Bringing up an IS-IS adjacency with Hellos

Time: about 30 minutes. Privileges: none until Step 2; root from Step 3 (network namespace and afpacket).

What you will build

An IS-IS Level 2 LAN Hello (IIH), sent to FRR’s isisd, and the peer’s view of the adjacency going from Initializing to Up. The template is the interop check templates/interop/isis-l2-lan-hello-up.wpg.yaml. It is an OSI stack without IP, with LLC (0xfe) and IS-IS directly on Ethernet, and it shows the PDU length, padding up to the MTU, and the two-way check through the IS Neighbors TLV.

wpg is stateless. Keep sending Hellos and the adjacency stays up, but wpg does not flood LSPs or act as the DIS.

Only use this against routers you own or are authorised to test. A fake adjacency in a production IS-IS domain can affect route computation.

Before you start

Build wpg and run from the repository root (Installing on Linux). From Step 3 you need Linux, iproute2, FRR (sudo apt install frr; the script starts the daemons itself, so the frr service can stay stopped) and root. The IS-IS PDUs and TLVs are listed in IS-IS (P2).

Step 1. Read the template

layers:
  - protocol: dot3
    fields:
      dst: "01:80:c2:00:00:15" # AllL2ISs
      src: ${src_mac}
      length: auto
  - protocol: llc
  - protocol: isis_l2_lan_hello
    fields:
      circuit_type: l2
      source_id: ${system_id}
      holding_time: 30
      priority: 0 # wpg does not flood LSPs, so let the peer be the DIS
      lan_id: "0000 0000 0001 01" # overwritten by the DIS's LAN ID once the peer elects itself
      # Manual PDU length: Padding TLVs fill the PDU up to it (MTU 1500 - LLC 3).
      pdu_length: 1497
      tlvs:
        - { protocols_supported: [ipv4] }
        - { area_addresses: [{ address: "${area}" }] }
        - { ip_interface_addresses: ["${ip}"] }
        - { is_neighbors: ["${peer_mac}"] }

tx:
  count: 40 # two minutes of Hellos
  rate: ifg=3s

Things worth knowing:

  • IS-IS does not use IP. With llc on top of dot3 (802.3 with a length field), DSAP / SSAP become 0xfe (OSI) automatically, and the IS-IS NLPID 0x83 comes from the PDU layer. 01:80:c2:00:00:15 is the all-Level-2-ISs address (AllL2ISs).
  • A Manual pdu_length adds padding. Left Auto, the PDU is as long as its TLVs. With a value, Padding TLVs (type 8) are added until the PDU is exactly that long. 1497 is the Ethernet MTU of 1500 minus the 3-octet LLC header. A Hello that arrives at that size tells the peer that the MTUs match.
  • is_neighbors is the two-way check. A LAN adjacency only comes Up once a router sees its own MAC (SNPA) in the other side’s Hello. Set peer_mac to the MAC of the peer’s interface.
  • priority: 0 makes wpg lose the DIS (designated IS) election, because it does not do the DIS’s work (CSNPs, pseudonode LSP).
  • The System ID (source_id) is 6 octets; area addresses use NSAP notation (49.0001).

Step 2. Look at the frame

$ wpg render templates/interop/isis-l2-lan-hello-up.wpg.yaml -o /tmp/isis.pcapng --count 1
Wrote 1 packets to /tmp/isis.pcapng.
$ tshark -r /tmp/isis.pcapng
    1   0.000000 02:00:00:00:00:01 → ISIS-all-level-2-IS's ISIS HELLO 1514 L2 HELLO, System-ID: 0000.0000.0001
$ tshark -r /tmp/isis.pcapng -V
...
ISIS HELLO
    .... ..10 = Circuit type: Level 2 only (0x2)
    SystemID {Sender of PDU}: 0000.0000.0001
    Holding timer: 30
    PDU length: 1497
    .000 0000 = Priority: 0
    SystemID {Designated IS}: 0000.0000.0001.01
    Protocols Supported (t=129, l=1)
    Area address(es) (t=1, l=4)
        Area address (3): 49.0001
    IP Interface address(es) (t=132, l=4)
        IPv4 interface address: 10.99.0.1
    IS Neighbor(s) (t=6, l=6)
        IS Neighbor: 02:00:00:00:00:02 (02:00:00:00:00:02)
    Padding (t=8, l=255)
    Padding (t=8, l=255)
    Padding (t=8, l=255)
    Padding (t=8, l=255)
    Padding (t=8, l=255)
    Padding (t=8, l=160)

(The -V output is abridged.) The frame is 1514 octets (MTU 1500 plus the 14-octet Ethernet header). The 1497-octet PDU is the 27-octet header, 23 octets for the four TLVs above, and six Padding TLVs (five of 255 octets and one of 160, each plus 2 octets of type and length: 1447).

Step 3. Set up the FRR lab

scripts/interop/frr-netns.sh starts FRR in a namespace wpgfrr connected to wpg by a veth pair (wpg0 ⇔ frr0). FRR’s IS-IS is net 49.0001.0000.0000.0002.00, is-type level-2-only. With --keep the lab stays up after the interop checks.

$ cargo build --release -p wpg-cli
$ sudo scripts/interop/frr-netns.sh --keep target/release/wpg
...
PASS  IS-IS L2 adjacency Up
...
lab kept: ip netns exec wpgfrr vtysh -N wpg; tear down with scripts/interop/frr-netns.sh --down

The script’s own check has already brought the adjacency up once. Wait until it expires, one holding time (30 s) after the last Hello, before you go on:

$ sudo ip netns exec wpgfrr vtysh -N wpg -c "show isis neighbor"
Area 1:
  System Id           Interface   L  State        Holdtime SNPA

Note both MACs (veth MACs change every time the pair is created):

SRC=$(cat /sys/class/net/wpg0/address)
PEER=$(sudo ip netns exec wpgfrr cat /sys/class/net/frr0/address)

Step 4. Receive the peer’s Hello

FRR sends its own Hello every 3 seconds. Receive one with wpg capture to check that wpg’s parser reads it:

$ sudo wpg capture -i wpg0 -f "ether dst 01:80:c2:00:00:15" --count 1 --show 1
Capturing on wpg0 via afpacket, filter ether dst 01:80:c2:00:00:15 (Ctrl-C stops)
#   0  16:10:42.763122508   1514 B  dot3 / llc / isis_l2_lan_hello
state      finished (count reached)
...

FRR’s Hello is also padded to 1514 octets and parses as dot3 / llc / isis_l2_lan_hello. Save it with -w /tmp/frr.pcapng to turn it into a template (pcap to template replay).

Step 5. Bring the adjacency up

First send one Hello without the peer’s MAC. peer_mac keeps its default 02:00:00:00:00:02, so to FRR this is a neighbor that does not know it yet:

$ sudo wpg send templates/interop/isis-l2-lan-hello-up.wpg.yaml -i wpg0 --backend afpacket \
      --var src_mac=$SRC --count 1
$ sudo ip netns exec wpgfrr vtysh -N wpg -c "show isis neighbor"
Area 1:
  System Id           Interface   L  State        Holdtime SNPA
 0000.0000.0001      frr0        2  Initializing  29       a63f.1a8d.7239

FRR has found wpg, but without the two-way check the adjacency stays Initializing. Now send with FRR’s MAC in peer_mac:

$ sudo wpg send templates/interop/isis-l2-lan-hello-up.wpg.yaml -i wpg0 --backend afpacket \
      --var src_mac=$SRC --var peer_mac=$PEER --count 2 --rate 1pps
$ sudo ip netns exec wpgfrr vtysh -N wpg -c "show isis neighbor"
Area 1:
  System Id           Interface   L  State        Holdtime SNPA
 0000.0000.0001      frr0        2  Up            30       a63f.1a8d.7239
$ sudo ip netns exec wpgfrr vtysh -N wpg -c "show isis neighbor detail"
Area 1:
 0000.0000.0001
    Interface: frr0, Level: 2, State: Up, Expires in 30s
    Adjacency flaps: 1, Last: 1s ago
    Circuit type: L2, Speaks: IPv4
    SNPA: a63f.1a8d.7239, LAN id: 0000.0000.0001.01
    LAN Priority: 0, unknown DIS state, DIS flaps: 0, Last: 2s ago
    Area Address(es):
      49.0001
    IPv4 Address(es):
      10.99.0.1

FRR sees the template’s TLVs as written: the area, the IPv4 address, priority 0 and the 30-second holding time. To keep the adjacency, send Hellos more often than the holding time. The template’s default (without --count) is 40 Hellos 3 seconds apart, two minutes in all. Stop sending and the adjacency is gone 30 seconds later.

Step 6. Variations

  • A different area: sending with --var area=49.0002 --var "system_id=0000 0000 0003" still brings the adjacency Up. Only Level 1 adjacencies need a matching area address; Level 2 adjacencies cross areas (ISO 10589). To try Level 1, change isis_l2_lan_hello to isis_l1_lan_hello and the destination to 01:80:c2:00:00:14 (AllL1ISs) in the template, and set FRR to is-type level-1.
  • MTU mismatch: put pdu_length back to Auto (delete the line) and the Hello is short and unpadded. FRR does not require padded Hellos from its neighbors by default, so the adjacency still comes up, but implementations that insist on padding will not form it. Use this to compare devices.
  • Authentication: templates/protocols/routing/isis-l2-lan-hello.wpg.yaml carries clear-text authentication (TLV 10). wpg does not compute HMAC-MD5 values; enter them by hand.
  • Other PDUs: samples of LSPs, CSNPs, PSNPs and point-to-point Hellos are in templates/protocols/routing/isis-*.wpg.yaml. The LSP checksum (Fletcher) is Auto.

Clean up:

sudo scripts/interop/frr-netns.sh --down

Next steps

  • The procedure and configuration examples for real routers (IOS-XR, Junos) and routers on CML2 are in Interop checks.
  • The IPv6 counterpart of the same ideas (several layers whose type, length and checksum fields are derived from each other) is IPv6 and Neighbor Discovery.

Protocol reference

This chapter is generated from the protocol definition IR of wpg-protocols (the catalog served at GET /api/protocols), so it always matches the code: 183 protocols. Each page lists the fields in wire order with their type, default, Auto rule and description, the lower layers that lead to the protocol, the next-layer table, the constraints checked after building and the bundled sample templates. The hand-written protocol notes explain how the protocols are reached, which fields you set by hand and the approximations that remain. After changing a definition, regenerate with just docs-gen.

IDNameFieldsNext layer byNotes
ethernet2Ethernet II3ethertypeEncapsulation and tunnels, L2 control protocols, SRv6 SRH / SR-MPLS (P2), User-defined protocols (protocols.d)
dot1q802.1Q VLAN4ethertypeUser-defined protocols (protocols.d)
dot1ad802.1ad S-VLAN4ethertype
dot3IEEE 802.33lengthL2 control protocols
llcIEEE 802.2 LLC3dsapL2 control protocols, OSI encapsulation (P2)
snapSNAP2pidL2 control protocols
arpARP9
lldpLLDP1L2 control protocols
cdpCDP4L2 control protocols
stpSTP BPDU15L2 control protocols
lacpLACP27L2 control protocols, PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
markerMarker Protocol11L2 control protocols, PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
eapolEAPOL4L2 control protocols
pppoe_discoveryPPPoE Discovery6L2 control protocols
pppoe_sessionPPPoE Session5session_idL2 control protocols
pppPPP1protocolL2 control protocols, OSI encapsulation (P2)
ppp_lcpPPP LCP4L2 control protocols
ppp_ipcpPPP IPCP4L2 control protocols
vxlanVXLAN4flagsEncapsulation and tunnels
mplsMPLS4sEncapsulation and tunnels, SRv6 SRH / SR-MPLS (P2)
geneveGeneve9protocol_typeEncapsulation and tunnels
macsecMACsec13MACsec / GTPv2-C / Diameter / SIP / RTP (P2)
esmcESMC8PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfmCFM6opcodePTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_ccmCFM CCM16PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_lbmCFM LBM7PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_lbrCFM LBR7PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_ltmCFM LTM11PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_ltrCFM LTR12PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_aisY.1731 AIS7PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_lckY.1731 LCK7PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_tstY.1731 TST7PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_rapsERPS R-APS14PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_lmmY.1731 LMM9PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_lmrY.1731 LMR9PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_1dmY.1731 1DM10PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_dmmY.1731 DMM14PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_dmrY.1731 DMR14PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_csfY.1731 CSF8PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_slmY.1731 SLM11PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_slrY.1731 SLR11PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
cfm_1slY.1731 1SL11PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam802.3ah OAM4codePTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam_information802.3ah OAM Information4PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam_event_notification802.3ah OAM Event Notification5PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam_variable_request802.3ah OAM Variable Request4PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam_variable_response802.3ah OAM Variable Response4PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam_loopback_control802.3ah OAM Loopback Control4PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
efm_oam_organization_specific802.3ah OAM Organization Specific5PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)

L3 (network)

IDNameFieldsNext layer byNotes
ipv4IPv415protocolEncapsulation and tunnels, IS-IS (P2), MACsec / GTPv2-C / Diameter / SIP / RTP (P2), LDP / RSVP-TE / BFD (P2), Multicast control protocols, User-defined protocols (protocols.d)
ipv6IPv69next_headerEncapsulation and tunnels, IS-IS (P2), MACsec / GTPv2-C / Diameter / SIP / RTP (P2), User-defined protocols (protocols.d)
ipv6_hopoptsIPv6 Hop-by-Hop Options4next_headerMulticast control protocols
ipv6_routeIPv6 Routing6next_headerSRv6 SRH / SR-MPLS (P2)
ipv6_srhIPv6 Segment Routing Header10next_headerSRv6 SRH / SR-MPLS (P2)
ipv6_fragIPv6 Fragment6next_header
ipv6_dstoptsIPv6 Destination Options4next_header
icmpv4ICMPv44
icmpv6ICMPv63typeMulticast control protocols
icmpv6_echoICMPv6 Echo2
ndp_rsNDP Router Solicitation2
ndp_raNDP Router Advertisement8
ndp_nsNDP Neighbor Solicitation3
ndp_naNDP Neighbor Advertisement6
ndp_redirectNDP Redirect4
greGRE2protocol_typeEncapsulation and tunnels
nvgreNVGRE4protocol_typeEncapsulation and tunnels
ospfv2OSPFv28typeRouting protocols
ospfv2_helloOSPFv2 Hello8
ospfv2_dbdOSPFv2 DBD5
ospfv2_lsrOSPFv2 LSR1
ospfv2_lsuOSPFv2 LSU1num_lsasRouting protocols
ospfv2_lsackOSPFv2 LSAck1
ospfv2_lsaOSPFv2 LSA8ls_typeOSPF Opaque / SR, BGP MP / VPN / EVPN (P2)
ospfv2_router_lsaOSPFv2 Router-LSA4
ospfv2_network_lsaOSPFv2 Network-LSA2
ospfv2_summary_lsaOSPFv2 Summary-LSA3
ospfv2_external_lsaOSPFv2 AS-External-LSA6
ospfv2_opaque_lsaOSPFv2 Opaque LSA9opaque_typeOSPF Opaque / SR, BGP MP / VPN / EVPN (P2)
ospfv2_te_lsaOSPFv2 TE LSA1OSPF Opaque / SR, BGP MP / VPN / EVPN (P2)
ospfv2_ri_lsaOSPFv2 Router Information LSA1OSPF Opaque / SR, BGP MP / VPN / EVPN (P2)
ospfv2_ext_prefix_lsaOSPFv2 Extended Prefix LSA1OSPF Opaque / SR, BGP MP / VPN / EVPN (P2)
ospfv2_ext_link_lsaOSPFv2 Extended Link LSA1OSPF Opaque / SR, BGP MP / VPN / EVPN (P2)
ospfv3OSPFv38typeRouting protocols
ospfv3_helloOSPFv3 Hello8
ospfv3_dbdOSPFv3 DBD7
ospfv3_lsrOSPFv3 LSR1
ospfv3_lsuOSPFv3 LSU1num_lsasRouting protocols
ospfv3_lsackOSPFv3 LSAck1
ospfv3_lsaOSPFv3 LSA7ls_type
ospfv3_router_lsaOSPFv3 Router-LSA3
ospfv3_network_lsaOSPFv3 Network-LSA3
ospfv3_inter_area_prefix_lsaOSPFv3 Inter-Area-Prefix-LSA6
ospfv3_as_external_lsaOSPFv3 AS-External-LSA6
ospfv3_link_lsaOSPFv3 Link-LSA5
ospfv3_intra_area_prefix_lsaOSPFv3 Intra-Area-Prefix-LSA5
eigrpEIGRP9Routing protocols
vrrpv2VRRPv210Redundancy protocols (FHRP)
vrrpv3VRRPv39versionRedundancy protocols (FHRP)
vrrpv3_ipv6VRRPv3 (IPv6)9Redundancy protocols (FHRP)
igmpIGMP3typeMulticast control protocols
igmpv2IGMPv1/v21Multicast control protocols
igmpv3_queryIGMPv3 Query7Multicast control protocols
igmpv3_reportIGMPv3 Report3Multicast control protocols
mldMLDv13Multicast control protocols
mldv2_queryMLDv2 Query9Multicast control protocols
mldv2_reportMLDv2 Report3Multicast control protocols
pimPIM4typeMulticast control protocols
pim_helloPIM Hello1Multicast control protocols
pim_join_prunePIM Join/Prune7Multicast control protocols
pim_registerPIM Register7typeMulticast control protocols
osiOSI network PDU2CLNP / ES-IS (P2), OSI encapsulation (P2)
clnpCLNP14CLNP / ES-IS (P2), IS-IS (P2), OSI encapsulation (P2)
esisES-IS9pdu_typeCLNP / ES-IS (P2)
esis_eshES-IS ESH11CLNP / ES-IS (P2)
esis_ishES-IS ISH10CLNP / ES-IS (P2), OSI encapsulation (P2)
esis_rdES-IS Redirect13CLNP / ES-IS (P2)
isisIS-IS10pdu_typeIS-IS (P2)
isis_l1_lan_helloIS-IS L1 LAN Hello18IS-IS (P2), OSI encapsulation (P2)
isis_l2_lan_helloIS-IS L2 LAN Hello18IS-IS (P2)
isis_p2p_helloIS-IS P2P Hello16IS-IS (P2)
isis_l1_lspIS-IS L1 LSP19IS-IS (P2)
isis_l2_lspIS-IS L2 LSP19IS-IS (P2)
isis_l1_csnpIS-IS L1 CSNP14IS-IS (P2)
isis_l2_csnpIS-IS L2 CSNP14IS-IS (P2)
isis_l1_psnpIS-IS L1 PSNP12IS-IS (P2)
isis_l2_psnpIS-IS L2 PSNP12IS-IS (P2)

L4 (transport)

Application and control

IDNameFieldsNext layer byNotes
bgpBGP3typeRouting protocols
bgp_openBGP OPEN6
bgp_updateBGP UPDATE5
bgp_notificationBGP NOTIFICATION3
bgp_route_refreshBGP ROUTE-REFRESH3
ripRIP4Routing protocols
ripngRIPng4Routing protocols
hsrpHSRPv110versionRedundancy protocols (FHRP)
hsrpv2HSRPv21Redundancy protocols (FHRP)
glbpGLBP6Redundancy protocols (FHRP)
dhcpv4DHCPv417Application protocols
dhcpv6DHCPv63msg_typeApplication protocols
dhcpv6_relayDHCPv6 Relay5Application protocols
dnsDNS16Application protocols
ntpNTP14Application protocols
snmpSNMP8versionApplication protocols
snmp_pduSNMP PDU3pdu_typeApplication protocols
snmp_trapSNMPv1 Trap3Application protocols
syslogSyslog1Application protocols
radiusRADIUS5Application protocols
tftpTFTP4opcodeApplication protocols
tftp_dataTFTP DATA3Application protocols
tftp_ackTFTP ACK2Application protocols
tftp_errorTFTP ERROR3Application protocols
tftp_oackTFTP OACK2Application protocols
ldpLDP5LDP / RSVP-TE / BFD (P2)
bfdBFD17LDP / RSVP-TE / BFD (P2)
gtpv2GTPv2-C12pMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
diameterDiameter12MACsec / GTPv2-C / Diameter / SIP / RTP (P2)
sipSIP3MACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtpRTP11MACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtcpRTCP6packet_typeMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtcp_srRTCP SR13versionMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtcp_rrRTCP RR8versionMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtcp_sdesRTCP SDES6versionMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtcp_byeRTCP BYE7versionMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
rtcp_appRTCP APP8versionMACsec / GTPv2-C / Diameter / SIP / RTP (P2)
ptpPTP16message_typePTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_syncPTP Sync18PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_delay_reqPTP Delay_Req18PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_pdelay_reqPTP Pdelay_Req19PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_pdelay_respPTP Pdelay_Resp20PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_follow_upPTP Follow_Up18PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_delay_respPTP Delay_Resp20PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_pdelay_resp_follow_upPTP Pdelay_Resp_Follow_Up20PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_announcePTP Announce28PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_signalingPTP Signaling18PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)
ptp_managementPTP Management23PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)

Payload

Ethernet II (ethernet2)

Reached from

Lower layerSelectorValue
ipv6next_header143 (0x8f)
ipv6_hopoptsnext_header143 (0x8f)
ipv6_routenext_header143 (0x8f)
ipv6_srhnext_header143 (0x8f)
ipv6_fragnext_header143 (0x8f)
ipv6_dstoptsnext_header143 (0x8f)
vxlanflags(any other value)
greprotocol_type25944 (0x6558)
nvgreprotocol_type25944 (0x6558)
geneveprotocol_type25944 (0x6558)

Fields

FieldTypeDefaultAutoDescription
dstmacff:ff:ff:ff:ff:ffDestination MAC address.
srcmac02:00:00:00:00:01Source MAC address.
ethertypeenum(16)34997 (local_experimental)Protocol number of the next layer (see Next layer)EtherType of the next layer (Auto from the layer above; 0x88b5 = local experimental with no known next layer). A value up to 0x05ff is an IEEE 802.3 length.

ethertype

ValueName
2048 (0x0800)ipv4
2054 (0x0806)arp
33024 (0x8100)vlan
34825 (0x8809)slow_protocols
34525 (0x86dd)ipv6
34887 (0x8847)mpls
34888 (0x8848)mpls_multicast
34915 (0x8863)pppoe_discovery
34916 (0x8864)pppoe_session
34958 (0x888e)eapol
34984 (0x88a8)qinq
34997 (0x88b5)local_experimental
35020 (0x88cc)lldp
35045 (0x88e5)macsec
35063 (0x88f7)ptp
35074 (0x8902)cfm

Next layer

The next layer is selected by ethertype; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
2054 (0x0806)arp
33024 (0x8100)dot1q
34984 (0x88a8)dot1ad
35020 (0x88cc)lldp
34958 (0x888e)eapol
34915 (0x8863)pppoe_discovery
34916 (0x8864)pppoe_session
34887 (0x8847)mpls
34888 (0x8848)mpls
35045 (0x88e5)macsec
35063 (0x88f7)ptp
35063 (0x88f7)ptp_sync
35063 (0x88f7)ptp_delay_req
35063 (0x88f7)ptp_pdelay_req
35063 (0x88f7)ptp_pdelay_resp
35063 (0x88f7)ptp_follow_up
35063 (0x88f7)ptp_delay_resp
35063 (0x88f7)ptp_pdelay_resp_follow_up
35063 (0x88f7)ptp_announce
35063 (0x88f7)ptp_signaling
35063 (0x88f7)ptp_management
35074 (0x8902)cfm
35074 (0x8902)cfm_ccm
35074 (0x8902)cfm_lbr
35074 (0x8902)cfm_lbm
35074 (0x8902)cfm_ltr
35074 (0x8902)cfm_ltm
35074 (0x8902)cfm_ais
35074 (0x8902)cfm_lck
35074 (0x8902)cfm_tst
35074 (0x8902)cfm_raps
35074 (0x8902)cfm_lmr
35074 (0x8902)cfm_lmm
35074 (0x8902)cfm_1dm
35074 (0x8902)cfm_dmr
35074 (0x8902)cfm_dmm
35074 (0x8902)cfm_csf
35074 (0x8902)cfm_1sl
35074 (0x8902)cfm_slr
35074 (0x8902)cfm_slm
0 (0x0000) – 1535 (0x05ff)dot3re-decodes this layer

First 8 bits of the payload when ethertype = 34825 (0x8809)

Sample templates

802.1Q VLAN (dot1q)

Reached from

Lower layerSelectorValue
ethernet2ethertype33024 (0x8100)
dot1qethertype33024 (0x8100)
dot1adethertype33024 (0x8100)
snappid33024 (0x8100)

Fields

FieldTypeDefaultAutoDescription
pcpuint(3)0Priority code point (802.1p class of service, 0 to 7).
deiuint(1)0Drop eligible indicator.
viduint(12)1VLAN identifier (1 to 4094; 0 = priority tag only, 4095 is reserved).
ethertypeenum(16)34997 (local_experimental)Protocol number of the next layer (see Next layer)EtherType of the layer after the tag (Auto; 0x8100 for another 802.1Q tag).

ethertype

ValueName
2048 (0x0800)ipv4
2054 (0x0806)arp
33024 (0x8100)vlan
34525 (0x86dd)ipv6
34997 (0x88b5)local_experimental
35045 (0x88e5)macsec
35063 (0x88f7)ptp
35074 (0x8902)cfm

Next layer

The next layer is selected by ethertype; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
2054 (0x0806)arp
33024 (0x8100)dot1q
34984 (0x88a8)dot1ad
35045 (0x88e5)macsec
35063 (0x88f7)ptp
35063 (0x88f7)ptp_sync
35063 (0x88f7)ptp_delay_req
35063 (0x88f7)ptp_pdelay_req
35063 (0x88f7)ptp_pdelay_resp
35063 (0x88f7)ptp_follow_up
35063 (0x88f7)ptp_delay_resp
35063 (0x88f7)ptp_pdelay_resp_follow_up
35063 (0x88f7)ptp_announce
35063 (0x88f7)ptp_signaling
35063 (0x88f7)ptp_management
35074 (0x8902)cfm
35074 (0x8902)cfm_ccm
35074 (0x8902)cfm_lbr
35074 (0x8902)cfm_lbm
35074 (0x8902)cfm_ltr
35074 (0x8902)cfm_ltm
35074 (0x8902)cfm_ais
35074 (0x8902)cfm_lck
35074 (0x8902)cfm_tst
35074 (0x8902)cfm_raps
35074 (0x8902)cfm_lmr
35074 (0x8902)cfm_lmm
35074 (0x8902)cfm_1dm
35074 (0x8902)cfm_dmr
35074 (0x8902)cfm_dmm
35074 (0x8902)cfm_csf
35074 (0x8902)cfm_1sl
35074 (0x8902)cfm_slr
35074 (0x8902)cfm_slm

Constraints

LevelRule
warningvid ≠ 4095

Sample templates

802.1ad S-VLAN (dot1ad)

  • Layer: L2 (data link)
  • Header: 4 octets (fixed)

Reached from

Lower layerSelectorValue
ethernet2ethertype34984 (0x88a8)
dot1qethertype34984 (0x88a8)
dot1adethertype34984 (0x88a8)

Fields

FieldTypeDefaultAutoDescription
pcpuint(3)0Priority code point (802.1p class of service, 0 to 7).
deiuint(1)0Drop eligible indicator.
viduint(12)1VLAN identifier (1 to 4094; 0 = priority tag only, 4095 is reserved).
ethertypeenum(16)33024 (vlan)Protocol number of the next layer (see Next layer)EtherType of the layer after the S-tag (Auto; normally 0x8100 for the 802.1Q C-tag).

ethertype

ValueName
2048 (0x0800)ipv4
2054 (0x0806)arp
33024 (0x8100)vlan
34525 (0x86dd)ipv6
34984 (0x88a8)qinq
34997 (0x88b5)local_experimental
35063 (0x88f7)ptp
35074 (0x8902)cfm

Next layer

The next layer is selected by ethertype; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
33024 (0x8100)dot1q
34984 (0x88a8)dot1ad
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
2054 (0x0806)arp
35063 (0x88f7)ptp
35063 (0x88f7)ptp_sync
35063 (0x88f7)ptp_delay_req
35063 (0x88f7)ptp_pdelay_req
35063 (0x88f7)ptp_pdelay_resp
35063 (0x88f7)ptp_follow_up
35063 (0x88f7)ptp_delay_resp
35063 (0x88f7)ptp_pdelay_resp_follow_up
35063 (0x88f7)ptp_announce
35063 (0x88f7)ptp_signaling
35063 (0x88f7)ptp_management
35074 (0x8902)cfm
35074 (0x8902)cfm_ccm
35074 (0x8902)cfm_lbr
35074 (0x8902)cfm_lbm
35074 (0x8902)cfm_ltr
35074 (0x8902)cfm_ltm
35074 (0x8902)cfm_ais
35074 (0x8902)cfm_lck
35074 (0x8902)cfm_tst
35074 (0x8902)cfm_raps
35074 (0x8902)cfm_lmr
35074 (0x8902)cfm_lmm
35074 (0x8902)cfm_1dm
35074 (0x8902)cfm_dmr
35074 (0x8902)cfm_dmm
35074 (0x8902)cfm_csf
35074 (0x8902)cfm_1sl
35074 (0x8902)cfm_slr
35074 (0x8902)cfm_slm

Constraints

LevelRule
warningvid ≠ 4095

Sample templates

IEEE 802.3 (dot3)

  • Layer: L2 (data link)
  • Header: 14 octets (fixed)
  • Minimum frame: 60 octets
  • Notes: L2 control protocols

Reached from

Lower layerSelectorValue
ethernet2ethertype0 (0x0000) – 1535 (0x05ff) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
dstmacff:ff:ff:ff:ff:ffDestination MAC address.
srcmac02:00:00:00:00:01Source MAC address.
lengthuint(16)Length of the payload in octetsLength of the LLC data in octets (Auto; at most 1500).

Next layer

The next layer is selected by length; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
(any other value)llc

Constraints

LevelRule
warninglength within 0..1500

Sample templates

  • interop-isis-l2-lan-hello-up — templates/interop/isis-l2-lan-hello-up.wpg.yaml
  • dot3-llc-osi — templates/protocols/l2/dot3-llc-osi.wpg.yaml
  • dot3-llc-snap-frame — templates/protocols/l2/dot3-llc-snap.wpg.yaml
  • dot3-llc-frame — templates/protocols/l2/dot3-llc.wpg.yaml
  • clnp-dt — templates/protocols/l3/clnp-dt.wpg.yaml
  • clnp-er — templates/protocols/l3/clnp-er.wpg.yaml
  • clnp-erq — templates/protocols/l3/clnp-erq.wpg.yaml
  • esis-esh — templates/protocols/routing/esis-esh.wpg.yaml
  • esis-generic — templates/protocols/routing/esis-generic.wpg.yaml
  • esis-ish — templates/protocols/routing/esis-ish.wpg.yaml
  • esis-rd — templates/protocols/routing/esis-rd.wpg.yaml
  • isis-generic — templates/protocols/routing/isis-generic.wpg.yaml
  • isis-l1-csnp — templates/protocols/routing/isis-l1-csnp.wpg.yaml
  • isis-l1-lan-hello — templates/protocols/routing/isis-l1-lan-hello.wpg.yaml
  • isis-l1-lsp — templates/protocols/routing/isis-l1-lsp.wpg.yaml
  • isis-l1-psnp — templates/protocols/routing/isis-l1-psnp.wpg.yaml
  • isis-l2-csnp — templates/protocols/routing/isis-l2-csnp.wpg.yaml
  • isis-l2-lan-hello — templates/protocols/routing/isis-l2-lan-hello.wpg.yaml
  • isis-l2-lsp — templates/protocols/routing/isis-l2-lsp.wpg.yaml
  • isis-l2-psnp — templates/protocols/routing/isis-l2-psnp.wpg.yaml
  • isis-p2p-hello — templates/protocols/routing/isis-p2p-hello.wpg.yaml

IEEE 802.2 LLC (llc)

Reached from

Lower layerSelectorValue
dot3length(any other value)

Fields

FieldTypeDefaultAutoDescription
dsapenum(8)170 (snap)Protocol number of the next layer (see Next layer)Destination service access point (Auto: 0xaa = SNAP, 0xfe = OSI, 0x42 = spanning tree).
ssapenum(8)170 (snap)Protocol number of the next layer (see Next layer)Source service access point (Auto, normally equal to DSAP).
controlenum(8)3 (ui)Control field; 0x03 = unnumbered information (UI).

dsap

ValueName
66 (0x42)stp
170 (0xaa)snap
224 (0xe0)ipx
240 (0xf0)netbios
254 (0xfe)osi
255 (0xff)global

ssap

ValueName
66 (0x42)stp
170 (0xaa)snap
224 (0xe0)ipx
240 (0xf0)netbios
254 (0xfe)osi

control

ValueName
3 (0x03)ui
175 (0xaf)xid
227 (0xe3)test

Next layer

The next layer is selected by dsap; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
170 (0xaa)snap
66 (0x42)stp

First 8 bits of the payload when dsap = 254 (0xfe)

ValueProtocol
129 (0x81)clnp
130 (0x82)esis
130 (0x82)esis_esh
130 (0x82)esis_ish
130 (0x82)esis_rd
131 (0x83)isis
131 (0x83)isis_l1_lan_hello
131 (0x83)isis_l2_lan_hello
131 (0x83)isis_p2p_hello
131 (0x83)isis_l1_lsp
131 (0x83)isis_l2_lsp
131 (0x83)isis_l1_csnp
131 (0x83)isis_l2_csnp
131 (0x83)isis_l1_psnp
131 (0x83)isis_l2_psnp
(any other value)osi

Sample templates

  • interop-isis-l2-lan-hello-up — templates/interop/isis-l2-lan-hello-up.wpg.yaml
  • dot3-llc-osi — templates/protocols/l2/dot3-llc-osi.wpg.yaml
  • dot3-llc-snap-frame — templates/protocols/l2/dot3-llc-snap.wpg.yaml
  • dot3-llc-frame — templates/protocols/l2/dot3-llc.wpg.yaml
  • clnp-dt — templates/protocols/l3/clnp-dt.wpg.yaml
  • clnp-er — templates/protocols/l3/clnp-er.wpg.yaml
  • clnp-erq — templates/protocols/l3/clnp-erq.wpg.yaml
  • esis-esh — templates/protocols/routing/esis-esh.wpg.yaml
  • esis-generic — templates/protocols/routing/esis-generic.wpg.yaml
  • esis-ish — templates/protocols/routing/esis-ish.wpg.yaml
  • esis-rd — templates/protocols/routing/esis-rd.wpg.yaml
  • isis-generic — templates/protocols/routing/isis-generic.wpg.yaml
  • isis-l1-csnp — templates/protocols/routing/isis-l1-csnp.wpg.yaml
  • isis-l1-lan-hello — templates/protocols/routing/isis-l1-lan-hello.wpg.yaml
  • isis-l1-lsp — templates/protocols/routing/isis-l1-lsp.wpg.yaml
  • isis-l1-psnp — templates/protocols/routing/isis-l1-psnp.wpg.yaml
  • isis-l2-csnp — templates/protocols/routing/isis-l2-csnp.wpg.yaml
  • isis-l2-lan-hello — templates/protocols/routing/isis-l2-lan-hello.wpg.yaml
  • isis-l2-lsp — templates/protocols/routing/isis-l2-lsp.wpg.yaml
  • isis-l2-psnp — templates/protocols/routing/isis-l2-psnp.wpg.yaml
  • isis-p2p-hello — templates/protocols/routing/isis-p2p-hello.wpg.yaml

SNAP (snap)

Reached from

Lower layerSelectorValue
llcdsap170 (0xaa)

Fields

FieldTypeDefaultAutoDescription
ouiuint(24)0Organisationally unique identifier; 0 means the protocol id is an EtherType.
pidenum(16)34997 (local_experimental)Protocol number of the next layer (see Next layer)Protocol id (an EtherType when the OUI is 0; Auto from the next layer).

pid

ValueName
2048 (0x0800)ipv4
2054 (0x0806)arp
8192 (0x2000)cdp
33024 (0x8100)vlan
34525 (0x86dd)ipv6
34997 (0x88b5)local_experimental

Next layer

The next layer is selected by pid; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
2054 (0x0806)arp
8192 (0x2000)cdp
33024 (0x8100)dot1q

Sample templates

ARP (arp)

  • Layer: L2 (data link)
  • Header: 28 octets (fixed)

Reached from

Lower layerSelectorValue
ethernet2ethertype2054 (0x0806)
dot1qethertype2054 (0x0806)
dot1adethertype2054 (0x0806)
snappid2054 (0x0806)

Fields

FieldTypeDefaultAutoDescription
htypeenum(16)1 (ethernet)Hardware type (1 = Ethernet).
ptypeenum(16)2048 (ipv4)Protocol type (EtherType, 0x0800 = IPv4).
hlenuint(8)6Hardware address length in bytes (6 for Ethernet).
plenuint(8)4Protocol address length in bytes (4 for IPv4).
operenum(16)1 (request)Operation (1 = request, 2 = reply).
shamac02:00:00:00:00:01Sender hardware address.
spaipv4192.0.2.1Sender protocol address.
thamac00:00:00:00:00:00Target hardware address.
tpaipv4192.0.2.2Target protocol address.

htype

ValueName
1 (0x0001)ethernet
6 (0x0006)ieee802
15 (0x000f)frame_relay
16 (0x0010)atm

ptype

ValueName
2048 (0x0800)ipv4
34525 (0x86dd)ipv6

oper

ValueName
1 (0x0001)request
2 (0x0002)reply
3 (0x0003)rarp_request
4 (0x0004)rarp_reply
8 (0x0008)inarp_request
9 (0x0009)inarp_reply

Constraints

LevelRule
warninghlen = 6
warningplen = 4
warningoper within 1..2

Sample templates

LLDP (lldp)

Reached from

Lower layerSelectorValue
ethernet2ethertype35020 (0x88cc)

Fields

FieldTypeDefaultAutoDescription
tlvslist<struct> — rest of the PDU4 itemsLLDP TLVs (7-bit type + 9-bit length header).

tlvs

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
typeuint(7)
lengthuint(9)
valuebytes — length octets

Sample templates

  • lldp — templates/protocols/l2/lldp.wpg.yaml

CDP (cdp)

Reached from

Lower layerSelectorValue
snappid8192 (0x2000)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)2CDP protocol version (2).
ttluint(8)180Time this advertisement stays valid, in seconds.
checksumuint(16)Internet checksum over the header and everything after itInternet checksum over the CDP header and TLVs (Auto).
tlvstlv — rest of the PDUCDP TLVs (16-bit type, 16-bit length including the header).

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)device_id
2 (0x0002)addresses
3 (0x0003)port_id
4 (0x0004)capabilities
5 (0x0005)software_version
6 (0x0006)platform
7 (0x0007)ip_prefix
10 (0x000a)native_vlan
11 (0x000b)duplex

Sample templates

  • cdp — templates/protocols/l2/cdp.wpg.yaml

STP BPDU (stp)

Reached from

Lower layerSelectorValue
llcdsap66 (0x42)

Fields

FieldTypeDefaultAutoDescription
protocol_iduint(16)0Spanning Tree protocol identifier (always 0).
protocol_versionenum(8)0 (stp)Protocol version (0 = STP, 2 = RSTP, 3 = MSTP).
bpdu_typeenum(8)0 (config)BPDU type (0 = configuration, 2 = RST/MST, 0x80 = TCN).
flagsflags(8)0x0BPDU flags (topology change, proposal, role, learning, forwarding, agreement, TCA).
root_priorityuint(16)32768Root bridge priority and system-id extension.
root_macmac00:00:00:00:00:00Root bridge MAC address.
root_path_costuint(32)0Cost of the path to the root bridge.
bridge_priorityuint(16)32768Sending bridge priority and system-id extension.
bridge_macmac00:00:00:00:00:00Sending bridge MAC address.
port_iduint(16)32769Sending port identifier (priority + number).
message_ageuint(16)0Age of the BPDU, in 1/256 seconds.
max_ageuint(16)5120Maximum BPDU age before timeout, in 1/256 seconds.
hello_timeuint(16)512Interval between configuration BPDUs, in 1/256 seconds.
forward_delayuint(16)3840Forwarding delay timer, in 1/256 seconds.
trailerbytes — rest of the PDU""RSTP / MSTP extension (version-1 length, v3 length, MSTI records); opaque octets.

protocol_version

ValueName
0 (0x00)stp
2 (0x02)rstp
3 (0x03)mstp

bpdu_type

ValueName
0 (0x00)config
2 (0x02)rapid
128 (0x80)topology_change

flags

BitMaskName
01 (0x01)topology_change
12 (0x02)proposal
416 (0x10)learning
532 (0x20)forwarding
664 (0x40)agreement
7128 (0x80)topology_change_ack

Constraints

LevelRule
warningprotocol_id = 0

Sample templates

  • stp — templates/protocols/l2/stp.wpg.yaml

LACP (lacp)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)1 (0x01)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)1Slow Protocols subtype (1 = LACP).
versionuint(8)1
actor_info_typeuint(8)1
actor_info_lengthuint(8)20
actor_system_priorityuint(16)32768
actor_systemmacActor system MAC address.
actor_keyuint(16)1
actor_port_priorityuint(16)32768
actor_portuint(16)1
actor_stateflags(8)0x45Actor state flags (activity, timeout, aggregation, sync, collecting, distributing, defaulted, expired).
actor_reservedbytes(3)00 00 00
partner_info_typeuint(8)2
partner_info_lengthuint(8)20
partner_system_priorityuint(16)32768
partner_systemmacPartner system MAC address.
partner_keyuint(16)1
partner_port_priorityuint(16)32768
partner_portuint(16)1
partner_stateflags(8)0x45Partner state flags.
partner_reservedbytes(3)00 00 00
collector_info_typeuint(8)3
collector_info_lengthuint(8)16
collector_max_delayuint(16)0
collector_reservedbytes(12)00 00 00 00 00 00 00 00 00 00 00 00
terminator_typeuint(8)0
terminator_lengthuint(8)0
terminator_reservedbytes(50)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

actor_state

BitMaskName
01 (0x01)activity
12 (0x02)timeout
24 (0x04)aggregation
38 (0x08)synchronization
416 (0x10)collecting
532 (0x20)distributing
664 (0x40)defaulted
7128 (0x80)expired

partner_state

BitMaskName
01 (0x01)activity
12 (0x02)timeout
24 (0x04)aggregation
38 (0x08)synchronization
416 (0x10)collecting
532 (0x20)distributing
664 (0x40)defaulted
7128 (0x80)expired

Sample templates

  • lacp — templates/protocols/l2/lacp.wpg.yaml

Marker Protocol (marker)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)2 (0x02)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)2Slow Protocols subtype (2 = Marker).
versionuint(8)1
info_typeuint(8)1
info_lengthuint(8)16
requester_portuint(16)1
requester_systemmac
requester_transaction_iduint(32)0
paduint(16)0
terminator_typeuint(8)0
terminator_lengthuint(8)0
reservedbytes(90)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Sample templates

  • marker — templates/protocols/l2/marker.wpg.yaml

EAPOL (eapol)

Reached from

Lower layerSelectorValue
ethernet2ethertype34958 (0x888e)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)2EAPOL protocol version.
typeenum(8)0 (eap)EAPOL packet type (0 = EAP, 1 = Start, 2 = Logoff, 3 = Key).
lengthuint(16)Length of the header in octets (-4)Length of the EAPOL body, in octets (Auto).
bodybytes — length octets""EAPOL body (the EAP packet for type 0); opaque octets.

type

ValueName
0 (0x00)eap
1 (0x01)start
2 (0x02)logoff
3 (0x03)key
4 (0x04)encapsulated_asf_alert

Sample templates

  • eapol — templates/protocols/l2/eapol.wpg.yaml

PPPoE Discovery (pppoe_discovery)

Reached from

Lower layerSelectorValue
ethernet2ethertype34915 (0x8863)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)1PPPoE protocol version (1).
typeuint(4)1PPPoE type (1).
codeenum(8)9 (padi)PPPoE code (PADI / PADO / PADR / PADS / PADT, 0 = session data).
session_iduint(16)0PPPoE session identifier.
lengthuint(16)Length of the header in octets (-6)Length of the PPPoE payload, in octets (Auto).
tagstlv — length octetsPPPoE discovery TAGs (16-bit type, 16-bit length).

code

ValueName
0 (0x00)session_data
9 (0x09)padi
7 (0x07)pado
25 (0x19)padr
101 (0x65)pads
167 (0xa7)padt

tags

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x0000)end_of_list
257 (0x0101)service_name
258 (0x0102)ac_name
259 (0x0103)host_uniq
260 (0x0104)ac_cookie
261 (0x0105)vendor_specific
272 (0x0110)relay_session_id
513 (0x0201)service_name_error
514 (0x0202)ac_system_error
515 (0x0203)generic_error

Sample templates

PPPoE Session (pppoe_session)

Reached from

Lower layerSelectorValue
ethernet2ethertype34916 (0x8864)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)1PPPoE protocol version (1).
typeuint(4)1PPPoE type (1).
codeuint(8)0PPPoE code (PADI / PADO / PADR / PADS / PADT, 0 = session data).
session_iduint(16)1PPPoE session identifier.
lengthuint(16)Length of the payload in octetsLength of the PPPoE payload, in octets (Auto).

Next layer

The next layer is selected by session_id; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
(any other value)ppp

Sample templates

PPP (ppp)

Reached from

Lower layerSelectorValue
pppoe_sessionsession_id(any other value)

Fields

FieldTypeDefaultAutoDescription
protocolenum(16)49185 (lcp)Protocol number of the next layer (see Next layer)PPP protocol identifier of the payload (LCP / IPCP / IP / IPv6 / …).

protocol

ValueName
33 (0x0021)ipv4
35 (0x0023)osi
87 (0x0057)ipv6
32801 (0x8021)ipcp
32855 (0x8057)ipv6cp
49185 (0xc021)lcp
49187 (0xc023)pap
49699 (0xc223)chap

Next layer

The next layer is selected by protocol; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
49185 (0xc021)ppp_lcp
32801 (0x8021)ppp_ipcp
33 (0x0021)ipv4
87 (0x0057)ipv6

First 8 bits of the payload when protocol = 35 (0x0023)

ValueProtocol
129 (0x81)clnp
130 (0x82)esis
130 (0x82)esis_esh
130 (0x82)esis_ish
130 (0x82)esis_rd
131 (0x83)isis
131 (0x83)isis_l1_lan_hello
131 (0x83)isis_l2_lan_hello
131 (0x83)isis_p2p_hello
131 (0x83)isis_l1_lsp
131 (0x83)isis_l2_lsp
131 (0x83)isis_l1_csnp
131 (0x83)isis_l2_csnp
131 (0x83)isis_l1_psnp
131 (0x83)isis_l2_psnp
(any other value)osi

Sample templates

PPP LCP (ppp_lcp)

Reached from

Lower layerSelectorValue
pppprotocol49185 (0xc021)

Fields

FieldTypeDefaultAutoDescription
codeenum(8)1 (configure_request)PPP control-protocol code (Configure-Request / Ack / Nak / …).
identifieruint(8)0PPP control-protocol request identifier.
lengthuint(16)Length of the header and payload in octetsLength of the PPP control-protocol packet, in octets (Auto).
optionstlv — length - 4 octetsPPP control-protocol options (8-bit type / length TLVs).

code

ValueName
1 (0x01)configure_request
2 (0x02)configure_ack
3 (0x03)configure_nak
4 (0x04)configure_reject
5 (0x05)terminate_request
6 (0x06)terminate_ack
7 (0x07)code_reject
8 (0x08)protocol_reject
9 (0x09)echo_request
10 (0x0a)echo_reply
11 (0x0b)discard_request

options

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)mrumru
2 (0x02)async_control_char_mapmap
3 (0x03)authentication_protocol
4 (0x04)quality_protocol
5 (0x05)magic_numbermagic
7 (0x07)protocol_field_compression
8 (0x08)address_control_compression

options › mru

FieldTypeDefaultAutoDescription
mruuint(16)

options › async_control_char_map

FieldTypeDefaultAutoDescription
mapuint(32)

options › magic_number

FieldTypeDefaultAutoDescription
magicuint(32)

Sample templates

  • pppoe-ppp-lcp — templates/protocols/l2/pppoe-ppp-lcp.wpg.yaml

PPP IPCP (ppp_ipcp)

Reached from

Lower layerSelectorValue
pppprotocol32801 (0x8021)

Fields

FieldTypeDefaultAutoDescription
codeenum(8)1 (configure_request)PPP control-protocol code (Configure-Request / Ack / Nak / …).
identifieruint(8)0PPP control-protocol request identifier.
lengthuint(16)Length of the header and payload in octetsLength of the PPP control-protocol packet, in octets (Auto).
optionstlv — length - 4 octetsPPP control-protocol options (8-bit type / length TLVs).

code

ValueName
1 (0x01)configure_request
2 (0x02)configure_ack
3 (0x03)configure_nak
4 (0x04)configure_reject
5 (0x05)terminate_request
6 (0x06)terminate_ack
7 (0x07)code_reject

options

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)ip_compression_protocol
3 (0x03)ip_addressaddress
129 (0x81)primary_dnsaddress
131 (0x83)secondary_dnsaddress

options › ip_address

FieldTypeDefaultAutoDescription
addressipv4

options › primary_dns

FieldTypeDefaultAutoDescription
addressipv4

options › secondary_dns

FieldTypeDefaultAutoDescription
addressipv4

Sample templates

VXLAN (vxlan)

Reached from

Lower layerSelectorValue
udpdst_port / src_port4789 (0x12b5)

Fields

FieldTypeDefaultAutoDescription
flagsflags(8)0x8VXLAN flags (I bit = VNI is valid).
reserved1uint(24)0
vniuint(24)024-bit VXLAN Network Identifier.
reserved2uint(8)0

flags

BitMaskName
38 (0x08)vni_present

Next layer

The next layer is selected by flags; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
(any other value)ethernet2

Sample templates

  • vxlan — templates/protocols/encap/vxlan.wpg.yaml

MPLS (mpls)

Reached from

Lower layerSelectorValue
ethernet2ethertype34887 (0x8847)
ethernet2ethertype34888 (0x8848)
udpdst_port / src_port6635 (0x19eb)
greprotocol_type34887 (0x8847)
mplss0

Fields

FieldTypeDefaultAutoDescription
labelenum(20)1620-bit MPLS label value. 0-15 are reserved (0 / 2 explicit null, 1 router alert, 3 implicit null, 7 entropy label indicator, 13 GAL, 14 OAM alert, 15 extension); SR-MPLS SIDs are SRGB base + SID index.
tcuint(3)03-bit traffic class (QoS / ECN).
suint(1)1Protocol number of the next layer (see Next layer)Bottom-of-stack bit (1 = last label; Auto from the next layer).
ttluint(8)64MPLS time to live.

label

ValueName
0 (0x00000)ipv4_explicit_null
1 (0x00001)router_alert
2 (0x00002)ipv6_explicit_null
3 (0x00003)implicit_null
7 (0x00007)entropy_label_indicator
13 (0x0000d)gal
14 (0x0000e)oam_alert
15 (0x0000f)extension

Next layer

The next layer is selected by s; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0mpls

First 4 bits of the payload when s = 1

ValueProtocol
4ipv4
6ipv6

Sample templates

Geneve (geneve)

Reached from

Lower layerSelectorValue
udpdst_port / src_port6081 (0x17c1)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)0Geneve version (0).
opt_lenuint(6)0Length of the options region, in 4-octet words.
o_flaguint(1)0OAM packet flag.
c_flaguint(1)0Critical options present flag.
reserved_flagsuint(6)0
protocol_typeenum(16)25944 (transparent_ethernet)Protocol number of the next layer (see Next layer)EtherType of the encapsulated payload.
vniuint(24)024-bit Geneve Virtual Network Identifier.
reserveduint(8)0
optionsbytes — opt_len * 4 octets""Geneve options (opaque; sized by opt_len).

protocol_type

ValueName
25944 (0x6558)transparent_ethernet
2048 (0x0800)ipv4
34525 (0x86dd)ipv6

Next layer

The next layer is selected by protocol_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
25944 (0x6558)ethernet2
2048 (0x0800)ipv4
34525 (0x86dd)ipv6

Sample templates

  • geneve — templates/protocols/encap/geneve.wpg.yaml

MACsec (macsec)

Reached from

Lower layerSelectorValue
ethernet2ethertype35045 (0x88e5)
dot1qethertype35045 (0x88e5)

Fields

FieldTypeDefaultAutoDescription
vuint(1)0TCI V bit: version (0).
esuint(1)0TCI ES bit: End Station (the SCI is the source MAC address with port 1).
scuint(1)Number of items of sciTCI SC bit: an explicit SCI is present (Auto: set when the SCI is given).
scbuint(1)0TCI SCB bit: EPON single copy broadcast.
euint(1)1TCI E bit: the secure data is encrypted.
cuint(1)1TCI C bit: the user data was changed (always with E for the default cipher suites).
anuint(2)0Association number (0-3): the secure association within the channel.
reserveduint(2)0
sluint(6)0Short length: the secure data length when it is below 48 octets, otherwise 0 (Manual).
pnuint(32)1Packet number (32 bits, the low half with XPN).
scilist<struct> — sc items1 itemsSecure Channel Identifier: system identifier (MAC address) and port identifier; present when SC is set.
secure_databytes — rest of the PDU except its last 16 octets00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2fSecure data: the encrypted (or integrity-only) user data as opaque octets; nothing is encrypted.
icvbytes(16)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Integrity Check Value (16 octets), opaque: it is not computed.

sci

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
system_identifiermac02:00:00:00:00:01
port_identifieruint(16)1

Constraints

LevelRule
warningv = 0
warningpn ≠ 0

Sample templates

  • macsec — templates/protocols/l2/macsec.wpg.yaml

ESMC (esmc)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)10 (0x0a)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)10Slow Protocols subtype (0x0a = organization specific).
itu_ouiuint(24)6567ITU-T OUI (00-19-a7).
itu_subtypeuint(16)1ITU-T subtype (1 = ESMC).
versionuint(4)1ESMC version (1).
event_flaguint(1)0Event flag: 1 for an event PDU sent at once after a QL change, 0 for the once-a-second information PDU.
reserveduint(3)0
reserved2uint(24)0
tlvstlv — rest of the PDU2 itemsTLVs (8-bit type, 16-bit length including the 3-octet header, Auto): QL TLV with the SSM code, Extended QL TLV with the enhanced SSM code, SyncE clock identity and cascaded clock counts. Octets after them (padding) are kept as one raw item.

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the type and length fields too.
  • An unknown type ends the typed decoding (the rest becomes one raw item).
TypeNameValue fieldsDescription
1 (0x01)qlunused, ssm_code
2 (0x02)extended_qlenhanced_ssm_code, synce_clock_identity, flags, cascaded_eeecs, cascaded_eecs, reserved

tlvs › ql

FieldTypeDefaultAutoDescription
unuseduint(4)0
ssm_codeenum(4)2 (prc)
tlvs › ql › ssm_code
ValueName
0stu
1prs
2prc
4ssu_a
7st2
8ssu_b
10st3
11sec
12smc
13st3e
14prov
15dnu

tlvs › extended_ql

FieldTypeDefaultAutoDescription
enhanced_ssm_codeenum(8)255 (none)
synce_clock_identityuint(64)144116287553929217
flagsflags(8)0x0
cascaded_eeecsuint(8)1
cascaded_eecsuint(8)0
reservedbytes(5)00 00 00 00 00
tlvs › extended_ql › enhanced_ssm_code
ValueName
32 (0x20)eprtc
33 (0x21)prtc
34 (0x22)eeec
35 (0x23)eprc
255 (0xff)none
tlvs › extended_ql › flags
BitMaskName
01 (0x01)mixed_eec_eeec
12 (0x02)partial_chain

Constraints

LevelRule
warningsubtype = 10
warningitu_oui = 6567
warningversion = 1

Sample templates

  • esmc-event-dnu — templates/protocols/timing/esmc-event-dnu.wpg.yaml
  • esmc-ql-prc — templates/protocols/timing/esmc-ql-prc.wpg.yaml

CFM (cfm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)3 (lbm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)4Offset of the first TLV from the end of this field (constant for each OpCode).
databytes — rest of the PDU00 00 00 01 00Rest of the PDU after the first TLV offset, as octets (OpCode specific fields and TLVs).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

Next layer

The next layer is selected by opcode; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)cfm_ccmre-decodes this layer
2 (0x02)cfm_lbrre-decodes this layer
3 (0x03)cfm_lbmre-decodes this layer
4 (0x04)cfm_ltrre-decodes this layer
5 (0x05)cfm_ltmre-decodes this layer
33 (0x21)cfm_aisre-decodes this layer
35 (0x23)cfm_lckre-decodes this layer
37 (0x25)cfm_tstre-decodes this layer
40 (0x28)cfm_rapsre-decodes this layer
42 (0x2a)cfm_lmrre-decodes this layer
43 (0x2b)cfm_lmmre-decodes this layer
45 (0x2d)cfm_1dmre-decodes this layer
46 (0x2e)cfm_dmrre-decodes this layer
47 (0x2f)cfm_dmmre-decodes this layer
52 (0x34)cfm_csfre-decodes this layer
53 (0x35)cfm_1slre-decodes this layer
54 (0x36)cfm_slrre-decodes this layer
55 (0x37)cfm_slmre-decodes this layer

Sample templates

  • cfm-generic — templates/protocols/oam/cfm-generic.wpg.yaml

CFM CCM (cfm_ccm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode1 (0x01) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)1 (ccm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
rdiuint(1)0RDI: remote defect indication.
flags_reserveduint(4)0
periodenum(3)4 (s_1)Transmission period: 1 = 3.33 ms, 2 = 10 ms, 3 = 100 ms, 4 = 1 s, 5 = 10 s, 6 = 1 min, 7 = 10 min.
first_tlv_offsetuint(8)70Offset of the first TLV from the end of this field (constant for each OpCode).
sequence_numberuint(32)0Sequence number.
mep_id_reserveduint(3)0
mep_iduint(13)1MEP ID (1-8191).
maidbytes(48)01 20 0d 57 50 47 30 30 31 4d 45 47 30 30 30 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00MAID / MEG ID, 48 octets: MD name format and name, short MA name format, length and name, zero padded (Y.1731: no MD name, format 32 ICC-based, length 13).
tx_fcfuint(32)0Frame counter (loss measurement).
rx_fcbuint(32)0Frame counter (loss measurement).
tx_fcbuint(32)0Frame counter (loss measurement).
reserveduint(32)0
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

period

ValueName
0invalid
1ms_3_33
2ms_10
3ms_100
4s_1
5s_10
6min_1
7min_10

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 70

Sample templates

  • cfm-ccm — templates/protocols/oam/cfm-ccm.wpg.yaml

CFM LBM (cfm_lbm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode3 (0x03) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)3 (lbm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)4Offset of the first TLV from the end of this field (constant for each OpCode).
transaction_iduint(32)1Loopback / linktrace transaction identifier.
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 4

Sample templates

  • cfm-lbm — templates/protocols/oam/cfm-lbm.wpg.yaml

CFM LBR (cfm_lbr)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode2 (0x02) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)2 (lbr)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)4Offset of the first TLV from the end of this field (constant for each OpCode).
transaction_iduint(32)1Loopback / linktrace transaction identifier.
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 4

Sample templates

  • cfm-lbr — templates/protocols/oam/cfm-lbr.wpg.yaml

CFM LTM (cfm_ltm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode5 (0x05) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)5 (ltm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
use_fdb_onlyuint(1)1UseFDBonly: the forwarding database alone decides the egress port.
flags_reserveduint(7)0
first_tlv_offsetuint(8)17Offset of the first TLV from the end of this field (constant for each OpCode).
transaction_iduint(32)1Loopback / linktrace transaction identifier.
ttluint(8)64Linktrace TTL.
original_macmac02:00:00:00:00:01MAC address of the MEP that started the linktrace.
target_macmac02:00:00:00:00:02Target MAC address of the linktrace.
tlvstlv — up to and including the first item of type 0, or the end of the PDU2 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 17

Sample templates

  • cfm-ltm — templates/protocols/oam/cfm-ltm.wpg.yaml

CFM LTR (cfm_ltr)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode4 (0x04) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)4 (ltr)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
use_fdb_onlyuint(1)1UseFDBonly: the forwarding database alone decides the egress port.
fwd_yesuint(1)0FwdYes: the LTM was relayed.
terminal_mepuint(1)1TerminalMEP: the reply comes from the target MEP.
flags_reserveduint(5)0
first_tlv_offsetuint(8)6Offset of the first TLV from the end of this field (constant for each OpCode).
transaction_iduint(32)1Loopback / linktrace transaction identifier.
reply_ttluint(8)63Linktrace TTL.
relay_actionenum(8)1 (rly_hit)Relay action: 1 RlyHit, 2 RlyFDB, 3 RlyMPDB.
tlvstlv — up to and including the first item of type 0, or the end of the PDU3 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

relay_action

ValueName
1 (0x01)rly_hit
2 (0x02)rly_fdb
3 (0x03)rly_mpdb

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 6

Sample templates

  • cfm-ltr — templates/protocols/oam/cfm-ltr.wpg.yaml

Y.1731 AIS (cfm_ais)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode33 (0x21) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)33 (ais)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flags_reserveduint(5)0
periodenum(3)4 (s_1)Transmission period: 1 = 3.33 ms, 2 = 10 ms, 3 = 100 ms, 4 = 1 s, 5 = 10 s, 6 = 1 min, 7 = 10 min.
first_tlv_offsetuint(8)0Offset of the first TLV from the end of this field (constant for each OpCode).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

period

ValueName
0invalid
1ms_3_33
2ms_10
3ms_100
4s_1
5s_10
6min_1
7min_10

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 0

Sample templates

  • y1731-ais — templates/protocols/oam/y1731-ais.wpg.yaml

Y.1731 LCK (cfm_lck)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode35 (0x23) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)35 (lck)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flags_reserveduint(5)0
periodenum(3)4 (s_1)Transmission period: 1 = 3.33 ms, 2 = 10 ms, 3 = 100 ms, 4 = 1 s, 5 = 10 s, 6 = 1 min, 7 = 10 min.
first_tlv_offsetuint(8)0Offset of the first TLV from the end of this field (constant for each OpCode).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

period

ValueName
0invalid
1ms_3_33
2ms_10
3ms_100
4s_1
5s_10
6min_1
7min_10

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 0

Sample templates

  • y1731-lck — templates/protocols/oam/y1731-lck.wpg.yaml

Y.1731 TST (cfm_tst)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode37 (0x25) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)37 (tst)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)4Offset of the first TLV from the end of this field (constant for each OpCode).
sequence_numberuint(32)0Sequence number.
tlvstlv — up to and including the first item of type 0, or the end of the PDU2 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 4

Sample templates

  • y1731-tst — templates/protocols/oam/y1731-tst.wpg.yaml

ERPS R-APS (cfm_raps)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode40 (0x28) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)1CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)40 (ring_aps)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)32Offset of the first TLV from the end of this field (constant for each OpCode).
request_stateenum(4)0 (nr)Request / state: 0000 NR, 0111 MS, 1011 SF, 1101 FS, 1110 Event.
sub_codeuint(4)0Sub-code (0000 = flush request with the Event request).
rbuint(1)1RB: the RPL is blocked.
dnfuint(1)0DNF: do not flush the forwarding database.
bpruint(1)0BPR: blocked port reference (0 = ring link 0, 1 = ring link 1).
status_reserveduint(5)0
node_idmac02:00:00:00:00:01Node ID: MAC address of the sending ring node.
reservedbytes(24)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

request_state

ValueName
0nr
7ms
11sf
13fs
14event

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 32

Sample templates

Y.1731 LMM (cfm_lmm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode43 (0x2b) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)43 (lmm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)12Offset of the first TLV from the end of this field (constant for each OpCode).
tx_fcfuint(32)0Frame counter (loss measurement).
rx_fcfuint(32)0Frame counter (loss measurement).
tx_fcbuint(32)0Frame counter (loss measurement).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 12

Sample templates

  • y1731-lmm — templates/protocols/oam/y1731-lmm.wpg.yaml

Y.1731 LMR (cfm_lmr)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode42 (0x2a) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)42 (lmr)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)12Offset of the first TLV from the end of this field (constant for each OpCode).
tx_fcfuint(32)0Frame counter (loss measurement).
rx_fcfuint(32)0Frame counter (loss measurement).
tx_fcbuint(32)0Frame counter (loss measurement).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 12

Sample templates

  • y1731-lmr — templates/protocols/oam/y1731-lmr.wpg.yaml

Y.1731 1DM (cfm_1dm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode45 (0x2d) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)45 (one_dm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)16Offset of the first TLV from the end of this field (constant for each OpCode).
tx_timestamp_f_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_f_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_f_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_f_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 16

Sample templates

  • y1731-1dm — templates/protocols/oam/y1731-1dm.wpg.yaml

Y.1731 DMM (cfm_dmm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode47 (0x2f) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)47 (dmm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)32Offset of the first TLV from the end of this field (constant for each OpCode).
tx_timestamp_f_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_f_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_f_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_f_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_b_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_b_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_b_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_b_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 32

Sample templates

  • y1731-dmm — templates/protocols/oam/y1731-dmm.wpg.yaml

Y.1731 DMR (cfm_dmr)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode46 (0x2e) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)46 (dmr)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)32Offset of the first TLV from the end of this field (constant for each OpCode).
tx_timestamp_f_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_f_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_f_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_f_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_b_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tx_timestamp_b_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_b_secondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
rx_timestamp_b_nanosecondsuint(32)0Timestamp in the IEEE 1588 format (32-bit seconds and nanoseconds).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 32

Sample templates

  • y1731-dmr — templates/protocols/oam/y1731-dmr.wpg.yaml

Y.1731 CSF (cfm_csf)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode52 (0x34) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)52 (csf)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flags_reserveduint(2)0
typeenum(3)0 (los)Client signal fail type: 0 LOS, 1 FDI / AIS, 2 RDI, 3 DCI.
periodenum(3)4 (s_1)Transmission period: 1 = 3.33 ms, 2 = 10 ms, 3 = 100 ms, 4 = 1 s, 5 = 10 s, 6 = 1 min, 7 = 10 min.
first_tlv_offsetuint(8)0Offset of the first TLV from the end of this field (constant for each OpCode).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

type

ValueName
0los
1fdi_ais
2rdi
3dci

period

ValueName
0invalid
1ms_3_33
2ms_10
3ms_100
4s_1
5s_10
6min_1
7min_10

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 0

Sample templates

  • y1731-csf — templates/protocols/oam/y1731-csf.wpg.yaml

Y.1731 SLM (cfm_slm)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode55 (0x37) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)55 (slm)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)16Offset of the first TLV from the end of this field (constant for each OpCode).
source_mep_iduint(16)1Source MEP ID.
responder_mep_iduint(16)0Responder MEP ID (0 in an SLM).
test_iduint(32)1Test ID of the synthetic loss measurement.
tx_fcfuint(32)0Frame counter (loss measurement).
tx_fcbuint(32)0Frame counter (loss measurement).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 16

Sample templates

  • y1731-slm — templates/protocols/oam/y1731-slm.wpg.yaml

Y.1731 SLR (cfm_slr)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode54 (0x36) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)54 (slr)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)16Offset of the first TLV from the end of this field (constant for each OpCode).
source_mep_iduint(16)1Source MEP ID.
responder_mep_iduint(16)0Responder MEP ID (0 in an SLM).
test_iduint(32)1Test ID of the synthetic loss measurement.
tx_fcfuint(32)0Frame counter (loss measurement).
tx_fcbuint(32)0Frame counter (loss measurement).
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 16

Sample templates

  • y1731-slr — templates/protocols/oam/y1731-slr.wpg.yaml

Y.1731 1SL (cfm_1sl)

Reached from

Lower layerSelectorValue
ethernet2ethertype35074 (0x8902)
dot1qethertype35074 (0x8902)
dot1adethertype35074 (0x8902)
cfmopcode53 (0x35) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
md_leveluint(3)0Maintenance domain / MEG level (0-7).
versionuint(5)0CFM version (0; 1 for R-APS of G.8032v2).
opcodeenum(8)53 (one_sl)OpCode: 1 CCM, 2 LBR, 3 LBM, 4 LTR, 5 LTM, 33 AIS, 35 LCK, 37 TST, 39 Linear APS, 40 R-APS, 41 MCC, 42 LMR, 43 LMM, 45 1DM, 46 DMR, 47 DMM, 52 CSF, 53 1SL, 54 SLR, 55 SLM …
flagsuint(8)0Flags (OpCode specific).
first_tlv_offsetuint(8)16Offset of the first TLV from the end of this field (constant for each OpCode).
source_mep_iduint(16)1Source MEP ID.
reserveduint(16)0
test_iduint(32)1Test ID of the synthetic loss measurement.
tx_fcfuint(32)0Frame counter (loss measurement).
reserved2uint(32)0
tlvstlv — up to and including the first item of type 0, or the end of the PDU1 itemsTLVs (8-bit type, 16-bit length of the value, Auto): Sender ID, Port Status, Data, Interface Status, Reply Ingress / Egress, LTM / LTR Egress Identifier, Organization-Specific, Test, closed by the End TLV (type 0).

opcode

ValueName
1 (0x01)ccm
2 (0x02)lbr
3 (0x03)lbm
4 (0x04)ltr
5 (0x05)ltm
33 (0x21)ais
35 (0x23)lck
37 (0x25)tst
39 (0x27)linear_aps
40 (0x28)ring_aps
41 (0x29)mcc
42 (0x2a)lmr
43 (0x2b)lmm
45 (0x2d)one_dm
46 (0x2e)dmr
47 (0x2f)dmm
48 (0x30)exr
49 (0x31)exm
50 (0x32)vsr
51 (0x33)vsm
52 (0x34)csf
53 (0x35)one_sl
54 (0x36)slr
55 (0x37)slm

tlvs

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)sender_idchassis_id_length, chassis_id_subtype, chassis_id, management_address
2 (0x02)port_statusport_status
3 (0x03)data_tlvvalue
4 (0x04)interface_statusinterface_status
5 (0x05)reply_ingressingress_action, ingress_mac, ingress_port_id
6 (0x06)reply_egressegress_action, egress_mac, egress_port_id
7 (0x07)ltm_egress_identifieregress_identifier
8 (0x08)ltr_egress_identifierlast_egress_identifier, next_egress_identifier
31 (0x1f)organization_specificoui, subtype, value
32 (0x20)testpattern_type, test_pattern

tlvs › sender_id

FieldTypeDefaultAutoDescription
chassis_id_lengthuint(8)Size of chassis_id in octets
chassis_id_subtypeenum(8)4 (mac_address)
chassis_idbytes — chassis_id_length octets02 00 00 00 00 01
management_addressbytes — rest of the PDU
tlvs › sender_id › chassis_id_subtype
ValueName
1 (0x01)chassis_component
2 (0x02)interface_alias
3 (0x03)port_component
4 (0x04)mac_address
5 (0x05)network_address
6 (0x06)interface_name
7 (0x07)local

tlvs › port_status

FieldTypeDefaultAutoDescription
port_statusenum(8)2 (up)
tlvs › port_status › port_status
ValueName
1 (0x01)blocked
2 (0x02)up

tlvs › data_tlv

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

tlvs › interface_status

FieldTypeDefaultAutoDescription
interface_statusenum(8)1 (up)
tlvs › interface_status › interface_status
ValueName
1 (0x01)up
2 (0x02)down
3 (0x03)testing
4 (0x04)unknown
5 (0x05)dormant
6 (0x06)not_present
7 (0x07)lower_layer_down

tlvs › reply_ingress

FieldTypeDefaultAutoDescription
ingress_actionenum(8)1 (ok)
ingress_macmac02:00:00:00:00:02
ingress_port_idbytes — rest of the PDU
tlvs › reply_ingress › ingress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › reply_egress

FieldTypeDefaultAutoDescription
egress_actionenum(8)1 (ok)
egress_macmac02:00:00:00:00:02
egress_port_idbytes — rest of the PDU
tlvs › reply_egress › egress_action
ValueName
1 (0x01)ok
2 (0x02)down
3 (0x03)blocked
4 (0x04)vid

tlvs › ltm_egress_identifier

FieldTypeDefaultAutoDescription
egress_identifieruint(64)2199023255553

tlvs › ltr_egress_identifier

FieldTypeDefaultAutoDescription
last_egress_identifieruint(64)2199023255553
next_egress_identifieruint(64)2199023255554

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
subtypeuint(8)
valuebytes — rest of the PDU

tlvs › test

FieldTypeDefaultAutoDescription
pattern_typeenum(8)
test_patternbytes — rest of the PDU
tlvs › test › pattern_type
ValueName
0 (0x00)null_without_crc
1 (0x01)null_with_crc
2 (0x02)prbs_without_crc
3 (0x03)prbs_with_crc

Constraints

LevelRule
warningfirst_tlv_offset = 16

Sample templates

  • y1731-1sl — templates/protocols/oam/y1731-1sl.wpg.yaml

802.3ah OAM (efm_oam)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)0 (information)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
databytes — rest of the PDU""Rest of the OAMPDU, as octets.

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

Next layer

The next layer is selected by code; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)efm_oam_informationre-decodes this layer
1 (0x01)efm_oam_event_notificationre-decodes this layer
2 (0x02)efm_oam_variable_requestre-decodes this layer
3 (0x03)efm_oam_variable_responsere-decodes this layer
4 (0x04)efm_oam_loopback_controlre-decodes this layer
254 (0xfe)efm_oam_organization_specificre-decodes this layer

Sample templates

802.3ah OAM Information (efm_oam_information)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)
efm_oamcode0 (0x00) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)0 (information)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
tlvstlv — up to and including the first item of type 0, or the end of the PDU2 itemsInformation TLVs (8-bit type, 8-bit length including the header, Auto): Local / Remote Information, Organization Specific, closed by the End TLV (type 0).

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)local_informationoam_version, revision, state_reserved, multiplexer_action, parser_action, oam_configuration, oampdu_configuration_reserved, max_oampdu_size, oui, vendor_specific_information
2 (0x02)remote_informationoam_version, revision, state_reserved, multiplexer_action, parser_action, oam_configuration, oampdu_configuration_reserved, max_oampdu_size, oui, vendor_specific_information
254 (0xfe)organization_specificoui, value

tlvs › local_information

FieldTypeDefaultAutoDescription
oam_versionuint(8)1
revisionuint(16)0
state_reserveduint(5)0
multiplexer_actionenum(1)0 (forward)
parser_actionenum(2)0 (forward)
oam_configurationflags(8)0x9
oampdu_configuration_reserveduint(5)0
max_oampdu_sizeuint(11)1518
ouiuint(24)0
vendor_specific_informationuint(32)0
tlvs › local_information › multiplexer_action
ValueName
0forward
1discard
tlvs › local_information › parser_action
ValueName
0forward
1loopback
2discard
tlvs › local_information › oam_configuration
BitMaskName
01 (0x01)active_mode
12 (0x02)unidirectional
24 (0x04)remote_loopback
38 (0x08)link_events
416 (0x10)variable_retrieval

tlvs › remote_information

FieldTypeDefaultAutoDescription
oam_versionuint(8)1
revisionuint(16)0
state_reserveduint(5)0
multiplexer_actionenum(1)0 (forward)
parser_actionenum(2)0 (forward)
oam_configurationflags(8)0x9
oampdu_configuration_reserveduint(5)0
max_oampdu_sizeuint(11)1518
ouiuint(24)0
vendor_specific_informationuint(32)0
tlvs › remote_information › multiplexer_action
ValueName
0forward
1discard
tlvs › remote_information › parser_action
ValueName
0forward
1loopback
2discard
tlvs › remote_information › oam_configuration
BitMaskName
01 (0x01)active_mode
12 (0x02)unidirectional
24 (0x04)remote_loopback
38 (0x08)link_events
416 (0x10)variable_retrieval

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
valuebytes — rest of the PDU

Sample templates

802.3ah OAM Event Notification (efm_oam_event_notification)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)
efm_oamcode1 (0x01) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)1 (event_notification)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
sequence_numberuint(16)1Event notification sequence number.
tlvstlv — up to and including the first item of type 0, or the end of the PDU2 itemsLink event TLVs (8-bit type, 8-bit length including the header, Auto): errored symbol period, errored frame, errored frame period, errored frame seconds summary, Organization Specific, closed by the End TLV (type 0).

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)end(type only, no length or value)
1 (0x01)errored_symbol_periodtimestamp, window, threshold, errors, error_running_total, event_running_total
2 (0x02)errored_frametimestamp, window, threshold, errors, error_running_total, event_running_total
3 (0x03)errored_frame_periodtimestamp, window, threshold, errors, error_running_total, event_running_total
4 (0x04)errored_frame_seconds_summarytimestamp, window, threshold, errors, error_running_total, event_running_total
254 (0xfe)organization_specificoui, value

tlvs › errored_symbol_period

FieldTypeDefaultAutoDescription
timestampuint(16)0
windowuint(64)10
thresholduint(64)1
errorsuint(64)1
error_running_totaluint(64)1
event_running_totaluint(32)1

tlvs › errored_frame

FieldTypeDefaultAutoDescription
timestampuint(16)0
windowuint(16)10
thresholduint(32)1
errorsuint(32)1
error_running_totaluint(64)1
event_running_totaluint(32)1

tlvs › errored_frame_period

FieldTypeDefaultAutoDescription
timestampuint(16)0
windowuint(32)10
thresholduint(32)1
errorsuint(32)1
error_running_totaluint(64)1
event_running_totaluint(32)1

tlvs › errored_frame_seconds_summary

FieldTypeDefaultAutoDescription
timestampuint(16)0
windowuint(16)10
thresholduint(16)1
errorsuint(16)1
error_running_totaluint(32)1
event_running_totaluint(32)1

tlvs › organization_specific

FieldTypeDefaultAutoDescription
ouiuint(24)
valuebytes — rest of the PDU

Sample templates

  • efm-oam-event — templates/protocols/oam/efm-oam-event.wpg.yaml

802.3ah OAM Variable Request (efm_oam_variable_request)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)
efm_oamcode2 (0x02) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)2 (variable_request)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
variable_descriptorsbytes — rest of the PDU07 00 02 00Variable descriptors as octets: branch (1 octet) and leaf (2 octets) each, closed by a zero branch.

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

Sample templates

802.3ah OAM Variable Response (efm_oam_variable_response)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)
efm_oamcode3 (0x03) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)3 (variable_response)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
variable_containersbytes — rest of the PDU07 00 02 04 00 00 00 2a 00Variable containers as octets: branch, leaf, width and value each, closed by a zero branch.

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

Sample templates

802.3ah OAM Loopback Control (efm_oam_loopback_control)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)
efm_oamcode4 (0x04) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)4 (loopback_control)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
remote_loopback_commandenum(8)1 (enable)Remote loopback command: 1 enable, 2 disable.

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

remote_loopback_command

ValueName
1 (0x01)enable
2 (0x02)disable

Sample templates

802.3ah OAM Organization Specific (efm_oam_organization_specific)

Reached from

Lower layerSelectorValue
ethernet2First 8 bits of the payload when ethertype = 34825 (0x8809)3 (0x03)
efm_oamcode254 (0xfe) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
subtypeuint(8)3Slow Protocols subtype (3 = OAM).
flagsflags(16)0x50Flags: link fault, dying gasp, critical event, local / remote evaluating and stable.
codeenum(8)254 (organization_specific)OAMPDU code: 0x00 Information, 0x01 Event Notification, 0x02 Variable Request, 0x03 Variable Response, 0x04 Loopback Control, 0xfe Organization Specific.
ouiuint(24)0Organizationally unique identifier.
databytes — rest of the PDU""Rest of the OAMPDU, as octets.

flags

BitMaskName
01 (0x0001)link_fault
12 (0x0002)dying_gasp
24 (0x0004)critical_event
38 (0x0008)local_evaluating
416 (0x0010)local_stable
532 (0x0020)remote_evaluating
664 (0x0040)remote_stable

code

ValueName
0 (0x00)information
1 (0x01)event_notification
2 (0x02)variable_request
3 (0x03)variable_response
4 (0x04)loopback_control
254 (0xfe)organization_specific

Sample templates

IPv4 (ipv4)

Reached from

Lower layerSelectorValue
ethernet2ethertype2048 (0x0800)
dot1qethertype2048 (0x0800)
dot1adethertype2048 (0x0800)
snappid2048 (0x0800)
ipv4protocol4 (0x04)
ipv6next_header4 (0x04)
ipv6_hopoptsnext_header4 (0x04)
ipv6_routenext_header4 (0x04)
ipv6_srhnext_header4 (0x04)
ipv6_fragnext_header4 (0x04)
ipv6_dstoptsnext_header4 (0x04)
pppprotocol33 (0x0021)
greprotocol_type2048 (0x0800)
mplsFirst 4 bits of the payload when s = 14
gtpuFirst 4 bits of the payload when message_type = 255 (0xff)4
geneveprotocol_type2048 (0x0800)
pim_registerFirst 4 bits of the payload when type = 14

Fields

FieldTypeDefaultAutoDescription
versionuint(4)4IP version, always 4.
ihluint(4)Length of the header in 32-bit wordsHeader length in 32-bit words, 5 to 15 (Auto, includes the options).
dscpuint(6)0Differentiated services code point (QoS class, 0 to 63).
ecnuint(2)0Explicit congestion notification (0 = not ECT, 1 / 2 = ECT, 3 = CE).
total_lengthuint(16)Length of the header and payload in octetsTotal length of header and payload in octets (Auto).
identificationuint(16)0Identification shared by the fragments of one datagram.
flagsflags(3)0x0Flags: DF (don’t fragment) and MF (more fragments); the top bit is reserved.
frag_offsetuint(13)0Offset of this fragment in 8-octet units.
ttluint(8)64Time to live; decremented at every router, 0 is never sent.
protocolenum(8)253 (experimental)Protocol number of the next layer (see Next layer)Protocol number of the next layer (Auto; 253 = experimental when none is known).
header_checksumuint(16)Internet checksum over the headerInternet checksum over the header (Auto).
srcipv4192.0.2.1Source IPv4 address.
dstipv4192.0.2.2Destination IPv4 address.
optionstlv — ihl * 4 - 20 octetsIPv4 options as TLVs (EOL, NOP, security, record route, timestamp…).
paddingpadding(4)Zero padding of the options to a 32-bit boundary (Auto).

flags

BitMaskName
24reserved
12df
01mf

protocol

ValueName
1 (0x01)icmp
2 (0x02)igmp
4 (0x04)ipip
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
46 (0x2e)rsvp
47 (0x2f)gre
50 (0x32)esp
51 (0x33)ah
58 (0x3a)ipv6_icmp
88 (0x58)eigrp
89 (0x59)ospf
103 (0x67)pim
112 (0x70)vrrp
115 (0x73)l2tp
132 (0x84)sctp
253 (0xfd)experimental

options

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)eol(type only, no length or value)
1 (0x01)nop(type only, no length or value)
148 (0x94)router_alertvalue

options › router_alert

FieldTypeDefaultAutoDescription
valueuint(16)

Next layer

The next layer is selected by protocol; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)icmpv4
2 (0x02)igmp
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
46 (0x2e)rsvp
47 (0x2f)gre
88 (0x58)eigrp
89 (0x59)ospfv2
103 (0x67)pim
103 (0x67)pim_register
112 (0x70)vrrpv3
112 (0x70)vrrpv2
115 (0x73)l2tpv3
132 (0x84)sctp

Constraints

LevelRule
warningversion = 4
errorihl within 5..15
warningttl ≠ 0

Sample templates

IPv6 (ipv6)

Reached from

Lower layerSelectorValue
ethernet2ethertype34525 (0x86dd)
dot1qethertype34525 (0x86dd)
dot1adethertype34525 (0x86dd)
snappid34525 (0x86dd)
ipv4protocol41 (0x29)
ipv6next_header41 (0x29)
ipv6_hopoptsnext_header41 (0x29)
ipv6_routenext_header41 (0x29)
ipv6_srhnext_header41 (0x29)
ipv6_fragnext_header41 (0x29)
ipv6_dstoptsnext_header41 (0x29)
pppprotocol87 (0x0057)
greprotocol_type34525 (0x86dd)
mplsFirst 4 bits of the payload when s = 16
gtpuFirst 4 bits of the payload when message_type = 255 (0xff)6
geneveprotocol_type34525 (0x86dd)
pim_registerFirst 4 bits of the payload when type = 16

Fields

FieldTypeDefaultAutoDescription
versionuint(4)6IP version, always 6.
dscpuint(6)0Differentiated services code point (QoS class, 0 to 63).
ecnuint(2)0Explicit congestion notification (0 = not ECT, 1 / 2 = ECT, 3 = CE).
flow_labeluint(20)0Flow label (20 bits) identifying a flow for routers; 0 = none.
payload_lengthuint(16)Length of the payload in octetsLength of everything after this header, including extension headers (Auto).
next_headerenum(8)253 (experimental)Protocol number of the next layer (see Next layer)Protocol number of the next header (Auto; 253 = experimental when none is known).
hop_limituint(8)64Hop limit; decremented at every router, 0 is never sent.
srcipv62001:db8::1Source IPv6 address.
dstipv62001:db8::2Destination IPv6 address.

next_header

ValueName
0 (0x00)hop_by_hop
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)routing
44 (0x2c)fragment
46 (0x2e)rsvp
50 (0x32)esp
51 (0x33)ah
58 (0x3a)icmpv6
59 (0x3b)no_next_header
60 (0x3c)destination_options
88 (0x58)eigrp
89 (0x59)ospf
112 (0x70)vrrp
132 (0x84)sctp
143 (0x8f)ethernet
253 (0xfd)experimental

Next layer

The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)ipv6_hopopts
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)ipv6_route
44 (0x2c)ipv6_frag
46 (0x2e)rsvp
47 (0x2f)gre
58 (0x3a)icmpv6
60 (0x3c)ipv6_dstopts
88 (0x58)eigrp
89 (0x59)ospfv3
112 (0x70)vrrpv3_ipv6
115 (0x73)l2tpv3
132 (0x84)sctp
143 (0x8f)ethernet2

8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)

ValueProtocol
4 (0x04)ipv6_srh
(any other value)ipv6_route

Constraints

LevelRule
warningversion = 6
warninghop_limit ≠ 0

Sample templates

IPv6 Hop-by-Hop Options (ipv6_hopopts)

Reached from

Lower layerSelectorValue
ipv6next_header0 (0x00)
ipv6_hopoptsnext_header0 (0x00)
ipv6_routenext_header0 (0x00)
ipv6_srhnext_header0 (0x00)
ipv6_fragnext_header0 (0x00)
ipv6_dstoptsnext_header0 (0x00)

Fields

FieldTypeDefaultAutoDescription
next_headeruint(8)253Protocol number of the next layer (see Next layer)Protocol number of the header following this extension header (Auto).
hdr_ext_lenuint(8)Length of the header in 64-bit words (-1)Length of this extension header in 8-octet units, not counting the first 8 octets (Auto).
optionsbytes — hdr_ext_len * 8 + 6 octets01 04 00 00 00 00Raw TLV options, padded to a multiple of 8 bytes.
paddingpadding(8)Zero padding (Pad1) of the extension header to a multiple of 8 octets (Auto).

Next layer

The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)ipv6_hopopts
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)ipv6_route
44 (0x2c)ipv6_frag
46 (0x2e)rsvp
47 (0x2f)gre
58 (0x3a)icmpv6
60 (0x3c)ipv6_dstopts
88 (0x58)eigrp
89 (0x59)ospfv3
112 (0x70)vrrpv3_ipv6
115 (0x73)l2tpv3
132 (0x84)sctp
143 (0x8f)ethernet2

8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)

ValueProtocol
4 (0x04)ipv6_srh
(any other value)ipv6_route

Sample templates

IPv6 Routing (ipv6_route)

Reached from

Lower layerSelectorValue
ipv6next_header43 (0x2b)
ipv68 bits of the payload after its first 16 bits when next_header = 43 (0x2b)(any other value)
ipv6_hopoptsnext_header43 (0x2b)
ipv6_hopopts8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)(any other value)
ipv6_routenext_header43 (0x2b)
ipv6_route8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)(any other value)
ipv6_srhnext_header43 (0x2b)
ipv6_srh8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)(any other value)
ipv6_fragnext_header43 (0x2b)
ipv6_frag8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)(any other value)
ipv6_dstoptsnext_header43 (0x2b)
ipv6_dstopts8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)(any other value)

Fields

FieldTypeDefaultAutoDescription
next_headeruint(8)253Protocol number of the next layer (see Next layer)Protocol number of the header following this extension header (Auto).
hdr_ext_lenuint(8)Length of the header in 64-bit words (-1)Length of this extension header in 8-octet units, not counting the first 8 octets (Auto).
routing_typeenum(8)2 (mobile_ipv6)Routing header type (e.g. 2 = Mobile IPv6, 4 = SRH).
segments_leftuint(8)1Number of route segments remaining.
databytes — hdr_ext_len * 8 + 4 octets00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Type-specific routing data.
paddingpadding(8)Zero padding (Pad1) of the extension header to a multiple of 8 octets (Auto).

routing_type

ValueName
0 (0x00)source_route_deprecated
2 (0x02)mobile_ipv6
3 (0x03)rpl
4 (0x04)segment_routing

Next layer

The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)ipv6_hopopts
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)ipv6_route
44 (0x2c)ipv6_frag
46 (0x2e)rsvp
47 (0x2f)gre
58 (0x3a)icmpv6
60 (0x3c)ipv6_dstopts
88 (0x58)eigrp
89 (0x59)ospfv3
112 (0x70)vrrpv3_ipv6
115 (0x73)l2tpv3
132 (0x84)sctp
143 (0x8f)ethernet2

8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)

ValueProtocol
4 (0x04)ipv6_srh
(any other value)ipv6_route

Constraints

LevelRule
warningrouting_type ≠ 0

Sample templates

IPv6 Segment Routing Header (ipv6_srh)

  • Layer: L3 (network)
  • Header: variable length
  • Final destination: while segments_left is not 0, element 0 of segment_list replaces the destination address of the lower pseudo header (RFC 8200 §8.1)
  • Notes: SRv6 SRH / SR-MPLS (P2)

Reached from

Lower layerSelectorValue
ipv68 bits of the payload after its first 16 bits when next_header = 43 (0x2b)4 (0x04)
ipv6_hopopts8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)4 (0x04)
ipv6_route8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)4 (0x04)
ipv6_srh8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)4 (0x04)
ipv6_frag8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)4 (0x04)
ipv6_dstopts8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)4 (0x04)

Fields

FieldTypeDefaultAutoDescription
next_headeruint(8)253Protocol number of the next layer (see Next layer)Protocol number of the header following this extension header (Auto).
hdr_ext_lenuint(8)Length of the header in 64-bit words (-1)Length of this extension header in 8-octet units, not counting the first 8 octets (Auto).
routing_typeenum(8)4 (segment_routing)Routing header type (e.g. 2 = Mobile IPv6, 4 = SRH).
segments_leftuint(8)1Segments Left: index (in the segment list) of the next segment to visit; 0 at the last one.
last_entryuint(8)Number of items of segment_list (-1)Last Entry: index of the last element of the segment list, i.e. number of segments - 1 (Auto).
flagsuint(8)0Flags (no flag defined by RFC 8754; 0).
taguint(16)0Tag: marks packets as part of a class or group (0 = unused).
segment_listlist<ipv6> — last_entry * 16 + 16 octets2 itemsSegment list (SIDs) in reverse path order: element 0 is the last segment, the last element the first. While Segments Left is non-zero, upper-layer checksums use element 0 as the destination.
tlvstlv — up to offset hdr_ext_len * 8 + 8 of the groupOptional TLVs (8-bit type, 8-bit length): Pad1, PadN, HMAC (the HMAC value is Manual). The header is then padded with Pad1 octets to a multiple of 8 (Auto).
paddingpadding(8)Zero padding (Pad1) of the extension header to a multiple of 8 octets (Auto).

routing_type

ValueName
4 (0x04)segment_routing

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)pad1(type only, no length or value)
4 (0x04)padnpadding
5 (0x05)hmacd, reserved, hmac_key_id, hmac

tlvs › padn

FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU

tlvs › hmac

FieldTypeDefaultAutoDescription
duint(1)0
reserveduint(15)0
hmac_key_iduint(32)1
hmacbytes — rest of the PDU00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Next layer

The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)ipv6_hopopts
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)ipv6_route
44 (0x2c)ipv6_frag
46 (0x2e)rsvp
47 (0x2f)gre
58 (0x3a)icmpv6
60 (0x3c)ipv6_dstopts
88 (0x58)eigrp
89 (0x59)ospfv3
112 (0x70)vrrpv3_ipv6
115 (0x73)l2tpv3
132 (0x84)sctp
143 (0x8f)ethernet2

8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)

ValueProtocol
4 (0x04)ipv6_srh
(any other value)ipv6_route

Constraints

LevelRule
warningrouting_type = 4

Sample templates

IPv6 Fragment (ipv6_frag)

  • Layer: L3 (network)
  • Header: 8 octets (fixed)

Reached from

Lower layerSelectorValue
ipv6next_header44 (0x2c)
ipv6_hopoptsnext_header44 (0x2c)
ipv6_routenext_header44 (0x2c)
ipv6_srhnext_header44 (0x2c)
ipv6_fragnext_header44 (0x2c)
ipv6_dstoptsnext_header44 (0x2c)

Fields

FieldTypeDefaultAutoDescription
next_headeruint(8)253Protocol number of the next layer (see Next layer)Protocol number of the header following this extension header (Auto).
reserveduint(8)0Reserved, 0.
fragment_offsetuint(13)0Offset of this fragment in 8-byte units.
resuint(2)0Reserved, 0.
muint(1)0More-fragments flag (1 = more fragments follow).
identificationuint(32)0Identification shared by the fragments of one packet.

Next layer

The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)ipv6_hopopts
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)ipv6_route
44 (0x2c)ipv6_frag
46 (0x2e)rsvp
47 (0x2f)gre
58 (0x3a)icmpv6
60 (0x3c)ipv6_dstopts
88 (0x58)eigrp
89 (0x59)ospfv3
112 (0x70)vrrpv3_ipv6
115 (0x73)l2tpv3
132 (0x84)sctp
143 (0x8f)ethernet2

8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)

ValueProtocol
4 (0x04)ipv6_srh
(any other value)ipv6_route

Sample templates

IPv6 Destination Options (ipv6_dstopts)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ipv6next_header60 (0x3c)
ipv6_hopoptsnext_header60 (0x3c)
ipv6_routenext_header60 (0x3c)
ipv6_srhnext_header60 (0x3c)
ipv6_fragnext_header60 (0x3c)
ipv6_dstoptsnext_header60 (0x3c)

Fields

FieldTypeDefaultAutoDescription
next_headeruint(8)253Protocol number of the next layer (see Next layer)Protocol number of the header following this extension header (Auto).
hdr_ext_lenuint(8)Length of the header in 64-bit words (-1)Length of this extension header in 8-octet units, not counting the first 8 octets (Auto).
optionsbytes — hdr_ext_len * 8 + 6 octets01 04 00 00 00 00Raw TLV options, padded to a multiple of 8 bytes.
paddingpadding(8)Zero padding (Pad1) of the extension header to a multiple of 8 octets (Auto).

Next layer

The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0 (0x00)ipv6_hopopts
4 (0x04)ipv4
6 (0x06)tcp
17 (0x11)udp
41 (0x29)ipv6
43 (0x2b)ipv6_route
44 (0x2c)ipv6_frag
46 (0x2e)rsvp
47 (0x2f)gre
58 (0x3a)icmpv6
60 (0x3c)ipv6_dstopts
88 (0x58)eigrp
89 (0x59)ospfv3
112 (0x70)vrrpv3_ipv6
115 (0x73)l2tpv3
132 (0x84)sctp
143 (0x8f)ethernet2

8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)

ValueProtocol
4 (0x04)ipv6_srh
(any other value)ipv6_route

Sample templates

ICMPv4 (icmpv4)

  • Layer: L3 (network)
  • Header: 8 octets (fixed)

Reached from

Lower layerSelectorValue
ipv4protocol1 (0x01)

Fields

FieldTypeDefaultAutoDescription
typeenum(8)8 (echo_request)Message type.
codeuint(8)0Message code, meaning depends on the type.
checksumuint(16)Internet checksum over the header and everything after itInternet checksum over header and payload (Auto).
restbytes(4)00 00 00 00Type-specific 4-byte “rest of header” field.

type

ValueName
0 (0x00)echo_reply
3 (0x03)destination_unreachable
4 (0x04)source_quench
5 (0x05)redirect
8 (0x08)echo_request
9 (0x09)router_advertisement
10 (0x0a)router_solicitation
11 (0x0b)time_exceeded
12 (0x0c)parameter_problem
13 (0x0d)timestamp_request
14 (0x0e)timestamp_reply
15 (0x0f)information_request
16 (0x10)information_reply
17 (0x11)address_mask_request
18 (0x12)address_mask_reply
42 (0x2a)extended_echo_request
43 (0x2b)extended_echo_reply

Constraints

LevelRule
warningtype within 0..43

Sample templates

ICMPv6 (icmpv6)

Reached from

Lower layerSelectorValue
ipv6next_header58 (0x3a)
ipv6_hopoptsnext_header58 (0x3a)
ipv6_routenext_header58 (0x3a)
ipv6_srhnext_header58 (0x3a)
ipv6_fragnext_header58 (0x3a)
ipv6_dstoptsnext_header58 (0x3a)

Fields

FieldTypeDefaultAutoDescription
typeenum(8)128 (echo_request)Protocol number of the next layer (see Next layer)Message type.
codeuint(8)0Message code, meaning depends on the type.
checksumuint(16)Internet checksum with pseudo header over the header and everything after itInternet checksum with the IPv6 pseudo header over header and payload (Auto).

type

ValueName
1 (0x01)destination_unreachable
2 (0x02)packet_too_big
3 (0x03)time_exceeded
4 (0x04)parameter_problem
128 (0x80)echo_request
129 (0x81)echo_reply
130 (0x82)mld_query
131 (0x83)mld_report
132 (0x84)mld_done
133 (0x85)router_solicitation
134 (0x86)router_advertisement
135 (0x87)neighbor_solicitation
136 (0x88)neighbor_advertisement
137 (0x89)redirect
143 (0x8f)mldv2_report

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
130 (0x82)mldv2_queryat least 24 octets remaining
128 (0x80)icmpv6_echo
129 (0x81)icmpv6_echo
130 (0x82)mld
131 (0x83)mld
132 (0x84)mld
143 (0x8f)mldv2_report
133 (0x85)ndp_rs
134 (0x86)ndp_ra
135 (0x87)ndp_ns
136 (0x88)ndp_na
137 (0x89)ndp_redirect

Constraints

LevelRule
warningtype within 1..255

Sample templates

ICMPv6 Echo (icmpv6_echo)

  • Layer: L3 (network)
  • Header: 4 octets (fixed)

Reached from

Lower layerSelectorValue
icmpv6type128 (0x80)
icmpv6type129 (0x81)

Fields

FieldTypeDefaultAutoDescription
identifieruint(16)0Identifier used to match echo requests and replies.
sequenceuint(16)0Sequence number used to match echo requests and replies.

Sample templates

NDP Router Solicitation (ndp_rs)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
icmpv6type133 (0x85)

Fields

FieldTypeDefaultAutoDescription
reserveduint(32)0Reserved, 0.
optionsbytes — rest of the PDURaw NDP options (TLV).

Sample templates

NDP Router Advertisement (ndp_ra)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
icmpv6type134 (0x86)

Fields

FieldTypeDefaultAutoDescription
cur_hop_limituint(8)64Hop limit that hosts should use (0 = unspecified).
muint(1)0Managed address configuration flag (M).
ouint(1)0Other configuration flag (O).
reserveduint(6)0Reserved, 0.
router_lifetimeuint(16)1800Lifetime of the default router in seconds (0 = not a default router).
reachable_timeuint(32)0Reachable time in milliseconds (0 = unspecified).
retrans_timeruint(32)0Retransmission timer in milliseconds (0 = unspecified).
optionsbytes — rest of the PDURaw NDP options (TLV).

Sample templates

NDP Neighbor Solicitation (ndp_ns)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
icmpv6type135 (0x87)

Fields

FieldTypeDefaultAutoDescription
reserveduint(32)0Reserved, 0.
targetipv6fe80::1Target address.
optionsbytes — rest of the PDURaw NDP options (TLV).

Sample templates

NDP Neighbor Advertisement (ndp_na)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
icmpv6type136 (0x88)

Fields

FieldTypeDefaultAutoDescription
ruint(1)0Router flag (R).
suint(1)1Solicited flag (S).
ouint(1)1Override flag (O).
reserveduint(29)0Reserved, 0.
targetipv6fe80::1Target address.
optionsbytes — rest of the PDURaw NDP options (TLV).

Sample templates

NDP Redirect (ndp_redirect)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
icmpv6type137 (0x89)

Fields

FieldTypeDefaultAutoDescription
reserveduint(32)0Reserved, 0.
targetipv6fe80::1Target address.
destinationipv62001:db8::1Destination address of a redirect.
optionsbytes — rest of the PDURaw NDP options (TLV).

Sample templates

  • ndp-redirect — templates/protocols/l3/ndp-redirect.wpg.yaml

GRE (gre)

Reached from

Lower layerSelectorValue
ipv4protocol47 (0x2f)
ipv6next_header47 (0x2f)
ipv6_hopoptsnext_header47 (0x2f)
ipv6_routenext_header47 (0x2f)
ipv6_srhnext_header47 (0x2f)
ipv6_fragnext_header47 (0x2f)
ipv6_dstoptsnext_header47 (0x2f)

Fields

FieldTypeDefaultAutoDescription
flagsflags(16)0x0GRE flags and version (checksum / key / sequence present bits).
protocol_typeenum(16)2048 (ipv4)Protocol number of the next layer (see Next layer)EtherType of the encapsulated payload.

flags

BitMaskName
1532768 (0x8000)checksum_present
138192 (0x2000)key_present
124096 (0x1000)sequence_present

protocol_type

ValueName
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
25944 (0x6558)transparent_ethernet
34887 (0x8847)mpls

Next layer

The next layer is selected by protocol_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2048 (0x0800)ipv4
34525 (0x86dd)ipv6
25944 (0x6558)ethernet2
34887 (0x8847)mpls

Sample templates

  • gre-ipv4 — templates/protocols/encap/gre-ipv4.wpg.yaml

NVGRE (nvgre)

Reached from

No protocol of the catalog leads here: use it as the first layer or stack it explicitly.

Fields

FieldTypeDefaultAutoDescription
flagsflags(16)0x2000GRE flags and version (checksum / key / sequence present bits).
protocol_typeenum(16)25944 (transparent_ethernet)EtherType of the encapsulated payload.
vsiduint(24)024-bit NVGRE Virtual Subnet ID.
flow_iduint(8)0NVGRE FlowID (entropy for load balancing).

flags

BitMaskName
1532768 (0x8000)checksum_present
138192 (0x2000)key_present
124096 (0x1000)sequence_present

protocol_type

ValueName
25944 (0x6558)transparent_ethernet

Next layer

The next layer is selected by protocol_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
25944 (0x6558)ethernet2

Sample templates

  • nvgre — templates/protocols/encap/nvgre.wpg.yaml

OSPFv2 (ospfv2)

Reached from

Lower layerSelectorValue
ipv4protocol89 (0x59)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)2OSPF version (2 = OSPFv2, 3 = OSPFv3).
typeenum(8)1 (hello)Protocol number of the next layer (see Next layer)OSPF packet type (Hello / DB Description / LS Request / LS Update / LS Ack; Auto from the next layer).
packet_lengthuint(16)Length of the header and payload in octetsLength of the OSPF packet including the header, in octets (Auto).
router_idipv4192.0.2.1Router ID of the sending router.
area_idipv40.0.0.0Area the packet belongs to (0.0.0.0 = backbone).
checksumuint(16)Internet checksum over the header and everything after it; authentication counted as zeroInternet checksum over the OSPF packet without the authentication field (Auto).
au_typeenum(16)0 (null)Authentication type (0 = null, 1 = simple password, 2 = cryptographic).
authenticationbytes(8)00 00 00 00 00 00 00 0064-bit authentication field (password, or key id / sequence for cryptographic auth).

type

ValueName
1 (0x01)hello
2 (0x02)db_description
3 (0x03)ls_request
4 (0x04)ls_update
5 (0x05)ls_ack

au_type

ValueName
0 (0x0000)null
1 (0x0001)simple_password
2 (0x0002)cryptographic

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)ospfv2_hello
2 (0x02)ospfv2_dbd
3 (0x03)ospfv2_lsr
4 (0x04)ospfv2_lsu
5 (0x05)ospfv2_lsack

Constraints

LevelRule
warningversion = 2

Sample templates

OSPFv2 Hello (ospfv2_hello)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv2type1 (0x01)

Fields

FieldTypeDefaultAutoDescription
network_maskipv4255.255.255.0Network mask of the interface or advertised network.
hello_intervaluint(16)10Interval between Hello packets, in seconds.
optionsflags(8)0x2Optional capabilities (E, MC, N/P, L, DC, O, DN bits).
router_priorityuint(8)1Router priority for the DR election (0 = never DR).
router_dead_intervaluint(32)40Seconds without a Hello before the neighbor is declared down.
designated_routeripv40.0.0.0Designated Router (0.0.0.0 = none).
backup_designated_routeripv40.0.0.0Backup Designated Router (0.0.0.0 = none).
neighborslist<ipv4> — rest of the PDURouter IDs of the neighbors seen on the link.

options

BitMaskName
01 (0x01)mt
12 (0x02)e
24 (0x04)mc
38 (0x08)np
416 (0x10)l
532 (0x20)dc
664 (0x40)o
7128 (0x80)dn

Sample templates

OSPFv2 DBD (ospfv2_dbd)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv2type2 (0x02)

Fields

FieldTypeDefaultAutoDescription
interface_mtuuint(16)1500Largest IP datagram the interface can send without fragmentation.
optionsflags(8)0x2Optional capabilities (E, MC, N/P, L, DC, O, DN bits).
flagsflags(8)0x7Database Description flags (I = init, M = more, MS = master).
dd_sequenceuint(32)1Database Description sequence number.
lsa_headerslist<struct> — rest of the PDULSA headers (20 octets each; checksums and lengths are Manual).

options

BitMaskName
01 (0x01)mt
12 (0x02)e
24 (0x04)mc
38 (0x08)np
416 (0x10)l
532 (0x20)dc
664 (0x40)o
7128 (0x80)dn

flags

BitMaskName
24 (0x04)init
12 (0x02)more
01 (0x01)master

lsa_headers

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ls_ageuint(16)
optionsuint(8)
ls_typeuint(8)
link_state_idipv4
advertising_routeripv4
ls_sequenceuint(32)
ls_checksumuint(16)
lengthuint(16)

Sample templates

  • ospfv2-dbd — templates/protocols/routing/ospfv2-dbd.wpg.yaml

OSPFv2 LSR (ospfv2_lsr)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv2type3 (0x03)

Fields

FieldTypeDefaultAutoDescription
requestslist<struct> — rest of the PDURequested LSAs (LS type, Link State ID, advertising router).

requests

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ls_typeuint(32)
link_state_idipv4
advertising_routeripv4

Sample templates

  • ospfv2-lsr — templates/protocols/routing/ospfv2-lsr.wpg.yaml

OSPFv2 LSU (ospfv2_lsu)

Reached from

Lower layerSelectorValue
ospfv2type4 (0x04)

Fields

FieldTypeDefaultAutoDescription
num_lsasuint(32)1Number of LSAs in the update.

Next layer

The next layer is selected by num_lsas; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
(any other value)ospfv2_lsa

Sample templates

OSPFv2 LSAck (ospfv2_lsack)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv2type5 (0x05)

Fields

FieldTypeDefaultAutoDescription
lsa_headerslist<struct> — rest of the PDULSA headers (20 octets each; checksums and lengths are Manual).

lsa_headers

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ls_ageuint(16)
optionsuint(8)
ls_typeuint(8)
link_state_idipv4
advertising_routeripv4
ls_sequenceuint(32)
ls_checksumuint(16)
lengthuint(16)

Sample templates

  • ospfv2-lsack — templates/protocols/routing/ospfv2-lsack.wpg.yaml

OSPFv2 LSA (ospfv2_lsa)

Reached from

Lower layerSelectorValue
ospfv2_lsunum_lsas(any other value)

Fields

FieldTypeDefaultAutoDescription
ls_ageuint(16)0Time since the LSA was originated, in seconds (keep 0 for an exact Auto checksum).
optionsflags(8)0x2Optional capabilities (E, MC, N/P, L, DC, O, DN bits).
ls_typeenum(8)1 (router)Protocol number of the next layer (see Next layer)LSA type (Auto from the LSA body layer; 9 / 10 / 11 = opaque LSA).
link_state_idipv4192.0.2.1Link State ID identifying the described part of the network.
advertising_routeripv4192.0.2.1Router ID of the router that originated the LSA.
ls_sequenceuint(32)2147483649LSA sequence number (0x80000001 = initial).
ls_checksumuint(16)Fletcher checksum over the header and everything after it; ls_age counted as zeroFletcher checksum of the LSA without LS age (Auto).
lengthuint(16)Length of the header and payload in octetsLength of the LSA including its header, in octets (Auto).

options

BitMaskName
01 (0x01)mt
12 (0x02)e
24 (0x04)mc
38 (0x08)np
416 (0x10)l
532 (0x20)dc
664 (0x40)o
7128 (0x80)dn

ls_type

ValueName
1 (0x01)router
2 (0x02)network
3 (0x03)summary_network
4 (0x04)summary_asbr
5 (0x05)as_external
7 (0x07)nssa_external
9 (0x09)link_local_opaque
10 (0x0a)area_opaque
11 (0x0b)as_opaque

Next layer

The next layer is selected by ls_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)ospfv2_router_lsa
2 (0x02)ospfv2_network_lsa
3 (0x03)ospfv2_summary_lsa
4 (0x04)ospfv2_summary_lsa
5 (0x05)ospfv2_external_lsa
7 (0x07)ospfv2_external_lsa
9 (0x09) – 11 (0x0b)ospfv2_opaque_lsare-decodes this layer

Sample templates

OSPFv2 Router-LSA (ospfv2_router_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv2_lsals_type1 (0x01)

Fields

FieldTypeDefaultAutoDescription
flagsflags(8)0x0Router-LSA flags (V = virtual link endpoint, E = ASBR, B = ABR).
reserveduint(8)0
num_linksuint(16)Number of items of linksNumber of router links described.
linkslist<struct> — rest of the PDU1 itemsRouter links (link ID, link data, type, TOS count, metric).

flags

BitMaskName
24 (0x04)v
12 (0x02)e
01 (0x01)b

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
link_idipv4
link_dataipv4
typeenum(8)
num_tosuint(8)
metricuint(16)
ValueName
1 (0x01)point_to_point
2 (0x02)transit
3 (0x03)stub
4 (0x04)virtual_link

Sample templates

OSPFv2 Network-LSA (ospfv2_network_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv2_lsals_type2 (0x02)

Fields

FieldTypeDefaultAutoDescription
network_maskipv4255.255.255.0Network mask of the interface or advertised network.
attached_routerslist<ipv4> — rest of the PDURouter IDs of the routers attached to the network.

Sample templates

OSPFv2 Summary-LSA (ospfv2_summary_lsa)

  • Layer: L3 (network)
  • Header: 8 octets (fixed)

Reached from

Lower layerSelectorValue
ospfv2_lsals_type3 (0x03)
ospfv2_lsals_type4 (0x04)

Fields

FieldTypeDefaultAutoDescription
network_maskipv4255.255.255.0Network mask of the interface or advertised network.
reserveduint(8)0
metricuint(24)10Cost of the route.

Sample templates

OSPFv2 AS-External-LSA (ospfv2_external_lsa)

  • Layer: L3 (network)
  • Header: 16 octets (fixed)

Reached from

Lower layerSelectorValue
ospfv2_lsals_type5 (0x05)
ospfv2_lsals_type7 (0x07)

Fields

FieldTypeDefaultAutoDescription
network_maskipv4255.255.255.0Network mask of the interface or advertised network.
e_bituint(1)1External metric type (1 = type 2, 0 = type 1).
reserveduint(7)0
metricuint(24)20Cost of the route.
forwarding_addressipv40.0.0.0Address traffic for the destination is forwarded to (0.0.0.0 = the ASBR).
external_route_taguint(32)032-bit tag carried with the external route.

Sample templates

OSPFv2 Opaque LSA (ospfv2_opaque_lsa)

Reached from

Lower layerSelectorValue
ospfv2_lsals_type9 (0x09) – 11 (0x0b) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
ls_ageuint(16)0Time since the LSA was originated, in seconds (keep 0 for an exact Auto checksum).
optionsflags(8)0x42Optional capabilities (E, MC, N/P, L, DC, O, DN bits).
ls_typeenum(8)10 (area_opaque)Opaque LSA flooding scope (9 = link-local, 10 = area, 11 = AS).
opaque_typeenum(8)4 (router_information)Protocol number of the next layer (see Next layer)Opaque type (1 = TE, 4 = Router Information, 7 = Extended Prefix, 8 = Extended Link; Auto from the body layer).
opaque_iduint(24)0Opaque ID distinguishing LSAs of the same opaque type (24 bits).
advertising_routeripv4192.0.2.1Router ID of the router that originated the LSA.
ls_sequenceuint(32)2147483649LSA sequence number (0x80000001 = initial).
ls_checksumuint(16)Fletcher checksum over the header and everything after it; ls_age counted as zeroFletcher checksum of the LSA without LS age (Auto).
lengthuint(16)Length of the header and payload in octetsLength of the LSA including its header, in octets (Auto).

options

BitMaskName
01 (0x01)mt
12 (0x02)e
24 (0x04)mc
38 (0x08)np
416 (0x10)l
532 (0x20)dc
664 (0x40)o
7128 (0x80)dn

ls_type

ValueName
9 (0x09)link_local_opaque
10 (0x0a)area_opaque
11 (0x0b)as_opaque

opaque_type

ValueName
1 (0x01)traffic_engineering
4 (0x04)router_information
7 (0x07)extended_prefix
8 (0x08)extended_link

Next layer

The next layer is selected by opaque_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)ospfv2_te_lsa
4 (0x04)ospfv2_ri_lsa
7 (0x07)ospfv2_ext_prefix_lsa
8 (0x08)ospfv2_ext_link_lsa

Constraints

LevelRule
warningls_type within 9..11

Sample templates

OSPFv2 TE LSA (ospfv2_te_lsa)

Reached from

Lower layerSelectorValue
ospfv2_opaque_lsaopaque_type1 (0x01)

Fields

FieldTypeDefaultAutoDescription
tlvstlv — rest of the PDU1 itemsTLVs of the opaque LSA (16-bit type and length, values padded to 4 octets; lengths Auto).

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)router_addressaddress
2 (0x0002)linksub_tlvs

tlvs › router_address

FieldTypeDefaultAutoDescription
addressipv4
FieldTypeDefaultAutoDescription
sub_tlvstlv — rest of the PDU
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)link_typelink_type
2 (0x0002)link_idlink_id
3 (0x0003)local_addressaddresses
4 (0x0004)remote_addressaddresses
5 (0x0005)te_metricmetric
6 (0x0006)max_bandwidthbandwidth
7 (0x0007)max_reservable_bandwidthbandwidth
8 (0x0008)unreserved_bandwidthbandwidths
9 (0x0009)admin_groupgroups
FieldTypeDefaultAutoDescription
link_typeenum(8)

tlvs › link › sub_tlvs › link_type › link_type

ValueName
1 (0x01)point_to_point
2 (0x02)multi_access
FieldTypeDefaultAutoDescription
link_idipv4
FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU
FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU
FieldTypeDefaultAutoDescription
metricuint(32)
FieldTypeDefaultAutoDescription
bandwidthuint(32)
FieldTypeDefaultAutoDescription
bandwidthuint(32)
FieldTypeDefaultAutoDescription
bandwidthslist<uint(32)> — rest of the PDU
FieldTypeDefaultAutoDescription
groupsuint(32)

Sample templates

OSPFv2 Router Information LSA (ospfv2_ri_lsa)

Reached from

Lower layerSelectorValue
ospfv2_opaque_lsaopaque_type4 (0x04)

Fields

FieldTypeDefaultAutoDescription
tlvstlv — rest of the PDU4 itemsTLVs of the opaque LSA (16-bit type and length, values padded to 4 octets; lengths Auto).

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)informational_capabilitiescapabilities
2 (0x0002)functional_capabilitiescapabilities
7 (0x0007)hostnamehostname
8 (0x0008)sr_algorithmalgorithms
9 (0x0009)sid_label_rangerange_size, reserved, sub_tlvs
14 (0x000e)sr_local_blockrange_size, reserved, sub_tlvs
15 (0x000f)srms_preferencepreference, reserved

tlvs › informational_capabilities

FieldTypeDefaultAutoDescription
capabilitiesflags(32)
tlvs › informational_capabilities › capabilities
BitMaskName
312147483648 (0x80000000)graceful_restart
301073741824 (0x40000000)graceful_restart_helper
29536870912 (0x20000000)stub_router
28268435456 (0x10000000)traffic_engineering
27134217728 (0x08000000)p2p_over_lan
2667108864 (0x04000000)experimental_te

tlvs › functional_capabilities

FieldTypeDefaultAutoDescription
capabilitiesuint(32)

tlvs › hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › sr_algorithm

FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

tlvs › sid_label_range

FieldTypeDefaultAutoDescription
range_sizeuint(24)
reserveduint(8)
sub_tlvstlv — rest of the PDU
tlvs › sid_label_range › sub_tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)sid_labellabel; when the value is 3 octets
1 (0x0001)sid_label_indexindex; when the value is 4 octets
tlvs › sid_label_range › sub_tlvs › sid_label
FieldTypeDefaultAutoDescription
labeluint(24)
tlvs › sid_label_range › sub_tlvs › sid_label_index
FieldTypeDefaultAutoDescription
indexuint(32)

tlvs › sr_local_block

FieldTypeDefaultAutoDescription
range_sizeuint(24)
reserveduint(8)
sub_tlvstlv — rest of the PDU
tlvs › sr_local_block › sub_tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)sid_labellabel; when the value is 3 octets
1 (0x0001)sid_label_indexindex; when the value is 4 octets
tlvs › sr_local_block › sub_tlvs › sid_label
FieldTypeDefaultAutoDescription
labeluint(24)
tlvs › sr_local_block › sub_tlvs › sid_label_index
FieldTypeDefaultAutoDescription
indexuint(32)

tlvs › srms_preference

FieldTypeDefaultAutoDescription
preferenceuint(8)
reserveduint(24)

Sample templates

OSPFv2 Extended Prefix LSA (ospfv2_ext_prefix_lsa)

Reached from

Lower layerSelectorValue
ospfv2_opaque_lsaopaque_type7 (0x07)

Fields

FieldTypeDefaultAutoDescription
tlvstlv — rest of the PDU1 itemsTLVs of the opaque LSA (16-bit type and length, values padded to 4 octets; lengths Auto).

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)extended_prefixroute_type, prefix_length, address_family, flags, prefix, sub_tlvs
2 (0x0002)extended_prefix_rangeprefix_length, address_family, range_size, flags, reserved, prefix, sub_tlvs

tlvs › extended_prefix

FieldTypeDefaultAutoDescription
route_typeenum(8)
prefix_lengthuint(8)
address_familyuint(8)
flagsflags(8)
prefixipv4
sub_tlvstlv — rest of the PDU
tlvs › extended_prefix › route_type
ValueName
0 (0x00)unspecified
1 (0x01)intra_area
3 (0x03)inter_area
5 (0x05)as_external
7 (0x07)nssa_external
tlvs › extended_prefix › flags
BitMaskName
7128 (0x80)a
664 (0x40)n
tlvs › extended_prefix › sub_tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x0002)prefix_sid_labelflags, reserved, mt_id, algorithm, label; when the value is 7 octets
2 (0x0002)prefix_sidflags, reserved, mt_id, algorithm, index; when the value is 8 octets
tlvs › extended_prefix › sub_tlvs › prefix_sid_label
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
algorithmuint(8)
labeluint(24)

tlvs › extended_prefix › sub_tlvs › prefix_sid_label › flags

BitMaskName
664 (0x40)np
532 (0x20)m
416 (0x10)e
38 (0x08)v
24 (0x04)l
tlvs › extended_prefix › sub_tlvs › prefix_sid
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
algorithmuint(8)
indexuint(32)

tlvs › extended_prefix › sub_tlvs › prefix_sid › flags

BitMaskName
664 (0x40)np
532 (0x20)m
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_prefix_range

FieldTypeDefaultAutoDescription
prefix_lengthuint(8)
address_familyuint(8)
range_sizeuint(16)
flagsflags(8)
reserveduint(24)
prefixipv4
sub_tlvstlv — rest of the PDU
tlvs › extended_prefix_range › flags
BitMaskName
7128 (0x80)ia
tlvs › extended_prefix_range › sub_tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x0002)prefix_sid_labelflags, reserved, mt_id, algorithm, label; when the value is 7 octets
2 (0x0002)prefix_sidflags, reserved, mt_id, algorithm, index; when the value is 8 octets
tlvs › extended_prefix_range › sub_tlvs › prefix_sid_label
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
algorithmuint(8)
labeluint(24)

tlvs › extended_prefix_range › sub_tlvs › prefix_sid_label › flags

BitMaskName
664 (0x40)np
532 (0x20)m
416 (0x10)e
38 (0x08)v
24 (0x04)l
tlvs › extended_prefix_range › sub_tlvs › prefix_sid
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
algorithmuint(8)
indexuint(32)

tlvs › extended_prefix_range › sub_tlvs › prefix_sid › flags

BitMaskName
664 (0x40)np
532 (0x20)m
416 (0x10)e
38 (0x08)v
24 (0x04)l

Sample templates

OSPFv2 Extended Link LSA (ospfv2_ext_link_lsa)

Reached from

Lower layerSelectorValue
ospfv2_opaque_lsaopaque_type8 (0x08)

Fields

FieldTypeDefaultAutoDescription
tlvstlv — rest of the PDU1 itemsTLVs of the opaque LSA (16-bit type and length, values padded to 4 octets; lengths Auto).

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)extended_linklink_type, reserved, link_id, link_data, sub_tlvs
FieldTypeDefaultAutoDescription
link_typeenum(8)
reserveduint(24)
link_idipv4
link_dataipv4
sub_tlvstlv — rest of the PDU
ValueName
1 (0x01)point_to_point
2 (0x02)transit
3 (0x03)stub
4 (0x04)virtual
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x0002)adj_sidflags, reserved, mt_id, weight, label; when the value is 7 octets
2 (0x0002)adj_sid_indexflags, reserved, mt_id, weight, index; when the value is 8 octets
3 (0x0003)lan_adj_sidflags, reserved, mt_id, weight, neighbor_id, label; when the value is 11 octets
3 (0x0003)lan_adj_sid_indexflags, reserved, mt_id, weight, neighbor_id, index; when the value is 12 octets
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
weightuint(8)
labeluint(24)

tlvs › extended_link › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)b
664 (0x40)v
532 (0x20)l
416 (0x10)g
38 (0x08)p
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
weightuint(8)
indexuint(32)

tlvs › extended_link › sub_tlvs › adj_sid_index › flags

BitMaskName
7128 (0x80)b
664 (0x40)v
532 (0x20)l
416 (0x10)g
38 (0x08)p
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
weightuint(8)
neighbor_idipv4
labeluint(24)

tlvs › extended_link › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)b
664 (0x40)v
532 (0x20)l
416 (0x10)g
38 (0x08)p
FieldTypeDefaultAutoDescription
flagsflags(8)
reserveduint(8)
mt_iduint(8)
weightuint(8)
neighbor_idipv4
indexuint(32)

tlvs › extended_link › sub_tlvs › lan_adj_sid_index › flags

BitMaskName
7128 (0x80)b
664 (0x40)v
532 (0x20)l
416 (0x10)g
38 (0x08)p

Sample templates

OSPFv3 (ospfv3)

Reached from

Lower layerSelectorValue
ipv6next_header89 (0x59)
ipv6_hopoptsnext_header89 (0x59)
ipv6_routenext_header89 (0x59)
ipv6_srhnext_header89 (0x59)
ipv6_fragnext_header89 (0x59)
ipv6_dstoptsnext_header89 (0x59)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)3OSPF version (2 = OSPFv2, 3 = OSPFv3).
typeenum(8)1 (hello)Protocol number of the next layer (see Next layer)OSPF packet type (Hello / DB Description / LS Request / LS Update / LS Ack; Auto from the next layer).
packet_lengthuint(16)Length of the header and payload in octetsLength of the OSPF packet including the header, in octets (Auto).
router_idipv4192.0.2.1Router ID of the sending router.
area_idipv40.0.0.0Area the packet belongs to (0.0.0.0 = backbone).
checksumuint(16)Internet checksum with pseudo header over the header and everything after itInternet checksum over the OSPFv3 packet with the IPv6 pseudo header (Auto).
instance_iduint(8)0Instance ID (separates OSPFv3 instances on one link).
reserveduint(8)0

type

ValueName
1 (0x01)hello
2 (0x02)db_description
3 (0x03)ls_request
4 (0x04)ls_update
5 (0x05)ls_ack

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)ospfv3_hello
2 (0x02)ospfv3_dbd
3 (0x03)ospfv3_lsr
4 (0x04)ospfv3_lsu
5 (0x05)ospfv3_lsack

Constraints

LevelRule
warningversion = 3

Sample templates

OSPFv3 Hello (ospfv3_hello)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3type1 (0x01)

Fields

FieldTypeDefaultAutoDescription
interface_iduint(32)1Interface ID of the sending interface.
router_priorityuint(8)1Router priority for the DR election (0 = never DR).
optionsflags(24)0x13OSPFv3 options (V6, E, N, R, DC, AF bits).
hello_intervaluint(16)10Interval between Hello packets, in seconds.
router_dead_intervaluint(16)40Seconds without a Hello before the neighbor is declared down.
designated_routeripv40.0.0.0Designated Router (0.0.0.0 = none).
backup_designated_routeripv40.0.0.0Backup Designated Router (0.0.0.0 = none).
neighborslist<ipv4> — rest of the PDURouter IDs of the neighbors seen on the link.

options

BitMaskName
01 (0x000001)v6
12 (0x000002)e
38 (0x000008)n
416 (0x000010)r
532 (0x000020)dc
8256 (0x000100)af

Sample templates

  • ospfv3-hello — templates/protocols/routing/ospfv3-hello.wpg.yaml

OSPFv3 DBD (ospfv3_dbd)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3type2 (0x02)

Fields

FieldTypeDefaultAutoDescription
reserved1uint(8)0
optionsflags(24)0x13OSPFv3 options (V6, E, N, R, DC, AF bits).
interface_mtuuint(16)1500Largest IP datagram the interface can send without fragmentation.
reserved2uint(8)0
flagsflags(8)0x7Database Description flags (I = init, M = more, MS = master).
dd_sequenceuint(32)1Database Description sequence number.
lsa_headerslist<struct> — rest of the PDULSA headers (20 octets each; checksums and lengths are Manual).

options

BitMaskName
01 (0x000001)v6
12 (0x000002)e
38 (0x000008)n
416 (0x000010)r
532 (0x000020)dc
8256 (0x000100)af

flags

BitMaskName
24 (0x04)init
12 (0x02)more
01 (0x01)master

lsa_headers

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ls_ageuint(16)
ls_typeuint(16)
link_state_iduint(32)
advertising_routeripv4
ls_sequenceuint(32)
ls_checksumuint(16)
lengthuint(16)

Sample templates

  • ospfv3-dbd — templates/protocols/routing/ospfv3-dbd.wpg.yaml

OSPFv3 LSR (ospfv3_lsr)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3type3 (0x03)

Fields

FieldTypeDefaultAutoDescription
requestslist<struct> — rest of the PDURequested LSAs (LS type, Link State ID, advertising router).

requests

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
reserveduint(16)
ls_typeuint(16)
link_state_iduint(32)
advertising_routeripv4

Sample templates

  • ospfv3-lsr — templates/protocols/routing/ospfv3-lsr.wpg.yaml

OSPFv3 LSU (ospfv3_lsu)

Reached from

Lower layerSelectorValue
ospfv3type4 (0x04)

Fields

FieldTypeDefaultAutoDescription
num_lsasuint(32)1Number of LSAs in the update.

Next layer

The next layer is selected by num_lsas; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
(any other value)ospfv3_lsa

Sample templates

OSPFv3 LSAck (ospfv3_lsack)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3type5 (0x05)

Fields

FieldTypeDefaultAutoDescription
lsa_headerslist<struct> — rest of the PDULSA headers (20 octets each; checksums and lengths are Manual).

lsa_headers

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ls_ageuint(16)
ls_typeuint(16)
link_state_iduint(32)
advertising_routeripv4
ls_sequenceuint(32)
ls_checksumuint(16)
lengthuint(16)

Sample templates

  • ospfv3-lsack — templates/protocols/routing/ospfv3-lsack.wpg.yaml

OSPFv3 LSA (ospfv3_lsa)

  • Layer: L3 (network)
  • Header: 20 octets (fixed)

Reached from

Lower layerSelectorValue
ospfv3_lsunum_lsas(any other value)

Fields

FieldTypeDefaultAutoDescription
ls_ageuint(16)0Time since the LSA was originated, in seconds (keep 0 for an exact Auto checksum).
ls_typeenum(16)8193 (router)Protocol number of the next layer (see Next layer)LSA function code with U / S scope bits (Auto from the LSA body layer).
link_state_iduint(32)0Link State ID identifying the described part of the network.
advertising_routeripv4192.0.2.1Router ID of the router that originated the LSA.
ls_sequenceuint(32)2147483649LSA sequence number (0x80000001 = initial).
ls_checksumuint(16)Fletcher checksum over the header and everything after it; ls_age counted as zeroFletcher checksum of the LSA without LS age (Auto).
lengthuint(16)Length of the header and payload in octetsLength of the LSA including its header, in octets (Auto).

ls_type

ValueName
8193 (0x2001)router
8194 (0x2002)network
8195 (0x2003)inter_area_prefix
8196 (0x2004)inter_area_router
16389 (0x4005)as_external
8199 (0x2007)nssa
8 (0x0008)link
8201 (0x2009)intra_area_prefix

Next layer

The next layer is selected by ls_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
8193 (0x2001)ospfv3_router_lsa
8194 (0x2002)ospfv3_network_lsa
8195 (0x2003)ospfv3_inter_area_prefix_lsa
16389 (0x4005)ospfv3_as_external_lsa
8199 (0x2007)ospfv3_as_external_lsa
8 (0x0008)ospfv3_link_lsa
8201 (0x2009)ospfv3_intra_area_prefix_lsa

Sample templates

OSPFv3 Router-LSA (ospfv3_router_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3_lsals_type8193 (0x2001)

Fields

FieldTypeDefaultAutoDescription
flagsflags(8)0x0Router-LSA flags (V = virtual link endpoint, E = ASBR, B = ABR).
optionsflags(24)0x13OSPFv3 options (V6, E, N, R, DC, AF bits).
linkslist<struct> — rest of the PDU1 itemsRouter interfaces (type, metric, interface IDs, neighbor router ID).

flags

BitMaskName
24 (0x04)v
12 (0x02)e
01 (0x01)b

options

BitMaskName
01 (0x000001)v6
12 (0x000002)e
38 (0x000008)n
416 (0x000010)r
532 (0x000020)dc
8256 (0x000100)af

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
typeuint(8)
reserveduint(8)
metricuint(16)
interface_iduint(32)
neighbor_interface_iduint(32)
neighbor_router_idipv4

Sample templates

OSPFv3 Network-LSA (ospfv3_network_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3_lsals_type8194 (0x2002)

Fields

FieldTypeDefaultAutoDescription
reserveduint(8)0
optionsflags(24)0x13OSPFv3 options (V6, E, N, R, DC, AF bits).
attached_routerslist<ipv4> — rest of the PDURouter IDs of the routers attached to the network.

options

BitMaskName
01 (0x000001)v6
12 (0x000002)e
38 (0x000008)n
416 (0x000010)r
532 (0x000020)dc
8256 (0x000100)af

Sample templates

OSPFv3 Inter-Area-Prefix-LSA (ospfv3_inter_area_prefix_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3_lsals_type8195 (0x2003)

Fields

FieldTypeDefaultAutoDescription
reserveduint(8)0
metricuint(24)10Cost of the route.
prefix_lengthuint(8)64Prefix length in bits.
prefix_optionsflags(8)0x0Prefix options (NU, LA, P, DN bits).
reserved2uint(16)0
address_prefixbytes — rest of the PDU20 01 0d b8 00 01 00 00Address prefix, padded to a multiple of 4 octets.

prefix_options

BitMaskName
01 (0x01)nu
12 (0x02)la
38 (0x08)p
416 (0x10)dn

Sample templates

OSPFv3 AS-External-LSA (ospfv3_as_external_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3_lsals_type16389 (0x4005)
ospfv3_lsals_type8199 (0x2007)

Fields

FieldTypeDefaultAutoDescription
flagsflags(8)0x4AS-External-LSA flags (E = type 2 metric, F = forwarding address present, T = route tag present).
metricuint(24)20Cost of the route.
prefix_lengthuint(8)64Prefix length in bits.
prefix_optionsflags(8)0x0Prefix options (NU, LA, P, DN bits).
referenced_ls_typeuint(16)0LS type of the referenced LSA.
address_prefixbytes — rest of the PDU20 01 0d b8 00 02 00 00Address prefix, padded to a multiple of 4 octets.

flags

BitMaskName
24 (0x04)e
12 (0x02)f
01 (0x01)t

prefix_options

BitMaskName
01 (0x01)nu
12 (0x02)la
38 (0x08)p
416 (0x10)dn

Sample templates

OSPFv3 Link-LSA (ospfv3_link_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3_lsals_type8 (0x0008)

Fields

FieldTypeDefaultAutoDescription
router_priorityuint(8)1Router priority for the DR election (0 = never DR).
optionsflags(24)0x13OSPFv3 options (V6, E, N, R, DC, AF bits).
link_local_addressipv6fe80::1Link-local address of the interface.
num_prefixesuint(32)0Number of prefixes that follow.
prefixesbytes — rest of the PDU""Prefix entries (length, options, metric / reserved, address prefix); opaque octets.

options

BitMaskName
01 (0x000001)v6
12 (0x000002)e
38 (0x000008)n
416 (0x000010)r
532 (0x000020)dc
8256 (0x000100)af

Sample templates

OSPFv3 Intra-Area-Prefix-LSA (ospfv3_intra_area_prefix_lsa)

  • Layer: L3 (network)
  • Header: variable length

Reached from

Lower layerSelectorValue
ospfv3_lsals_type8201 (0x2009)

Fields

FieldTypeDefaultAutoDescription
num_prefixesuint(16)1Number of prefixes that follow.
referenced_ls_typeuint(16)8193LS type of the referenced LSA.
referenced_link_state_iduint(32)0Link State ID of the referenced LSA.
referenced_advertising_routeripv4192.0.2.1Advertising router of the referenced LSA.
prefixesbytes — rest of the PDU40 00 00 0a 20 01 0d b8 00 03 00 00Prefix entries (length, options, metric / reserved, address prefix); opaque octets.

Sample templates

EIGRP (eigrp)

Reached from

Lower layerSelectorValue
ipv4protocol88 (0x58)
ipv6next_header88 (0x58)
ipv6_hopoptsnext_header88 (0x58)
ipv6_routenext_header88 (0x58)
ipv6_srhnext_header88 (0x58)
ipv6_fragnext_header88 (0x58)
ipv6_dstoptsnext_header88 (0x58)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)2EIGRP header version (2).
opcodeenum(8)5 (hello)EIGRP opcode (Update / Query / Reply / Hello / SIA-Query / SIA-Reply).
checksumuint(16)Internet checksum over the header and everything after itInternet checksum over the EIGRP packet (Auto).
flagsflags(32)0x0EIGRP flags (Init, Conditional Receive, Restart, End of Table).
sequenceuint(32)0Sequence number for reliable delivery.
acknowledgeuint(32)0Acknowledged sequence number (0 = none).
virtual_router_iduint(16)0Virtual router ID (0 = unicast address family).
autonomous_systemuint(16)100EIGRP autonomous system number.
tlvstlv — rest of the PDU2 itemsEIGRP TLVs (16-bit type, 16-bit length including the header).

opcode

ValueName
1 (0x01)update
3 (0x03)query
4 (0x04)reply
5 (0x05)hello
10 (0x0a)sia_query
11 (0x0b)sia_reply

flags

BitMaskName
01 (0x00000001)init
12 (0x00000002)conditional_receive
24 (0x00000004)restart
38 (0x00000008)end_of_table

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)parametersk1, k2, k3, k4, k5, k6, hold_time
2 (0x0002)authenticationdata
3 (0x0003)sequenceaddress_length, address
4 (0x0004)software_versionos_major, os_minor, tlv_major, tlv_minor
5 (0x0005)next_multicast_sequencesequence
7 (0x0007)peer_terminationdata
258 (0x0102)ipv4_internalnext_hop, delay, bandwidth, mtu, hop_count, reliability, load, internal_tag, flags, prefix_length, destination
259 (0x0103)ipv4_externalnext_hop, originating_router, originating_as, arbitrary_tag, external_metric, reserved, external_protocol, external_flags, delay, bandwidth, mtu, hop_count, reliability, load, internal_tag, flags, prefix_length, destination
1026 (0x0402)ipv6_internalnext_hop, delay, bandwidth, mtu, hop_count, reliability, load, internal_tag, flags, prefix_length, destination
1027 (0x0403)ipv6_externalnext_hop, originating_router, originating_as, arbitrary_tag, external_metric, reserved, external_protocol, external_flags, delay, bandwidth, mtu, hop_count, reliability, load, internal_tag, flags, prefix_length, destination

tlvs › parameters

FieldTypeDefaultAutoDescription
k1uint(8)
k2uint(8)
k3uint(8)
k4uint(8)
k5uint(8)
k6uint(8)
hold_timeuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › sequence

FieldTypeDefaultAutoDescription
address_lengthuint(8)
addressbytes — rest of the PDU

tlvs › software_version

FieldTypeDefaultAutoDescription
os_majoruint(8)
os_minoruint(8)
tlv_majoruint(8)
tlv_minoruint(8)

tlvs › next_multicast_sequence

FieldTypeDefaultAutoDescription
sequenceuint(32)

tlvs › peer_termination

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › ipv4_internal

FieldTypeDefaultAutoDescription
next_hopipv4
delayuint(32)
bandwidthuint(32)
mtuuint(24)
hop_countuint(8)
reliabilityuint(8)
loaduint(8)
internal_taguint(8)
flagsuint(8)
prefix_lengthuint(8)
destinationbytes — rest of the PDU

tlvs › ipv4_external

FieldTypeDefaultAutoDescription
next_hopipv4
originating_routeripv4
originating_asuint(32)
arbitrary_taguint(32)
external_metricuint(32)
reserveduint(16)
external_protocoluint(8)
external_flagsuint(8)
delayuint(32)
bandwidthuint(32)
mtuuint(24)
hop_countuint(8)
reliabilityuint(8)
loaduint(8)
internal_taguint(8)
flagsuint(8)
prefix_lengthuint(8)
destinationbytes — rest of the PDU

tlvs › ipv6_internal

FieldTypeDefaultAutoDescription
next_hopipv6
delayuint(32)
bandwidthuint(32)
mtuuint(24)
hop_countuint(8)
reliabilityuint(8)
loaduint(8)
internal_taguint(8)
flagsuint(8)
prefix_lengthuint(8)
destinationbytes — rest of the PDU

tlvs › ipv6_external

FieldTypeDefaultAutoDescription
next_hopipv6
originating_routeripv4
originating_asuint(32)
arbitrary_taguint(32)
external_metricuint(32)
reserveduint(16)
external_protocoluint(8)
external_flagsuint(8)
delayuint(32)
bandwidthuint(32)
mtuuint(24)
hop_countuint(8)
reliabilityuint(8)
loaduint(8)
internal_taguint(8)
flagsuint(8)
prefix_lengthuint(8)
destinationbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

  • eigrp-hello — templates/protocols/routing/eigrp-hello.wpg.yaml
  • eigrp-update — templates/protocols/routing/eigrp-update.wpg.yaml

VRRPv2 (vrrpv2)

Reached from

Lower layerSelectorValue
ipv4protocol112 (0x70)
vrrpv3version2 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)2VRRP version (2 = RFC 3768, 3 = RFC 5798).
typeenum(4)1 (advertisement)VRRP packet type (1 = Advertisement).
vriduint(8)1Virtual Router Identifier.
priorityuint(8)100Sending router priority (255 = address owner, 0 = stop participating).
count_ip_addrsuint(8)Number of items of ip_addressesNumber of virtual addresses in the advertisement (Auto).
auth_typeenum(8)0 (no_authentication)VRRPv2 authentication type (0 = none, 1 = simple text, 2 = IP AH).
adver_intuint(8)1VRRPv2 advertisement interval, in seconds.
checksumuint(16)Internet checksum over the header and everything after itInternet checksum over the VRRP message (VRRPv3 includes the IP pseudo header) (Auto).
ip_addresseslist<ipv4> — count_ip_addrs * 4 octets1 itemsVirtual router addresses.
auth_databytes(8)00 00 00 00 00 00 00 00VRRPv2 authentication data (8 octets).

type

ValueName
1advertisement

auth_type

ValueName
0 (0x00)no_authentication
1 (0x01)simple_text_password
2 (0x02)ip_authentication_header

Constraints

LevelRule
warningversion = 2

Sample templates

  • vrrpv2 — templates/protocols/fhrp/vrrpv2.wpg.yaml

VRRPv3 (vrrpv3)

Reached from

Lower layerSelectorValue
ipv4protocol112 (0x70)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)3VRRP version (2 = RFC 3768, 3 = RFC 5798).
typeenum(4)1 (advertisement)VRRP packet type (1 = Advertisement).
vriduint(8)1Virtual Router Identifier.
priorityuint(8)100Sending router priority (255 = address owner, 0 = stop participating).
count_ipvx_addrsuint(8)Number of items of ip_addressesNumber of virtual addresses in the advertisement (Auto).
reserveduint(4)0
max_adver_intuint(12)100VRRPv3 maximum advertisement interval, in centiseconds.
checksumuint(16)Internet checksum with pseudo header over the header and everything after itInternet checksum over the VRRP message (VRRPv3 includes the IP pseudo header) (Auto).
ip_addresseslist<ipv4> — count_ipvx_addrs * 4 octets1 itemsVirtual router addresses.

type

ValueName
1advertisement

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2vrrpv2re-decodes this layer

Constraints

LevelRule
warningversion = 3

Sample templates

VRRPv3 (IPv6) (vrrpv3_ipv6)

Reached from

Lower layerSelectorValue
ipv6next_header112 (0x70)
ipv6_hopoptsnext_header112 (0x70)
ipv6_routenext_header112 (0x70)
ipv6_srhnext_header112 (0x70)
ipv6_fragnext_header112 (0x70)
ipv6_dstoptsnext_header112 (0x70)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)3VRRP version (2 = RFC 3768, 3 = RFC 5798).
typeenum(4)1 (advertisement)VRRP packet type (1 = Advertisement).
vriduint(8)1Virtual Router Identifier.
priorityuint(8)100Sending router priority (255 = address owner, 0 = stop participating).
count_ipvx_addrsuint(8)Number of items of ip_addressesNumber of virtual addresses in the advertisement (Auto).
reserveduint(4)0
max_adver_intuint(12)100VRRPv3 maximum advertisement interval, in centiseconds.
checksumuint(16)Internet checksum with pseudo header over the header and everything after itInternet checksum over the VRRP message (VRRPv3 includes the IP pseudo header) (Auto).
ip_addresseslist<ipv6> — count_ipvx_addrs * 16 octets1 itemsVirtual router addresses.

type

ValueName
1advertisement

Constraints

LevelRule
warningversion = 3

Sample templates

  • vrrpv3-ipv6 — templates/protocols/fhrp/vrrpv3-ipv6.wpg.yaml

IGMP (igmp)

Reached from

Lower layerSelectorValue
ipv4protocol2 (0x02)

Fields

FieldTypeDefaultAutoDescription
typeenum(8)17 (membership_query)Protocol number of the next layer (see Next layer)IGMP message type (Auto from the body: 0x11 query, 0x12 / 0x16 report, 0x17 leave, 0x22 v3 report).
max_resp_codeuint(8)100Maximum response time / code in 1/10 s (queries; zero in reports).
checksumuint(16)Internet checksum over the header and everything after itInternet checksum over the whole IGMP message (Auto).

type

ValueName
17 (0x11)membership_query
18 (0x12)v1_membership_report
22 (0x16)v2_membership_report
23 (0x17)leave_group
34 (0x22)v3_membership_report

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
17 (0x11)igmpv3_queryat least 8 octets remaining
17 (0x11)igmpv2
18 (0x12)igmpv2
22 (0x16)igmpv2
23 (0x17)igmpv2
34 (0x22)igmpv3_report

Sample templates

  • igmpv2-query — templates/protocols/mcast/igmpv2-query.wpg.yaml
  • igmpv3-query — templates/protocols/mcast/igmpv3-query.wpg.yaml
  • igmpv3-report — templates/protocols/mcast/igmpv3-report.wpg.yaml

IGMPv1/v2 (igmpv2)

Reached from

Lower layerSelectorValue
igmptype17 (0x11)
igmptype18 (0x12)
igmptype22 (0x16)
igmptype23 (0x17)

Fields

FieldTypeDefaultAutoDescription
groupipv40.0.0.0Multicast group address (0.0.0.0 in a general query).

Sample templates

  • igmpv2-query — templates/protocols/mcast/igmpv2-query.wpg.yaml

IGMPv3 Query (igmpv3_query)

Reached from

Lower layerSelectorValue
igmptype17 (0x11) (at least 8 octets remaining)

Fields

FieldTypeDefaultAutoDescription
groupipv40.0.0.0Multicast group address (0.0.0.0 in a general query).
reserveduint(4)0
suint(1)0Suppress router-side processing flag.
qrvuint(3)2Querier’s Robustness Variable.
qqicuint(8)125Querier’s Query Interval Code.
num_sourcesuint(16)Number of items of sourcesNumber of source addresses.
sourceslist<ipv4> — num_sources * 4 octets[]Source addresses.

Sample templates

  • igmpv3-query — templates/protocols/mcast/igmpv3-query.wpg.yaml

IGMPv3 Report (igmpv3_report)

Reached from

Lower layerSelectorValue
igmptype34 (0x22)

Fields

FieldTypeDefaultAutoDescription
reserveduint(16)0
num_group_recordsuint(16)Number of items of group_recordsNumber of group records.
group_recordslist<struct> — rest of the PDU1 itemsGroup records (record type, aux data length, sources, multicast address).

group_records

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
record_typeenum(8)4 (change_to_exclude)
aux_data_lenuint(8)0
num_sourcesuint(16)Number of items of sources
multicast_addressipv4239.1.1.1
sourceslist<ipv4> — num_sources * 4 octets[]
aux_databytes — aux_data_len * 4 octets""

group_records › record_type

ValueName
1 (0x01)mode_is_include
2 (0x02)mode_is_exclude
3 (0x03)change_to_include
4 (0x04)change_to_exclude
5 (0x05)allow_new_sources
6 (0x06)block_old_sources

Sample templates

  • igmpv3-report — templates/protocols/mcast/igmpv3-report.wpg.yaml

MLDv1 (mld)

Reached from

Lower layerSelectorValue
icmpv6type130 (0x82)
icmpv6type131 (0x83)
icmpv6type132 (0x84)

Fields

FieldTypeDefaultAutoDescription
max_resp_delayuint(16)10000Maximum response delay / code, in milliseconds.
reserveduint(16)0
multicast_addressipv6::IPv6 multicast address (:: in a general query).

Sample templates

  • mldv1-query — templates/protocols/mcast/mldv1-query.wpg.yaml

MLDv2 Query (mldv2_query)

Reached from

Lower layerSelectorValue
icmpv6type130 (0x82) (at least 24 octets remaining)

Fields

FieldTypeDefaultAutoDescription
max_resp_codeuint(16)10000Maximum response delay / code, in milliseconds.
reserveduint(16)0
multicast_addressipv6::IPv6 multicast address (:: in a general query).
reserved2uint(4)0
suint(1)0Suppress router-side processing flag.
qrvuint(3)2Querier’s Robustness Variable.
qqicuint(8)125Querier’s Query Interval Code.
num_sourcesuint(16)Number of items of sourcesNumber of source addresses.
sourceslist<ipv6> — num_sources * 16 octets[]Source addresses.

Sample templates

  • mldv2-query — templates/protocols/mcast/mldv2-query.wpg.yaml

MLDv2 Report (mldv2_report)

Reached from

Lower layerSelectorValue
icmpv6type143 (0x8f)

Fields

FieldTypeDefaultAutoDescription
reserveduint(16)0
num_recordsuint(16)Number of items of recordsNumber of group records.
recordslist<struct> — rest of the PDU1 itemsGroup records (record type, aux data length, sources, multicast address).

records

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
record_typeenum(8)4 (change_to_exclude)
aux_data_lenuint(8)0
num_sourcesuint(16)Number of items of sources
multicast_addressipv6ff05::1
sourceslist<ipv6> — num_sources * 16 octets[]
aux_databytes — aux_data_len * 4 octets""

records › record_type

ValueName
1 (0x01)mode_is_include
2 (0x02)mode_is_exclude
3 (0x03)change_to_include
4 (0x04)change_to_exclude
5 (0x05)allow_new_sources
6 (0x06)block_old_sources

Sample templates

  • mldv2-report — templates/protocols/mcast/mldv2-report.wpg.yaml

PIM (pim)

Reached from

Lower layerSelectorValue
ipv4protocol103 (0x67)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)2PIM version (2).
typeenum(4)0 (hello)Protocol number of the next layer (see Next layer)PIM message type (Auto from the body: 0 Hello, 1 Register, 3 Join/Prune).
reserveduint(8)0
checksumuint(16)Internet checksum over the header and everything after itInternet checksum (whole message; Register: first 8 octets only) (Auto).

type

ValueName
0hello
1register
2register_stop
3join_prune
4bootstrap
5assert
6graft
7graft_ack
8candidate_rp_advertisement

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0pim_hello
3pim_join_prune

Constraints

LevelRule
warningversion = 2

Sample templates

PIM Hello (pim_hello)

Reached from

Lower layerSelectorValue
pimtype0

Fields

FieldTypeDefaultAutoDescription
optionstlv — rest of the PDU3 itemsPIM Hello options (Holdtime, LAN Prune Delay, DR Priority, Generation ID, Address List).

options

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)holdtimeholdtime
2 (0x0002)lan_prune_delayt, propagation_delay, override_interval
19 (0x0013)dr_prioritypriority
20 (0x0014)generation_idgeneration_id
24 (0x0018)address_list

options › holdtime

FieldTypeDefaultAutoDescription
holdtimeuint(16)105

options › lan_prune_delay

FieldTypeDefaultAutoDescription
tuint(1)0
propagation_delayuint(15)500
override_intervaluint(16)2500

options › dr_priority

FieldTypeDefaultAutoDescription
priorityuint(32)1

options › generation_id

FieldTypeDefaultAutoDescription
generation_iduint(32)0

Sample templates

PIM Join/Prune (pim_join_prune)

Reached from

Lower layerSelectorValue
pimtype3

Fields

FieldTypeDefaultAutoDescription
upstream_familyuint(8)1Address family of the encoded address (1 = IPv4).
upstream_encodinguint(8)0
upstream_neighboripv4192.0.2.1Upstream neighbor address the Join/Prune is addressed to.
reserveduint(8)0
num_groupsuint(8)Number of items of groupsNumber of group sets.
holdtimeuint(16)210Time the Join/Prune state is kept, in seconds.
groupslist<struct> — rest of the PDU1 itemsGroup sets (encoded group, joined and pruned encoded sources).

groups

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
familyuint(8)1
encodinguint(8)0
flagsflags(8)0x0
mask_lenuint(8)32
group_addressipv4239.1.1.1
num_joineduint(16)Number of items of joined
num_pruneduint(16)Number of items of pruned
joinedlist<struct> — num_joined * 8 octets[]
prunedlist<struct> — num_pruned * 8 octets[]

groups › flags

BitMaskName
7128 (0x80)bidir
01 (0x01)admin_scope

groups › joined

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
familyuint(8)1
encodinguint(8)0
flagsflags(8)0x4
mask_lenuint(8)32
addressipv4192.0.2.10
groups › joined › flags
BitMaskName
24 (0x04)sparse
12 (0x02)wildcard
01 (0x01)rpt

groups › pruned

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
familyuint(8)1
encodinguint(8)0
flagsflags(8)0x4
mask_lenuint(8)32
addressipv4192.0.2.10
groups › pruned › flags
BitMaskName
24 (0x04)sparse
12 (0x02)wildcard
01 (0x01)rpt

Sample templates

  • pim-join-prune — templates/protocols/mcast/pim-join-prune.wpg.yaml

PIM Register (pim_register)

Reached from

Lower layerSelectorValue
ipv4protocol103 (0x67)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)2PIM version (2).
typeuint(4)1PIM message type (Auto from the body: 0 Hello, 1 Register, 3 Join/Prune).
reserveduint(8)0
checksumuint(16)Internet checksum over the headerInternet checksum (whole message; Register: first 8 octets only) (Auto).
borderuint(1)0Border bit (sender is a PIM Multicast Border Router).
null_registeruint(1)0Null-Register bit (no encapsulated data packet).
reserved2uint(30)0

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

First 4 bits of the payload when type = 1

ValueProtocol
4ipv4
6ipv6

Constraints

LevelRule
warningtype = 1

Sample templates

  • pim-register — templates/protocols/mcast/pim-register.wpg.yaml

OSI network PDU (osi)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)(any other value)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)(any other value)

Fields

FieldTypeDefaultAutoDescription
nlpidenum(8)131 (isis)Network layer protocol identifier (ISO/IEC TR 9577): 0x81 CLNP, 0x82 ES-IS, 0x83 IS-IS.
databytes — rest of the PDU""Rest of the OSI PDU after the NLPID (opaque octets).

nlpid

ValueName
0 (0x00)null
129 (0x81)clnp
130 (0x82)esis
131 (0x83)isis
142 (0x8e)ipv6
204 (0xcc)ipv4

Sample templates

  • dot3-llc-osi — templates/protocols/l2/dot3-llc-osi.wpg.yaml

CLNP (clnp)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)129 (0x81)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)129 (0x81)

Fields

FieldTypeDefaultAutoDescription
nlpidenum(8)129 (clnp)Network layer protocol identifier (0x81 = CLNP).
length_indicatoruint(8)Length of the header in octetsHeader length in octets, up to the end of the options (Auto).
versionuint(8)1Version / protocol ID extension (1).
lifetimeuint(8)32Remaining lifetime in units of 500 ms.
spuint(1)Number of items of segmentationSP: segmentation permitted; the segmentation part is present (Auto from the segmentation part).
msuint(1)0MS: more segments follow.
eruint(1)1E/R: send an error report if the PDU is discarded.
pdu_typeenum(5)28 (dt)PDU type: 0x1c DT (data), 0x1d MD (multicast data), 0x01 ER (error report), 0x1e ERQ / 0x1f ERP (echo request / reply).
segment_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU, header and data (Auto).
checksumuint(16)Fletcher checksum over the headerISO 8473 Fletcher checksum of the header (Auto). 0 = checksum not used.
destinationnsap49.0001.0000.0000.0002.00Destination NSAP address.
sourcensap49.0001.0000.0000.0001.00Source NSAP address.
segmentationlist<struct> — sp items[]Segmentation part (data unit identifier, segment offset, total length), present when SP is set. The total length is not computed.
optionstlv — up to offset length_indicator of the group[]Options (8-bit code / 8-bit length) up to the length indicator: security, QoS maintenance, priority, source routing, recording of route, padding, reason for discard.

nlpid

ValueName
129 (0x81)clnp

pdu_type

ValueName
1er
28dt
29md
30erq
31erp

segmentation

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
data_unit_identifieruint(16)
segment_offsetuint(16)
total_lengthuint(16)

options

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
197 (0xc5)securityvalue
195 (0xc3)qos_maintenancevalue
205 (0xcd)priorityvalue
200 (0xc8)source_routingroute_type, next_address, addresses
203 (0xcb)recording_of_routeroute_type, next_address, addresses
204 (0xcc)paddingdata
193 (0xc1)reason_for_discardreason, pointer

options › security

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › qos_maintenance

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › priority

FieldTypeDefaultAutoDescription
valueuint(8)

options › source_routing

FieldTypeDefaultAutoDescription
route_typeenum(8)
next_addressuint(8)
addresseslist<struct> — rest of the PDU
options › source_routing › route_type
ValueName
0 (0x00)partial
255 (0xff)complete
options › source_routing › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

options › recording_of_route

FieldTypeDefaultAutoDescription
route_typeenum(8)
next_addressuint(8)
addresseslist<struct> — rest of the PDU
options › recording_of_route › route_type
ValueName
0 (0x00)partial
255 (0xff)complete
options › recording_of_route › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

options › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

options › reason_for_discard

FieldTypeDefaultAutoDescription
reasonenum(8)
pointeruint(8)
options › reason_for_discard › reason
ValueName
0 (0x00)general
1 (0x01)checksum
2 (0x02)congestion
3 (0x03)header_syntax
4 (0x04)segmentation_needed
5 (0x05)incomplete_pdu
6 (0x06)duplicate_option
128 (0x80)destination_unreachable
129 (0x81)destination_unknown
144 (0x90)source_routing_unspecified
145 (0x91)source_routing_syntax
146 (0x92)source_routing_unknown_address
147 (0x93)source_routing_path_not_acceptable
160 (0xa0)lifetime_expired_in_transit
161 (0xa1)lifetime_expired_reassembly
176 (0xb0)unsupported_option
177 (0xb1)unsupported_version
178 (0xb2)unsupported_security
179 (0xb3)unsupported_source_routing
180 (0xb4)unsupported_recording_of_route
192 (0xc0)reassembly_interference

Sample templates

  • clnp-dt — templates/protocols/l3/clnp-dt.wpg.yaml
  • clnp-er — templates/protocols/l3/clnp-er.wpg.yaml
  • clnp-erq — templates/protocols/l3/clnp-erq.wpg.yaml

ES-IS (esis)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)130 (0x82)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)130 (0x82)

Fields

FieldTypeDefaultAutoDescription
nlpidenum(8)130 (esis)Network layer protocol identifier (0x82 = ES-IS).
length_indicatoruint(8)Length of the header in octetsLength of the PDU in octets (Auto).
versionuint(8)1Version / protocol ID extension (1).
reserveduint(8)0
reserved_typeuint(3)0
pdu_typeenum(5)2 (esh)PDU type: 2 ESH (end system hello), 4 ISH (intermediate system hello), 6 RD (redirect).
holding_timeuint(16)30Holding time in seconds.
checksumuint(16)Fletcher checksum over the headerISO 8473 Fletcher checksum of the PDU (Auto). 0 = checksum not used.
databytes — rest of the PDU""Rest of the PDU after the fixed part (opaque octets).

nlpid

ValueName
130 (0x82)esis

pdu_type

ValueName
2esh
4ish
6rd

Next layer

The next layer is selected by pdu_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2esis_eshre-decodes this layer
4esis_ishre-decodes this layer
6esis_rdre-decodes this layer

Sample templates

  • esis-generic — templates/protocols/routing/esis-generic.wpg.yaml

ES-IS ESH (esis_esh)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)130 (0x82)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)130 (0x82)
esispdu_type2 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
nlpidenum(8)130 (esis)Network layer protocol identifier (0x82 = ES-IS).
length_indicatoruint(8)Length of the header in octetsLength of the PDU in octets (Auto).
versionuint(8)1Version / protocol ID extension (1).
reserveduint(8)0
reserved_typeuint(3)0
pdu_typeenum(5)2 (esh)PDU type: 2 ESH (end system hello), 4 ISH (intermediate system hello), 6 RD (redirect).
holding_timeuint(16)30Holding time in seconds.
checksumuint(16)Fletcher checksum over the headerISO 8473 Fletcher checksum of the PDU (Auto). 0 = checksum not used.
number_of_source_addressesuint(8)Number of items of source_addressesNumber of source addresses (Auto).
source_addresseslist<struct> — number_of_source_addresses items1 itemsNSAP addresses served by the end system.
optionstlv — up to offset length_indicator of the group[]Options (8-bit code / 8-bit length) up to the length indicator: security, QoS maintenance, priority, address mask, SNPA mask, suggested ES configuration timer.

nlpid

ValueName
130 (0x82)esis

pdu_type

ValueName
2esh
4ish
6rd

source_addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

options

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
197 (0xc5)securityvalue
195 (0xc3)qos_maintenancevalue
205 (0xcd)priorityvalue
225 (0xe1)address_maskmask
226 (0xe2)snpa_maskmask
198 (0xc6)es_configuration_timerseconds

options › security

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › qos_maintenance

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › priority

FieldTypeDefaultAutoDescription
valueuint(8)

options › address_mask

FieldTypeDefaultAutoDescription
maskbytes — rest of the PDU

options › snpa_mask

FieldTypeDefaultAutoDescription
maskbytes — rest of the PDU

options › es_configuration_timer

FieldTypeDefaultAutoDescription
secondsuint(16)

Sample templates

  • esis-esh — templates/protocols/routing/esis-esh.wpg.yaml

ES-IS ISH (esis_ish)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)130 (0x82)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)130 (0x82)
esispdu_type4 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
nlpidenum(8)130 (esis)Network layer protocol identifier (0x82 = ES-IS).
length_indicatoruint(8)Length of the header in octetsLength of the PDU in octets (Auto).
versionuint(8)1Version / protocol ID extension (1).
reserveduint(8)0
reserved_typeuint(3)0
pdu_typeenum(5)4 (ish)PDU type: 2 ESH (end system hello), 4 ISH (intermediate system hello), 6 RD (redirect).
holding_timeuint(16)30Holding time in seconds.
checksumuint(16)Fletcher checksum over the headerISO 8473 Fletcher checksum of the PDU (Auto). 0 = checksum not used.
netnsap49.0001.0000.0000.0001.00Network entity title of the intermediate system (redirect: empty when the next hop is an end system).
optionstlv — up to offset length_indicator of the group[]Options (8-bit code / 8-bit length) up to the length indicator: security, QoS maintenance, priority, address mask, SNPA mask, suggested ES configuration timer.

nlpid

ValueName
130 (0x82)esis

pdu_type

ValueName
2esh
4ish
6rd

options

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
197 (0xc5)securityvalue
195 (0xc3)qos_maintenancevalue
205 (0xcd)priorityvalue
225 (0xe1)address_maskmask
226 (0xe2)snpa_maskmask
198 (0xc6)es_configuration_timerseconds

options › security

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › qos_maintenance

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › priority

FieldTypeDefaultAutoDescription
valueuint(8)

options › address_mask

FieldTypeDefaultAutoDescription
maskbytes — rest of the PDU

options › snpa_mask

FieldTypeDefaultAutoDescription
maskbytes — rest of the PDU

options › es_configuration_timer

FieldTypeDefaultAutoDescription
secondsuint(16)

Sample templates

  • esis-ish — templates/protocols/routing/esis-ish.wpg.yaml

ES-IS Redirect (esis_rd)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)130 (0x82)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)130 (0x82)
esispdu_type6 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
nlpidenum(8)130 (esis)Network layer protocol identifier (0x82 = ES-IS).
length_indicatoruint(8)Length of the header in octetsLength of the PDU in octets (Auto).
versionuint(8)1Version / protocol ID extension (1).
reserveduint(8)0
reserved_typeuint(3)0
pdu_typeenum(5)6 (rd)PDU type: 2 ESH (end system hello), 4 ISH (intermediate system hello), 6 RD (redirect).
holding_timeuint(16)30Holding time in seconds.
checksumuint(16)Fletcher checksum over the headerISO 8473 Fletcher checksum of the PDU (Auto). 0 = checksum not used.
destinationnsap49.0001.0000.0000.0002.00Destination NSAP address being redirected.
bsnpa_lengthuint(8)Size of bsnpa in octetsLength of the subnetwork address (Auto).
bsnpabytes — bsnpa_length octets02 00 00 00 00 02Subnetwork address (e.g. MAC address) of the better next hop.
netnsap49.0001.0000.0000.0002.00Network entity title of the intermediate system (redirect: empty when the next hop is an end system).
optionstlv — up to offset length_indicator of the group[]Options (8-bit code / 8-bit length) up to the length indicator: security, QoS maintenance, priority, address mask, SNPA mask, suggested ES configuration timer.

nlpid

ValueName
130 (0x82)esis

pdu_type

ValueName
2esh
4ish
6rd

options

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
197 (0xc5)securityvalue
195 (0xc3)qos_maintenancevalue
205 (0xcd)priorityvalue
225 (0xe1)address_maskmask
226 (0xe2)snpa_maskmask
198 (0xc6)es_configuration_timerseconds

options › security

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › qos_maintenance

FieldTypeDefaultAutoDescription
valuebytes — rest of the PDU

options › priority

FieldTypeDefaultAutoDescription
valueuint(8)

options › address_mask

FieldTypeDefaultAutoDescription
maskbytes — rest of the PDU

options › snpa_mask

FieldTypeDefaultAutoDescription
maskbytes — rest of the PDU

options › es_configuration_timer

FieldTypeDefaultAutoDescription
secondsuint(16)

Sample templates

  • esis-rd — templates/protocols/routing/esis-rd.wpg.yaml

IS-IS (isis)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)27Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)15 (l1_lan_hello)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
databytes — rest of the PDU""Rest of the PDU after the common header (opaque octets).

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

Next layer

The next layer is selected by pdu_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
15isis_l1_lan_hellore-decodes this layer
16isis_l2_lan_hellore-decodes this layer
17isis_p2p_hellore-decodes this layer
18isis_l1_lspre-decodes this layer
20isis_l2_lspre-decodes this layer
24isis_l1_csnpre-decodes this layer
25isis_l2_csnpre-decodes this layer
26isis_l1_psnpre-decodes this layer
27isis_l2_psnpre-decodes this layer

Sample templates

  • isis-generic — templates/protocols/routing/isis-generic.wpg.yaml

IS-IS L1 LAN Hello (isis_l1_lan_hello)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type15 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)27Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)15 (l1_lan_hello)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
reserved_ctuint(6)0
circuit_typeenum(2)3 (l1_l2)Circuit type: 1 = L1, 2 = L2, 3 = L1/L2.
source_idbytes(6)00 00 00 00 00 01System ID of the sender.
holding_timeuint(16)30Holding time in seconds.
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
reserved_priuint(1)0
priorityuint(7)64Priority for designated IS election (0–127).
lan_idbytes(7)00 00 00 00 00 01 01LAN ID: system ID of the designated IS and pseudonode ID.
tlvstlv — rest of the PDU3 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

circuit_type

ValueName
1l1
2l2
3l1_l2

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • A Manual value of pdu_length pads the region with padding items up to that size.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 27

Sample templates

IS-IS L2 LAN Hello (isis_l2_lan_hello)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type16 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)27Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)16 (l2_lan_hello)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
reserved_ctuint(6)0
circuit_typeenum(2)3 (l1_l2)Circuit type: 1 = L1, 2 = L2, 3 = L1/L2.
source_idbytes(6)00 00 00 00 00 01System ID of the sender.
holding_timeuint(16)30Holding time in seconds.
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
reserved_priuint(1)0
priorityuint(7)64Priority for designated IS election (0–127).
lan_idbytes(7)00 00 00 00 00 01 01LAN ID: system ID of the designated IS and pseudonode ID.
tlvstlv — rest of the PDU3 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

circuit_type

ValueName
1l1
2l2
3l1_l2

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • A Manual value of pdu_length pads the region with padding items up to that size.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 27

Sample templates

IS-IS P2P Hello (isis_p2p_hello)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type17 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)20Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)17 (p2p_hello)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
reserved_ctuint(6)0
circuit_typeenum(2)3 (l1_l2)Circuit type: 1 = L1, 2 = L2, 3 = L1/L2.
source_idbytes(6)00 00 00 00 00 01System ID of the sender.
holding_timeuint(16)30Holding time in seconds.
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
local_circuit_iduint(8)1Local circuit ID.
tlvstlv — rest of the PDU4 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

circuit_type

ValueName
1l1
2l2
3l1_l2

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • A Manual value of pdu_length pads the region with padding items up to that size.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 20

Sample templates

  • isis-p2p-hello — templates/protocols/routing/isis-p2p-hello.wpg.yaml

IS-IS L1 LSP (isis_l1_lsp)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type18 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)27Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)18 (l1_lsp)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
remaining_lifetimeuint(16)1199Remaining lifetime of the LSP in seconds (not covered by the checksum).
lsp_idbytes(8)00 00 00 00 00 01 00 00LSP ID: system ID, pseudonode ID and fragment number.
sequence_numberuint(32)1LSP sequence number.
checksumuint(16)Fletcher checksum over the header and everything after it; irpd, header_length, version_ext, id_length, reserved, pdu_type, version, reserved2, max_area_addresses, pdu_length, remaining_lifetime counted as zeroFletcher checksum from the LSP ID to the end of the PDU (Auto).
partition_repairuint(1)0P bit: partition repair supported.
attachedflags(4)0x0ATT bits: attached to another area (default / delay / expense / error metric).
overloaduint(1)0OL bit: LSP database overload.
is_typeenum(2)1 (l1)IS type: 1 = L1, 3 = L1/L2.
tlvstlv — rest of the PDU6 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

attached

BitMaskName
01default
12delay
24expense
38error

is_type

ValueName
1l1
3l1_l2

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 27

Sample templates

  • isis-l1-lsp — templates/protocols/routing/isis-l1-lsp.wpg.yaml

IS-IS L2 LSP (isis_l2_lsp)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type20 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)27Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)20 (l2_lsp)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
remaining_lifetimeuint(16)1199Remaining lifetime of the LSP in seconds (not covered by the checksum).
lsp_idbytes(8)00 00 00 00 00 01 00 00LSP ID: system ID, pseudonode ID and fragment number.
sequence_numberuint(32)1LSP sequence number.
checksumuint(16)Fletcher checksum over the header and everything after it; irpd, header_length, version_ext, id_length, reserved, pdu_type, version, reserved2, max_area_addresses, pdu_length, remaining_lifetime counted as zeroFletcher checksum from the LSP ID to the end of the PDU (Auto).
partition_repairuint(1)0P bit: partition repair supported.
attachedflags(4)0x0ATT bits: attached to another area (default / delay / expense / error metric).
overloaduint(1)0OL bit: LSP database overload.
is_typeenum(2)3 (l1_l2)IS type: 1 = L1, 3 = L1/L2.
tlvstlv — rest of the PDU6 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

attached

BitMaskName
01default
12delay
24expense
38error

is_type

ValueName
1l1
3l1_l2

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 27

Sample templates

  • isis-l2-lsp — templates/protocols/routing/isis-l2-lsp.wpg.yaml

IS-IS L1 CSNP (isis_l1_csnp)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type24 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)33Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)24 (l1_csnp)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
source_idbytes(7)00 00 00 00 00 01 00System ID of the sender and circuit ID (0).
start_lsp_idbytes(8)00 00 00 00 00 00 00 00First LSP ID covered by the CSNP.
end_lsp_idbytes(8)ff ff ff ff ff ff ff ffLast LSP ID covered by the CSNP.
tlvstlv — rest of the PDU1 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 33

Sample templates

  • isis-l1-csnp — templates/protocols/routing/isis-l1-csnp.wpg.yaml

IS-IS L2 CSNP (isis_l2_csnp)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type25 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)33Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)25 (l2_csnp)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
source_idbytes(7)00 00 00 00 00 01 00System ID of the sender and circuit ID (0).
start_lsp_idbytes(8)00 00 00 00 00 00 00 00First LSP ID covered by the CSNP.
end_lsp_idbytes(8)ff ff ff ff ff ff ff ffLast LSP ID covered by the CSNP.
tlvstlv — rest of the PDU1 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 33

Sample templates

  • isis-l2-csnp — templates/protocols/routing/isis-l2-csnp.wpg.yaml

IS-IS L1 PSNP (isis_l1_psnp)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type26 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)17Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)26 (l1_psnp)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
source_idbytes(7)00 00 00 00 00 01 00System ID of the sender and circuit ID (0).
tlvstlv — rest of the PDU1 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 17

Sample templates

  • isis-l1-psnp — templates/protocols/routing/isis-l1-psnp.wpg.yaml

IS-IS L2 PSNP (isis_l2_psnp)

  • Layer: L3 (network)
  • Header: variable length
  • Notes: IS-IS (P2)

Reached from

Lower layerSelectorValue
llcFirst 8 bits of the payload when dsap = 254 (0xfe)131 (0x83)
pppFirst 8 bits of the payload when protocol = 35 (0x0023)131 (0x83)
isispdu_type27 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
irpdenum(8)131 (isis)Intradomain routing protocol discriminator (0x83 = IS-IS).
header_lengthuint(8)17Length of the fixed header in octets (constant for each PDU type: LAN Hello / LSP 27, P2P Hello 20, CSNP 33, PSNP 17).
version_extuint(8)1Version / protocol ID extension (1).
id_lengthuint(8)0System ID length (0 = 6 octets).
reserveduint(3)0
pdu_typeenum(5)27 (l2_psnp)PDU type (15/16 LAN Hello L1/L2, 17 P2P Hello, 18/20 LSP L1/L2, 24/25 CSNP, 26/27 PSNP).
versionuint(8)1Version (1).
reserved2uint(8)0
max_area_addressesuint(8)0Maximum number of area addresses (0 = 3).
pdu_lengthuint(16)Length of the header and payload in octetsLength of the whole PDU (Auto). On a Hello, a Manual value pads the PDU to that length with Padding TLVs (e.g. 1497 for an MTU of 1500).
source_idbytes(7)00 00 00 00 00 01 00System ID of the sender and circuit ID (0).
tlvstlv — rest of the PDU1 itemsTLVs (8-bit code / 8-bit length) and their sub-TLVs.

irpd

ValueName
131 (0x83)isis

pdu_type

ValueName
15l1_lan_hello
16l2_lan_hello
17p2p_hello
18l1_lsp
20l2_lsp
24l1_csnp
25l2_csnp
26l1_psnp
27l2_psnp

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)area_addressesaddresses
2 (0x02)is_reachabilityvirtual_flag, neighbors
6 (0x06)is_neighborsneighbors
8 (0x08)paddingdata
9 (0x09)lsp_entriesentries
10 (0x0a)authenticationauth_type, value
22 (0x16)extended_is_reachabilityneighbors
128 (0x80)ip_internal_reachabilityprefixes
129 (0x81)protocols_supportednlpids
130 (0x82)ip_external_reachabilityprefixes
132 (0x84)ip_interface_addressesaddresses
134 (0x86)te_router_idrouter_id
135 (0x87)extended_ip_reachabilityprefixes
137 (0x89)dynamic_hostnamehostname
232 (0xe8)ipv6_interface_addressesaddresses
236 (0xec)ipv6_reachabilityprefixes
240 (0xf0)p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242 (0xf2)router_capabilityrouter_id, flags, sub_tlvs

tlvs › area_addresses

FieldTypeDefaultAutoDescription
addresseslist<struct> — rest of the PDU
tlvs › area_addresses › addresses

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
addressnsap

tlvs › is_reachability

FieldTypeDefaultAutoDescription
virtual_flaguint(8)
neighborslist<struct> — rest of the PDU
tlvs › is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
neighbor_idbytes(7)

tlvs › is_neighbors

FieldTypeDefaultAutoDescription
neighborslist<mac> — rest of the PDU

tlvs › padding

FieldTypeDefaultAutoDescription
databytes — rest of the PDU

tlvs › lsp_entries

FieldTypeDefaultAutoDescription
entrieslist<struct> — rest of the PDU
tlvs › lsp_entries › entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
remaining_lifetimeuint(16)
lsp_idbytes(8)
sequence_numberuint(32)
checksumuint(16)

tlvs › authentication

FieldTypeDefaultAutoDescription
auth_typeenum(8)
valuebytes — rest of the PDU
tlvs › authentication › auth_type
ValueName
1 (0x01)cleartext
54 (0x36)hmac_md5

tlvs › extended_is_reachability

FieldTypeDefaultAutoDescription
neighborslist<struct> — rest of the PDU
tlvs › extended_is_reachability › neighbors

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
neighbor_idbytes(7)
metricuint(24)
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets
tlvs › extended_is_reachability › neighbors › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
3 (0x03)admin_groupvalue
4 (0x04)link_idslocal_id, remote_id
6 (0x06)ipv4_interface_addressaddress
8 (0x08)ipv4_neighbor_addressaddress
9 (0x09)max_link_bandwidthvalue
10 (0x0a)max_reservable_bandwidthvalue
11 (0x0b)unreserved_bandwidthvalues
18 (0x12)te_default_metricvalue
31 (0x1f)adj_sidflags, weight, sid
32 (0x20)lan_adj_sidflags, weight, neighbor_id, sid

tlvs › extended_is_reachability › neighbors › sub_tlvs › admin_group

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › link_ids

FieldTypeDefaultAutoDescription
local_iduint(32)
remote_iduint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_interface_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › ipv4_neighbor_address

FieldTypeDefaultAutoDescription
addressipv4

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_link_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › max_reservable_bandwidth

FieldTypeDefaultAutoDescription
valueuint(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › unreserved_bandwidth

FieldTypeDefaultAutoDescription
valuesbytes(32)

tlvs › extended_is_reachability › neighbors › sub_tlvs › te_default_metric

FieldTypeDefaultAutoDescription
valueuint(24)

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
weightuint(8)
neighbor_idbytes(6)
sidbytes — rest of the PDU

tlvs › extended_is_reachability › neighbors › sub_tlvs › lan_adj_sid › flags

BitMaskName
7128 (0x80)f
664 (0x40)b
532 (0x20)v
416 (0x10)l
38 (0x08)s
24 (0x04)p

tlvs › ip_internal_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_internal_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › protocols_supported

FieldTypeDefaultAutoDescription
nlpidslist<enum(8)> — rest of the PDU
tlvs › protocols_supported › nlpids
ValueName
129 (0x81)clnp
142 (0x8e)ipv6
204 (0xcc)ipv4

tlvs › ip_external_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ip_external_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
default_metricuint(8)10
delay_metricuint(8)128
expense_metricuint(8)128
error_metricuint(8)128
ip_addressipv4
subnet_maskipv4

tlvs › ip_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

tlvs › te_router_id

FieldTypeDefaultAutoDescription
router_idipv4

tlvs › extended_ip_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › extended_ip_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
prefix_lengthuint(6)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › extended_ip_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › extended_ip_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › dynamic_hostname

FieldTypeDefaultAutoDescription
hostnamebytes — rest of the PDU

tlvs › ipv6_interface_addresses

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

tlvs › ipv6_reachability

FieldTypeDefaultAutoDescription
prefixeslist<struct> — rest of the PDU
tlvs › ipv6_reachability › prefixes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
metricuint(32)
up_downuint(1)
externaluint(1)
sub_tlvs_presentuint(1)Number of items of sub_tlv_block
reserveduint(5)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets
sub_tlv_blocklist<struct> — sub_tlvs_present items
tlvs › ipv6_reachability › prefixes › sub_tlv_block

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
sub_tlvs_lengthuint(8)Size of sub_tlvs in octets
sub_tlvstlv — sub_tlvs_length octets

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)admin_tagtags
2 (0x02)admin_tag64tags
3 (0x03)prefix_sidflags, algorithm, sid
4 (0x04)prefix_attribute_flagsflags

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag

FieldTypeDefaultAutoDescription
tagslist<uint(32)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › admin_tag64

FieldTypeDefaultAutoDescription
tagslist<uint(64)> — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid

FieldTypeDefaultAutoDescription
flagsflags(8)
algorithmuint(8)
sidbytes — rest of the PDU

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_sid › flags

BitMaskName
7128 (0x80)r
664 (0x40)n
532 (0x20)p
416 (0x10)e
38 (0x08)v
24 (0x04)l

tlvs › ipv6_reachability › prefixes › sub_tlv_block › sub_tlvs › prefix_attribute_flags

FieldTypeDefaultAutoDescription
flagsbytes — rest of the PDU

tlvs › p2p_adjacency_state

FieldTypeDefaultAutoDescription
adjacency_stateenum(8)
extended_local_circuit_iduint(32)
neighbor_system_idbytes(6)
neighbor_extended_local_circuit_iduint(32)
tlvs › p2p_adjacency_state › adjacency_state
ValueName
0 (0x00)up
1 (0x01)initializing
2 (0x02)down

tlvs › router_capability

FieldTypeDefaultAutoDescription
router_idipv4
flagsflags(8)
sub_tlvstlv — rest of the PDU
tlvs › router_capability › flags
BitMaskName
01 (0x01)s
12 (0x02)d
tlvs › router_capability › sub_tlvs
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)sr_capabilitiesflags, ranges
19 (0x13)sr_algorithmsalgorithms
tlvs › router_capability › sub_tlvs › sr_capabilities
FieldTypeDefaultAutoDescription
flagsflags(8)
rangesbytes — rest of the PDU

tlvs › router_capability › sub_tlvs › sr_capabilities › flags

BitMaskName
7128 (0x80)i
664 (0x40)v
tlvs › router_capability › sub_tlvs › sr_algorithms
FieldTypeDefaultAutoDescription
algorithmslist<uint(8)> — rest of the PDU

Constraints

LevelRule
warningheader_length = 17

Sample templates

  • isis-l2-psnp — templates/protocols/routing/isis-l2-psnp.wpg.yaml

TCP (tcp)

Reached from

Lower layerSelectorValue
ipv4protocol6 (0x06)
ipv6next_header6 (0x06)
ipv6_hopoptsnext_header6 (0x06)
ipv6_routenext_header6 (0x06)
ipv6_srhnext_header6 (0x06)
ipv6_fragnext_header6 (0x06)
ipv6_dstoptsnext_header6 (0x06)

Fields

FieldTypeDefaultAutoDescription
src_portuint(16)49152Source port.
dst_portuint(16)80Destination port; selects the next layer (179 = BGP, 646 = LDP, 3868 = Diameter, 5060 = SIP).
sequint(32)0Sequence number of the first data octet (the initial sequence number with SYN).
ackuint(32)0Acknowledgement number, valid when the ACK flag is set.
data_offsetuint(4)Length of the header in 32-bit wordsHeader length in 32-bit words, 5 to 15 (Auto, includes the options).
reserveduint(4)0Reserved bits, 0.
flagsflags(8)0x2Control flags: CWR, ECE, URG, ACK, PSH, RST, SYN, FIN (default SYN).
windowuint(16)65535Receive window in octets (scaled by the window scale option).
checksumuint(16)Internet checksum with pseudo header over the header and everything after itInternet checksum with the IPv4 / IPv6 pseudo header (Auto).
urgent_ptruint(16)0Urgent pointer, valid when the URG flag is set.
optionstlv — data_offset * 4 - 20 octetsTCP options as TLVs: EOL, NOP, MSS, window scale, SACK permitted, SACK, timestamps.
paddingpadding(4)Zero padding of the options to a 32-bit boundary (Auto).

flags

BitMaskName
7128 (0x80)cwr
664 (0x40)ece
532 (0x20)urg
416 (0x10)ack
38 (0x08)psh
24 (0x04)rst
12 (0x02)syn
01 (0x01)fin

options

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)eol(type only, no length or value)
1 (0x01)nop(type only, no length or value)
2 (0x02)mssvalue
3 (0x03)wsshift
4 (0x04)sack_permitted
5 (0x05)sackblocks
8 (0x08)timestampstsval, tsecr

options › mss

FieldTypeDefaultAutoDescription
valueuint(16)

options › ws

FieldTypeDefaultAutoDescription
shiftuint(8)

options › sack

FieldTypeDefaultAutoDescription
blockslist<struct> — rest of the PDU
options › sack › blocks

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
leftuint(32)
rightuint(32)

options › timestamps

FieldTypeDefaultAutoDescription
tsvaluint(32)
tsecruint(32)

Next layer

The next layer is selected by dst_port; when the field is Auto the builder writes the value of the protocol stacked above. When decoding, src_port is looked up too if the first field matches no entry.

ValueProtocolNote
179 (0x00b3)bgp
646 (0x0286)ldp
3868 (0x0f1c)diameter
5060 (0x13c4)sip

Constraints

LevelRule
errordata_offset within 5..15

Sample templates

UDP (udp)

Reached from

Lower layerSelectorValue
ipv4protocol17 (0x11)
ipv6next_header17 (0x11)
ipv6_hopoptsnext_header17 (0x11)
ipv6_routenext_header17 (0x11)
ipv6_srhnext_header17 (0x11)
ipv6_fragnext_header17 (0x11)
ipv6_dstoptsnext_header17 (0x11)

Fields

FieldTypeDefaultAutoDescription
src_portuint(16)49152Source port.
dst_portuint(16)9Destination port; selects the next layer when it is Auto (53 = DNS, 67 / 68 = DHCP, 4789 = VXLAN…).
lengthuint(16)Length of the header and payload in octetsLength of header and payload in octets (Auto).
checksumuint(16)Internet checksum with pseudo header over the header and everything after it; a computed 0 is sent as all onesInternet checksum with the IPv4 / IPv6 pseudo header (Auto; 0 becomes 0xffff).

Next layer

The next layer is selected by dst_port; when the field is Auto the builder writes the value of the protocol stacked above. When decoding, src_port is looked up too if the first field matches no entry.

ValueProtocolNote
520 (0x0208)rip
521 (0x0209)ripng
1701 (0x06a5)l2tpv2
1985 (0x07c1)hsrp
1985 (0x07c1)hsrpv2
2029 (0x07ed)hsrpv2
2152 (0x0868)gtpu
3222 (0x0c96)glbp
4789 (0x12b5)vxlan
6081 (0x17c1)geneve
6635 (0x19eb)mpls
9899 (0x26ab)sctp
646 (0x0286)ldp
3784 (0x0ec8)bfd
4784 (0x12b0)bfd
6784 (0x1a80)bfd
2123 (0x084b)gtpv2
5060 (0x13c4)sip
5004 (0x138c)rtp
5005 (0x138d)rtcp
53 (0x0035)dns
67 (0x0043)dhcpv4
68 (0x0044)dhcpv4
69 (0x0045)tftp
123 (0x007b)ntp
161 (0x00a1)snmp
162 (0x00a2)snmp
514 (0x0202)syslog
546 (0x0222)dhcpv6
547 (0x0223)dhcpv6
1812 (0x0714)radius
1813 (0x0715)radius
319 (0x013f)ptp
319 (0x013f)ptp_sync
319 (0x013f)ptp_delay_req
319 (0x013f)ptp_pdelay_req
319 (0x013f)ptp_pdelay_resp
320 (0x0140)ptp
320 (0x0140)ptp_follow_up
320 (0x0140)ptp_delay_resp
320 (0x0140)ptp_pdelay_resp_follow_up
320 (0x0140)ptp_announce
320 (0x0140)ptp_signaling
320 (0x0140)ptp_management

Constraints

LevelRule
warningheader and payload at least 8 octets

Sample templates

GTP-U (gtpu)

Reached from

Lower layerSelectorValue
udpdst_port / src_port2152 (0x0868)

Fields

FieldTypeDefaultAutoDescription
versionuint(3)1GTP version (1).
protocol_typeuint(1)1Protocol type (1 = GTP, 0 = GTP’).
spareuint(1)0
e_flaguint(1)0Extension-header-present flag.
s_flaguint(1)0Sequence-number-present flag.
pn_flaguint(1)0N-PDU-number-present flag.
message_typeenum(8)255 (g_pdu)GTP-U message type (255 = G-PDU).
lengthuint(16)Length of the payload in octetsLength of the payload after the mandatory header, in octets (Auto).
teiduint(32)0Tunnel Endpoint Identifier.

message_type

ValueName
1 (0x01)echo_request
2 (0x02)echo_response
26 (0x1a)error_indication
31 (0x1f)supported_extension_headers
254 (0xfe)end_marker
255 (0xff)g_pdu

Next layer

The next layer is selected by message_type; when the field is Auto the builder writes the value of the protocol stacked above.

First 4 bits of the payload when message_type = 255 (0xff)

ValueProtocol
4ipv4
6ipv6

Sample templates

  • gtpu-ipv4 — templates/protocols/encap/gtpu-ipv4.wpg.yaml

L2TPv2 (l2tpv2)

Reached from

Lower layerSelectorValue
udpdst_port / src_port1701 (0x06a5)

Fields

FieldTypeDefaultAutoDescription
flagsflags(16)0x2L2TP flags and version (type, length, sequence, offset, priority bits).
bodybytes — rest of the PDU""L2TP body (presence-conditional fields + payload); opaque octets.

flags

BitMaskName
1532768 (0x8000)type_control
1416384 (0x4000)length_present
9512 (0x0200)sequence_present
7128 (0x0080)offset_present
38 (0x0008)priority

Sample templates

  • l2tpv2 — templates/protocols/encap/l2tpv2.wpg.yaml

L2TPv3 (l2tpv3)

Reached from

Lower layerSelectorValue
ipv4protocol115 (0x73)
ipv6next_header115 (0x73)
ipv6_hopoptsnext_header115 (0x73)
ipv6_routenext_header115 (0x73)
ipv6_srhnext_header115 (0x73)
ipv6_fragnext_header115 (0x73)
ipv6_dstoptsnext_header115 (0x73)

Fields

FieldTypeDefaultAutoDescription
session_iduint(32)0L2TPv3 Session ID.
bodybytes — rest of the PDU""L2TP body (presence-conditional fields + payload); opaque octets.

Sample templates

  • l2tpv3 — templates/protocols/encap/l2tpv3.wpg.yaml

SCTP (sctp)

  • Layer: L4 (transport)
  • Header: variable length
  • Notes: SCTP (P2)

Reached from

Lower layerSelectorValue
ipv4protocol132 (0x84)
udpdst_port / src_port9899 (0x26ab)
ipv6next_header132 (0x84)
ipv6_hopoptsnext_header132 (0x84)
ipv6_routenext_header132 (0x84)
ipv6_srhnext_header132 (0x84)
ipv6_fragnext_header132 (0x84)
ipv6_dstoptsnext_header132 (0x84)

Fields

FieldTypeDefaultAutoDescription
src_portuint(16)49152Source port.
dst_portuint(16)9Destination port.
verification_taguint(32)0Verification tag: the peer’s initiate tag (0 in a packet carrying INIT).
checksumuint(32)CRC-32C over the header and everything after itCRC32c of the whole SCTP packet with this field zeroed (Auto), sent least significant octet first.
chunkstlv — rest of the PDU1 itemsChunks (8-bit type, 8-bit flags, 16-bit length including the 4-octet header, zero padding to 4 octets): DATA, INIT, INIT ACK, SACK, HEARTBEAT, ABORT, SHUTDOWN, ERROR, COOKIE ECHO / ACK, AUTH, I-DATA, ASCONF, RE-CONFIG, FORWARD TSN, PAD. Lengths, padding and SACK counts are Auto.

chunks

  • Type 8 bits, length 16 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)dataflags, tsn, stream_identifier, stream_sequence_number, payload_protocol_identifier, user_data
1 (0x01)initflags, initiate_tag, a_rwnd, outbound_streams, inbound_streams, initial_tsn, parameters
2 (0x02)init_ackflags, initiate_tag, a_rwnd, outbound_streams, inbound_streams, initial_tsn, parameters
3 (0x03)sackflags, cumulative_tsn_ack, a_rwnd, number_of_gap_ack_blocks, number_of_duplicate_tsns, gap_ack_blocks, duplicate_tsns
4 (0x04)heartbeatflags, parameters
5 (0x05)heartbeat_ackflags, parameters
6 (0x06)abortflags, causes
7 (0x07)shutdownflags, cumulative_tsn_ack
8 (0x08)shutdown_ackflags
9 (0x09)errorflags, causes
10 (0x0a)cookie_echoflags, cookie
11 (0x0b)cookie_ackflags
14 (0x0e)shutdown_completeflags
15 (0x0f)authflags, shared_key_identifier, hmac_identifier, hmac
64 (0x40)i_dataflags, tsn, stream_identifier, reserved, message_identifier, ppid_or_fsn, user_data
128 (0x80)asconf_ackflags, serial_number, parameters
130 (0x82)re_configflags, parameters
132 (0x84)padflags, padding
192 (0xc0)forward_tsnflags, new_cumulative_tsn, streams
193 (0xc1)asconfflags, serial_number, parameters

chunks › data

FieldTypeDefaultAutoDescription
flagsflags(8)0x3
tsnuint(32)1
stream_identifieruint(16)
stream_sequence_numberuint(16)
payload_protocol_identifieruint(32)
user_databytes — rest of the PDU00 00 00 00
chunks › data › flags
BitMaskName
38 (0x08)i
24 (0x04)u
12 (0x02)b
01 (0x01)e

chunks › init

FieldTypeDefaultAutoDescription
flagsuint(8)0
initiate_taguint(32)1
a_rwnduint(32)106496
outbound_streamsuint(16)10
inbound_streamsuint(16)65535
initial_tsnuint(32)1
parameterstlv — rest of the PDU[]
chunks › init › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › init › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › init › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › init › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › init › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › init › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › init › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › init › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › init › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › init › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › init › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › init › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › init › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › init › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › init › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › init › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › init › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › init › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › init › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › init › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › init › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › init › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › init › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › init › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › init › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › init › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › init › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › init › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › init › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › init › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › init › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › init › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › init › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › init › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › init › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › init › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › init › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › init › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › init › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › init › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › init › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › init › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › init › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › init › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › init › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › init › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › init › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

chunks › init_ack

FieldTypeDefaultAutoDescription
flagsuint(8)0
initiate_taguint(32)2
a_rwnduint(32)106496
outbound_streamsuint(16)10
inbound_streamsuint(16)65535
initial_tsnuint(32)2
parameterstlv — rest of the PDU1 items
chunks › init_ack › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › init_ack › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › init_ack › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › init_ack › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › init_ack › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › init_ack › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › init_ack › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › init_ack › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › init_ack › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › init_ack › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › init_ack › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › init_ack › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › init_ack › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › init_ack › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › init_ack › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › init_ack › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › init_ack › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › init_ack › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › init_ack › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › init_ack › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › init_ack › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › init_ack › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › init_ack › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › init_ack › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › init_ack › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › init_ack › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › init_ack › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › init_ack › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › init_ack › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › init_ack › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › init_ack › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › init_ack › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › init_ack › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › init_ack › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › init_ack › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › init_ack › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › init_ack › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › init_ack › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › init_ack › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › init_ack › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › init_ack › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

chunks › sack

FieldTypeDefaultAutoDescription
flagsuint(8)0
cumulative_tsn_ackuint(32)1
a_rwnduint(32)106496
number_of_gap_ack_blocksuint(16)Number of items of gap_ack_blocks
number_of_duplicate_tsnsuint(16)Number of items of duplicate_tsns
gap_ack_blockslist<struct> — number_of_gap_ack_blocks items
duplicate_tsnslist<uint(32)> — number_of_duplicate_tsns items
chunks › sack › gap_ack_blocks

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
startuint(16)
enduint(16)

chunks › heartbeat

FieldTypeDefaultAutoDescription
flagsuint(8)0
parameterstlv — rest of the PDU
chunks › heartbeat › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › heartbeat › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › heartbeat › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › heartbeat › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › heartbeat › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › heartbeat › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › heartbeat › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › heartbeat › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › heartbeat › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › heartbeat › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › heartbeat › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › heartbeat › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › heartbeat › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › heartbeat › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › heartbeat › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › heartbeat › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › heartbeat › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › heartbeat › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › heartbeat › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › heartbeat › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › heartbeat › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › heartbeat › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › heartbeat › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › heartbeat › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › heartbeat › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › heartbeat › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › heartbeat › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › heartbeat › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › heartbeat › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › heartbeat › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › heartbeat › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › heartbeat › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › heartbeat › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › heartbeat › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › heartbeat › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › heartbeat › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › heartbeat › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

chunks › heartbeat_ack

FieldTypeDefaultAutoDescription
flagsuint(8)0
parameterstlv — rest of the PDU
chunks › heartbeat_ack › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › heartbeat_ack › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › heartbeat_ack › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat_ack › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › heartbeat_ack › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › heartbeat_ack › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › heartbeat_ack › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › heartbeat_ack › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › heartbeat_ack › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › heartbeat_ack › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › heartbeat_ack › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › heartbeat_ack › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › heartbeat_ack › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › heartbeat_ack › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › heartbeat_ack › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › heartbeat_ack › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › heartbeat_ack › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › heartbeat_ack › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › heartbeat_ack › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › heartbeat_ack › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › heartbeat_ack › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › heartbeat_ack › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › heartbeat_ack › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › heartbeat_ack › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat_ack › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › heartbeat_ack › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › heartbeat_ack › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › heartbeat_ack › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat_ack › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › heartbeat_ack › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › heartbeat_ack › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › heartbeat_ack › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › heartbeat_ack › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › heartbeat_ack › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › heartbeat_ack › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › heartbeat_ack › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › heartbeat_ack › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › heartbeat_ack › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › heartbeat_ack › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › heartbeat_ack › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › heartbeat_ack › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

chunks › abort

FieldTypeDefaultAutoDescription
flagsflags(8)0x0
causestlv — rest of the PDU
chunks › abort › flags
BitMaskName
01 (0x01)t
chunks › abort › causes
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier
chunks › abort › causes › invalid_stream_identifier
FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0
chunks › abort › causes › missing_mandatory_parameter
FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items
FieldTypeDefaultAutoDescription
staleness_usuint(32)
chunks › abort › causes › unresolvable_address
FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU
chunks › abort › causes › unrecognized_chunk_type
FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU
chunks › abort › causes › unrecognized_parameters
FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU
chunks › abort › causes › no_user_data
FieldTypeDefaultAutoDescription
tsnuint(32)
chunks › abort › causes › restart_with_new_addresses
FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU
chunks › abort › causes › user_initiated_abort
FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU
chunks › abort › causes › protocol_violation
FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU
chunks › abort › causes › unsupported_hmac_identifier
FieldTypeDefaultAutoDescription
hmac_identifieruint(16)

chunks › shutdown

FieldTypeDefaultAutoDescription
flagsuint(8)0
cumulative_tsn_ackuint(32)

chunks › shutdown_ack

FieldTypeDefaultAutoDescription
flagsuint(8)0

chunks › error

FieldTypeDefaultAutoDescription
flagsuint(8)0
causestlv — rest of the PDU
chunks › error › causes
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier
chunks › error › causes › invalid_stream_identifier
FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0
chunks › error › causes › missing_mandatory_parameter
FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items
FieldTypeDefaultAutoDescription
staleness_usuint(32)
chunks › error › causes › unresolvable_address
FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU
chunks › error › causes › unrecognized_chunk_type
FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU
chunks › error › causes › unrecognized_parameters
FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU
chunks › error › causes › no_user_data
FieldTypeDefaultAutoDescription
tsnuint(32)
chunks › error › causes › restart_with_new_addresses
FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU
chunks › error › causes › user_initiated_abort
FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU
chunks › error › causes › protocol_violation
FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU
chunks › error › causes › unsupported_hmac_identifier
FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
FieldTypeDefaultAutoDescription
flagsuint(8)0
cookiebytes — rest of the PDU
FieldTypeDefaultAutoDescription
flagsuint(8)0

chunks › shutdown_complete

FieldTypeDefaultAutoDescription
flagsflags(8)0x0
chunks › shutdown_complete › flags
BitMaskName
01 (0x01)t

chunks › auth

FieldTypeDefaultAutoDescription
flagsuint(8)0
shared_key_identifieruint(16)
hmac_identifieruint(16)1
hmacbytes — rest of the PDU

chunks › i_data

FieldTypeDefaultAutoDescription
flagsflags(8)0x3
tsnuint(32)1
stream_identifieruint(16)
reserveduint(16)0
message_identifieruint(32)
ppid_or_fsnuint(32)
user_databytes — rest of the PDU00 00 00 00
chunks › i_data › flags
BitMaskName
38 (0x08)i
24 (0x04)u
12 (0x02)b
01 (0x01)e

chunks › asconf_ack

FieldTypeDefaultAutoDescription
flagsuint(8)0
serial_numberuint(32)
parameterstlv — rest of the PDU
chunks › asconf_ack › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › asconf_ack › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › asconf_ack › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf_ack › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › asconf_ack › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › asconf_ack › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › asconf_ack › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › asconf_ack › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › asconf_ack › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › asconf_ack › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › asconf_ack › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › asconf_ack › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › asconf_ack › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › asconf_ack › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › asconf_ack › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › asconf_ack › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › asconf_ack › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › asconf_ack › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › asconf_ack › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › asconf_ack › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › asconf_ack › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › asconf_ack › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › asconf_ack › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › asconf_ack › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf_ack › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › asconf_ack › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › asconf_ack › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › asconf_ack › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf_ack › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › asconf_ack › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › asconf_ack › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › asconf_ack › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › asconf_ack › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › asconf_ack › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › asconf_ack › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › asconf_ack › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › asconf_ack › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › asconf_ack › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › asconf_ack › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf_ack › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › asconf_ack › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

chunks › re_config

FieldTypeDefaultAutoDescription
flagsuint(8)0
parameterstlv — rest of the PDU
chunks › re_config › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › re_config › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › re_config › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › re_config › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › re_config › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › re_config › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › re_config › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › re_config › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › re_config › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › re_config › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › re_config › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › re_config › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › re_config › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › re_config › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › re_config › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › re_config › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › re_config › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › re_config › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › re_config › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › re_config › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › re_config › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › re_config › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › re_config › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › re_config › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › re_config › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › re_config › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › re_config › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › re_config › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › re_config › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › re_config › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › re_config › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › re_config › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › re_config › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › re_config › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › re_config › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › re_config › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › re_config › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › re_config › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › re_config › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › re_config › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › re_config › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

chunks › pad

FieldTypeDefaultAutoDescription
flagsuint(8)0
paddingbytes — rest of the PDU

chunks › forward_tsn

FieldTypeDefaultAutoDescription
flagsuint(8)0
new_cumulative_tsnuint(32)
streamslist<struct> — rest of the PDU
chunks › forward_tsn › streams

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
streamuint(16)
stream_sequenceuint(16)

chunks › asconf

FieldTypeDefaultAutoDescription
flagsuint(8)0
serial_numberuint(32)
parameterstlv — rest of the PDU
chunks › asconf › parameters
  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress
1 (0x0001)heartbeat_infoinfo
7 (0x0007)state_cookiecookie
8 (0x0008)unrecognized_parameterparameter
9 (0x0009)cookie_preservativeincrement_ms
11 (0x000b)host_name_addresshost_name
12 (0x000c)supported_address_typestypes
13 (0x000d)outgoing_ssn_reset_requestrequest_sequence, response_sequence, last_tsn, streams
14 (0x000e)incoming_ssn_reset_requestrequest_sequence, streams
15 (0x000f)ssn_tsn_reset_requestrequest_sequence
16 (0x0010)reconfiguration_responseresponse_sequence, result, tsns
17 (0x0011)add_outgoing_streams_requestrequest_sequence, number_of_new_streams, reserved
18 (0x0012)add_incoming_streams_requestrequest_sequence, number_of_new_streams, reserved
32768 (0x8000)ecn_capable
32770 (0x8002)randomrandom
32771 (0x8003)chunk_listchunk_types
32772 (0x8004)requested_hmac_algorithmhmac_identifiers
32773 (0x8005)paddingpadding
32776 (0x8008)supported_extensionschunk_types
49152 (0xc000)forward_tsn_supported
49153 (0xc001)add_ip_addresscorrelation_id, address
49154 (0xc002)delete_ip_addresscorrelation_id, address
49155 (0xc003)error_cause_indicationcorrelation_id, causes
49156 (0xc004)set_primary_addresscorrelation_id, address
49157 (0xc005)success_indicationcorrelation_id
49158 (0xc006)adaptation_layer_indicationindication
chunks › asconf › parameters › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4
chunks › asconf › parameters › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf › parameters › heartbeat_info
FieldTypeDefaultAutoDescription
infobytes — rest of the PDU
FieldTypeDefaultAutoDescription
cookiebytes — rest of the PDU
chunks › asconf › parameters › unrecognized_parameter
FieldTypeDefaultAutoDescription
parameterbytes — rest of the PDU
FieldTypeDefaultAutoDescription
increment_msuint(32)
chunks › asconf › parameters › host_name_address
FieldTypeDefaultAutoDescription
host_namebytes — rest of the PDU
chunks › asconf › parameters › supported_address_types
FieldTypeDefaultAutoDescription
typeslist<enum(16)> — rest of the PDU

chunks › asconf › parameters › supported_address_types › types

ValueName
5 (0x0005)ipv4
6 (0x0006)ipv6
11 (0x000b)host_name
chunks › asconf › parameters › outgoing_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
response_sequenceuint(32)
last_tsnuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › asconf › parameters › incoming_ssn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
streamslist<uint(16)> — rest of the PDU
chunks › asconf › parameters › ssn_tsn_reset_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
chunks › asconf › parameters › reconfiguration_response
FieldTypeDefaultAutoDescription
response_sequenceuint(32)
resultenum(32)
tsnsbytes — rest of the PDU

chunks › asconf › parameters › reconfiguration_response › result

ValueName
0 (0x00000000)success_nothing_to_do
1 (0x00000001)success_performed
2 (0x00000002)denied
3 (0x00000003)error_wrong_ssn
4 (0x00000004)error_request_already_in_progress
5 (0x00000005)error_bad_sequence_number
6 (0x00000006)in_progress
chunks › asconf › parameters › add_outgoing_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › asconf › parameters › add_incoming_streams_request
FieldTypeDefaultAutoDescription
request_sequenceuint(32)
number_of_new_streamsuint(16)
reserveduint(16)0
chunks › asconf › parameters › random
FieldTypeDefaultAutoDescription
randombytes — rest of the PDU
chunks › asconf › parameters › chunk_list
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › asconf › parameters › requested_hmac_algorithm
FieldTypeDefaultAutoDescription
hmac_identifierslist<uint(16)> — rest of the PDU
chunks › asconf › parameters › padding
FieldTypeDefaultAutoDescription
paddingbytes — rest of the PDU
chunks › asconf › parameters › supported_extensions
FieldTypeDefaultAutoDescription
chunk_typeslist<uint(8)> — rest of the PDU
chunks › asconf › parameters › add_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › asconf › parameters › add_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › asconf › parameters › add_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › asconf › parameters › add_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf › parameters › delete_ip_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › asconf › parameters › delete_ip_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › asconf › parameters › delete_ip_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › asconf › parameters › delete_ip_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf › parameters › error_cause_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
causestlv — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)invalid_stream_identifierstream_identifier, reserved
2 (0x0002)missing_mandatory_parameternumber_of_missing_parameters, missing_parameters
3 (0x0003)stale_cookiestaleness_us
4 (0x0004)out_of_resource
5 (0x0005)unresolvable_addressaddress
6 (0x0006)unrecognized_chunk_typechunk
7 (0x0007)invalid_mandatory_parameter
8 (0x0008)unrecognized_parametersparameters
9 (0x0009)no_user_datatsn
10 (0x000a)cookie_received_while_shutting_down
11 (0x000b)restart_with_new_addressesaddresses
12 (0x000c)user_initiated_abortreason
13 (0x000d)protocol_violationinformation
160 (0x00a0)request_to_delete_last_address
161 (0x00a1)operation_refused
162 (0x00a2)request_to_delete_source_address
163 (0x00a3)illegal_asconf_ack
164 (0x00a4)request_refused
261 (0x0105)unsupported_hmac_identifierhmac_identifier

chunks › asconf › parameters › error_cause_indication › causes › invalid_stream_identifier

FieldTypeDefaultAutoDescription
stream_identifieruint(16)
reserveduint(16)0

chunks › asconf › parameters › error_cause_indication › causes › missing_mandatory_parameter

FieldTypeDefaultAutoDescription
number_of_missing_parametersuint(32)Number of items of missing_parameters
missing_parameterslist<uint(16)> — number_of_missing_parameters items

chunks › asconf › parameters › error_cause_indication › causes › stale_cookie

FieldTypeDefaultAutoDescription
staleness_usuint(32)

chunks › asconf › parameters › error_cause_indication › causes › unresolvable_address

FieldTypeDefaultAutoDescription
addressbytes — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes › unrecognized_chunk_type

FieldTypeDefaultAutoDescription
chunkbytes — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes › unrecognized_parameters

FieldTypeDefaultAutoDescription
parametersbytes — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes › no_user_data

FieldTypeDefaultAutoDescription
tsnuint(32)

chunks › asconf › parameters › error_cause_indication › causes › restart_with_new_addresses

FieldTypeDefaultAutoDescription
addressesbytes — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes › user_initiated_abort

FieldTypeDefaultAutoDescription
reasonbytes — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes › protocol_violation

FieldTypeDefaultAutoDescription
informationbytes — rest of the PDU

chunks › asconf › parameters › error_cause_indication › causes › unsupported_hmac_identifier

FieldTypeDefaultAutoDescription
hmac_identifieruint(16)
chunks › asconf › parameters › set_primary_address
FieldTypeDefaultAutoDescription
correlation_iduint(32)
addresstlv — rest of the PDU

chunks › asconf › parameters › set_primary_address › address

  • Type 16 bits, length 16 bits.
  • The length counts the type and length fields too.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length); the last item is not padded
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ipv4_addressaddress
6 (0x0006)ipv6_addressaddress

chunks › asconf › parameters › set_primary_address › address › ipv4_address

FieldTypeDefaultAutoDescription
addressipv4

chunks › asconf › parameters › set_primary_address › address › ipv6_address

FieldTypeDefaultAutoDescription
addressipv6
chunks › asconf › parameters › success_indication
FieldTypeDefaultAutoDescription
correlation_iduint(32)
chunks › asconf › parameters › adaptation_layer_indication
FieldTypeDefaultAutoDescription
indicationuint(32)

Constraints

LevelRule
warningheader and payload at least 12 octets

Sample templates

  • sctp-abort — templates/protocols/l4/sctp-abort.wpg.yaml
  • sctp-data — templates/protocols/l4/sctp-data.wpg.yaml
  • sctp-heartbeat — templates/protocols/l4/sctp-heartbeat.wpg.yaml
  • sctp-init-ack — templates/protocols/l4/sctp-init-ack.wpg.yaml
  • sctp-init — templates/protocols/l4/sctp-init.wpg.yaml
  • sctp-over-udp — templates/protocols/l4/sctp-over-udp.wpg.yaml
  • sctp-sack — templates/protocols/l4/sctp-sack.wpg.yaml
  • sctp-shutdown — templates/protocols/l4/sctp-shutdown.wpg.yaml

RSVP (rsvp)

Reached from

Lower layerSelectorValue
ipv4protocol46 (0x2e)
ipv6next_header46 (0x2e)
ipv6_hopoptsnext_header46 (0x2e)
ipv6_routenext_header46 (0x2e)
ipv6_srhnext_header46 (0x2e)
ipv6_fragnext_header46 (0x2e)
ipv6_dstoptsnext_header46 (0x2e)

Fields

FieldTypeDefaultAutoDescription
versionuint(4)1RSVP version (1).
flagsflags(4)0x0Flags (bit 0: refresh reduction capable, RFC 2961).
msg_typeenum(8)1 (path)Message type (1 Path, 2 Resv, 3 PathErr, 4 ResvErr, 5 PathTear, 6 ResvTear, 7 ResvConf, 12 Bundle, 13 Ack, 15 Srefresh, 20 Hello).
checksumuint(16)Internet checksum over the headerInternet checksum of the whole message with this field zeroed (Auto).
send_ttluint(8)64IP TTL the message was sent with.
reserveduint(8)0Reserved (0).
lengthuint(16)Length of the header in octetsLength of the whole message in octets, including the common header (Auto).
objectstlv — length - 8 octets7 itemsObjects (16-bit length including the 4-octet header, Class-Num, C-Type): SESSION, RSVP_HOP, TIME_VALUES, ERROR_SPEC, SCOPE, STYLE, FLOWSPEC, FILTER_SPEC, SENDER_TEMPLATE, SENDER_TSPEC, RESV_CONFIRM, LABEL, LABEL_REQUEST, EXPLICIT_ROUTE, RECORD_ROUTE, HELLO, MESSAGE_ID, SESSION_ATTRIBUTE. Lengths, the session name length and padding are Auto.

flags

BitMaskName
01refresh_reduction_capable

msg_type

ValueName
1 (0x01)path
2 (0x02)resv
3 (0x03)path_err
4 (0x04)resv_err
5 (0x05)path_tear
6 (0x06)resv_tear
7 (0x07)resv_conf
12 (0x0c)bundle
13 (0x0d)ack
15 (0x0f)srefresh
20 (0x14)hello

objects

  • Type 16 bits, length 16 bits.
  • The length comes before the type.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
257 (0x0101)session_ipv4destination, protocol_id, flags, destination_port
258 (0x0102)session_ipv6destination, protocol_id, flags, destination_port
263 (0x0107)session_lsp_tunnel_ipv4tunnel_endpoint, reserved, tunnel_id, extended_tunnel_id
264 (0x0108)session_lsp_tunnel_ipv6tunnel_endpoint, reserved, tunnel_id, extended_tunnel_id
769 (0x0301)rsvp_hop_ipv4address, logical_interface_handle
770 (0x0302)rsvp_hop_ipv6address, logical_interface_handle
1281 (0x0501)time_valuesrefresh_period
1537 (0x0601)error_spec_ipv4node_address, flags, error_code, error_value
1538 (0x0602)error_spec_ipv6node_address, flags, error_code, error_value
1793 (0x0701)scope_ipv4addresses
2049 (0x0801)styleflags, reserved, sharing, sender_selection
2306 (0x0902)flowspecversion, reserved, overall_length, service_number, service_reserved, service_length, parameter_id, parameter_flags, parameter_length, token_bucket_rate, token_bucket_size, peak_data_rate, minimum_policed_unit, maximum_packet_size, parameters
2561 (0x0a01)filter_spec_ipv4source_address, reserved, source_port
2567 (0x0a07)filter_spec_lsp_tunnel_ipv4sender_address, reserved, lsp_id
2568 (0x0a08)filter_spec_lsp_tunnel_ipv6sender_address, reserved, lsp_id
2817 (0x0b01)sender_template_ipv4source_address, reserved, source_port
2823 (0x0b07)sender_template_lsp_tunnel_ipv4sender_address, reserved, lsp_id
2824 (0x0b08)sender_template_lsp_tunnel_ipv6sender_address, reserved, lsp_id
3074 (0x0c02)sender_tspecversion, reserved, overall_length, service_number, service_reserved, service_length, parameter_id, parameter_flags, parameter_length, token_bucket_rate, token_bucket_size, peak_data_rate, minimum_policed_unit, maximum_packet_size, parameters
3841 (0x0f01)resv_confirm_ipv4receiver_address
4097 (0x1001)labellabel
4865 (0x1301)label_requestreserved, l3pid
5121 (0x1401)explicit_routesubobjects
5377 (0x1501)record_routesubobjects
5633 (0x1601)hello_requestsource_instance, destination_instance
5634 (0x1602)hello_acksource_instance, destination_instance
5889 (0x1701)message_idflags, epoch, message_id
6145 (0x1801)message_id_ackflags, epoch, message_id
6146 (0x1802)message_id_nackflags, epoch, message_id
52993 (0xcf01)session_attribute_raexclude_any, include_any, include_all, setup_priority, holding_priority, flags, name_length, name, padding
52999 (0xcf07)session_attributesetup_priority, holding_priority, flags, name_length, name, padding

objects › session_ipv4

FieldTypeDefaultAutoDescription
destinationipv4192.0.2.2
protocol_iduint(8)17
flagsuint(8)0
destination_portuint(16)

objects › session_ipv6

FieldTypeDefaultAutoDescription
destinationipv6
protocol_iduint(8)17
flagsuint(8)0
destination_portuint(16)

objects › session_lsp_tunnel_ipv4

FieldTypeDefaultAutoDescription
tunnel_endpointipv4192.0.2.2
reserveduint(16)0
tunnel_iduint(16)1
extended_tunnel_idipv4192.0.2.1

objects › session_lsp_tunnel_ipv6

FieldTypeDefaultAutoDescription
tunnel_endpointipv6
reserveduint(16)0
tunnel_iduint(16)1
extended_tunnel_idipv6

objects › rsvp_hop_ipv4

FieldTypeDefaultAutoDescription
addressipv4192.0.2.1
logical_interface_handleuint(32)

objects › rsvp_hop_ipv6

FieldTypeDefaultAutoDescription
addressipv6
logical_interface_handleuint(32)

objects › time_values

FieldTypeDefaultAutoDescription
refresh_perioduint(32)30000

objects › error_spec_ipv4

FieldTypeDefaultAutoDescription
node_addressipv4192.0.2.2
flagsuint(8)0
error_codeenum(8)0 (confirmation)
error_valueuint(16)
objects › error_spec_ipv4 › error_code
ValueName
0 (0x00)confirmation
1 (0x01)admission_control_failure
2 (0x02)policy_control_failure
3 (0x03)no_path_information
4 (0x04)no_sender_information
5 (0x05)conflicting_reservation_style
6 (0x06)unknown_reservation_style
7 (0x07)conflicting_destination_ports
8 (0x08)conflicting_sender_ports
12 (0x0c)service_preempted
13 (0x0d)unknown_object_class
14 (0x0e)unknown_object_c_type
20 (0x14)api_error
21 (0x15)traffic_control_error
22 (0x16)traffic_control_system_error
23 (0x17)rsvp_system_error
24 (0x18)routing_problem
25 (0x19)notify

objects › error_spec_ipv6

FieldTypeDefaultAutoDescription
node_addressipv6
flagsuint(8)0
error_codeenum(8)0 (confirmation)
error_valueuint(16)
objects › error_spec_ipv6 › error_code
ValueName
0 (0x00)confirmation
1 (0x01)admission_control_failure
2 (0x02)policy_control_failure
3 (0x03)no_path_information
4 (0x04)no_sender_information
5 (0x05)conflicting_reservation_style
6 (0x06)unknown_reservation_style
7 (0x07)conflicting_destination_ports
8 (0x08)conflicting_sender_ports
12 (0x0c)service_preempted
13 (0x0d)unknown_object_class
14 (0x0e)unknown_object_c_type
20 (0x14)api_error
21 (0x15)traffic_control_error
22 (0x16)traffic_control_system_error
23 (0x17)rsvp_system_error
24 (0x18)routing_problem
25 (0x19)notify

objects › scope_ipv4

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

objects › style

FieldTypeDefaultAutoDescription
flagsuint(8)0
reserveduint(19)0
sharingenum(2)2 (shared)
sender_selectionenum(3)2 (explicit)
objects › style › sharing
ValueName
1distinct
2shared
objects › style › sender_selection
ValueName
1wildcard
2explicit

objects › flowspec

FieldTypeDefaultAutoDescription
versionuint(4)0
reserveduint(12)0
overall_lengthuint(16)7
service_numberuint(8)5
service_reserveduint(8)0
service_lengthuint(16)6
parameter_iduint(8)127
parameter_flagsuint(8)0
parameter_lengthuint(16)5
token_bucket_rateuint(32)1207182336
token_bucket_sizeuint(32)1148846080
peak_data_rateuint(32)2139095040
minimum_policed_unituint(32)0
maximum_packet_sizeuint(32)1500
parametersbytes — rest of the PDU

objects › filter_spec_ipv4

FieldTypeDefaultAutoDescription
source_addressipv4192.0.2.1
reserveduint(16)0
source_portuint(16)

objects › filter_spec_lsp_tunnel_ipv4

FieldTypeDefaultAutoDescription
sender_addressipv4192.0.2.1
reserveduint(16)0
lsp_iduint(16)1

objects › filter_spec_lsp_tunnel_ipv6

FieldTypeDefaultAutoDescription
sender_addressipv6
reserveduint(16)0
lsp_iduint(16)1

objects › sender_template_ipv4

FieldTypeDefaultAutoDescription
source_addressipv4192.0.2.1
reserveduint(16)0
source_portuint(16)

objects › sender_template_lsp_tunnel_ipv4

FieldTypeDefaultAutoDescription
sender_addressipv4192.0.2.1
reserveduint(16)0
lsp_iduint(16)1

objects › sender_template_lsp_tunnel_ipv6

FieldTypeDefaultAutoDescription
sender_addressipv6
reserveduint(16)0
lsp_iduint(16)1

objects › sender_tspec

FieldTypeDefaultAutoDescription
versionuint(4)0
reserveduint(12)0
overall_lengthuint(16)7
service_numberuint(8)1
service_reserveduint(8)0
service_lengthuint(16)6
parameter_iduint(8)127
parameter_flagsuint(8)0
parameter_lengthuint(16)5
token_bucket_rateuint(32)1207182336
token_bucket_sizeuint(32)1148846080
peak_data_rateuint(32)2139095040
minimum_policed_unituint(32)0
maximum_packet_sizeuint(32)1500
parametersbytes — rest of the PDU

objects › resv_confirm_ipv4

FieldTypeDefaultAutoDescription
receiver_addressipv4192.0.2.2

objects › label

FieldTypeDefaultAutoDescription
labeluint(32)16

objects › label_request

FieldTypeDefaultAutoDescription
reserveduint(16)0
l3piduint(16)2048

objects › explicit_route

FieldTypeDefaultAutoDescription
subobjectstlv — rest of the PDU
objects › explicit_route › subobjects
  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)ipv4_prefixaddress, prefix_length, reserved
129 (0x81)ipv4_prefix_looseaddress, prefix_length, reserved
2 (0x02)ipv6_prefixaddress, prefix_length, reserved
130 (0x82)ipv6_prefix_looseaddress, prefix_length, reserved
4 (0x04)unnumbered_interfacereserved, router_id, interface_id
132 (0x84)unnumbered_interface_loosereserved, router_id, interface_id
32 (0x20)as_numberas_number
160 (0xa0)as_number_looseas_number
objects › explicit_route › subobjects › ipv4_prefix
FieldTypeDefaultAutoDescription
addressipv4192.0.2.2
prefix_lengthuint(8)32
reserveduint(8)0
objects › explicit_route › subobjects › ipv4_prefix_loose
FieldTypeDefaultAutoDescription
addressipv4192.0.2.2
prefix_lengthuint(8)32
reserveduint(8)0
objects › explicit_route › subobjects › ipv6_prefix
FieldTypeDefaultAutoDescription
addressipv6
prefix_lengthuint(8)128
reserveduint(8)0
objects › explicit_route › subobjects › ipv6_prefix_loose
FieldTypeDefaultAutoDescription
addressipv6
prefix_lengthuint(8)128
reserveduint(8)0
objects › explicit_route › subobjects › unnumbered_interface
FieldTypeDefaultAutoDescription
reserveduint(16)0
router_idipv4192.0.2.2
interface_iduint(32)
objects › explicit_route › subobjects › unnumbered_interface_loose
FieldTypeDefaultAutoDescription
reserveduint(16)0
router_idipv4192.0.2.2
interface_iduint(32)
objects › explicit_route › subobjects › as_number
FieldTypeDefaultAutoDescription
as_numberuint(16)
objects › explicit_route › subobjects › as_number_loose
FieldTypeDefaultAutoDescription
as_numberuint(16)

objects › record_route

FieldTypeDefaultAutoDescription
subobjectstlv — rest of the PDU
objects › record_route › subobjects
  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)ipv4_addressaddress, prefix_length, flags
2 (0x02)ipv6_addressaddress, prefix_length, flags
3 (0x03)labelflags, c_type, label
4 (0x04)unnumbered_interfaceflags, reserved, router_id, interface_id
objects › record_route › subobjects › ipv4_address
FieldTypeDefaultAutoDescription
addressipv4192.0.2.1
prefix_lengthuint(8)32
flagsuint(8)0
objects › record_route › subobjects › ipv6_address
FieldTypeDefaultAutoDescription
addressipv6
prefix_lengthuint(8)128
flagsuint(8)0
objects › record_route › subobjects › label
FieldTypeDefaultAutoDescription
flagsuint(8)1
c_typeuint(8)1
labeluint(32)
objects › record_route › subobjects › unnumbered_interface
FieldTypeDefaultAutoDescription
flagsuint(8)0
reserveduint(8)0
router_idipv4192.0.2.1
interface_iduint(32)

objects › hello_request

FieldTypeDefaultAutoDescription
source_instanceuint(32)
destination_instanceuint(32)

objects › hello_ack

FieldTypeDefaultAutoDescription
source_instanceuint(32)
destination_instanceuint(32)

objects › message_id

FieldTypeDefaultAutoDescription
flagsuint(8)0
epochuint(24)
message_iduint(32)

objects › message_id_ack

FieldTypeDefaultAutoDescription
flagsuint(8)0
epochuint(24)
message_iduint(32)

objects › message_id_nack

FieldTypeDefaultAutoDescription
flagsuint(8)0
epochuint(24)
message_iduint(32)

objects › session_attribute_ra

FieldTypeDefaultAutoDescription
exclude_anyuint(32)
include_anyuint(32)
include_alluint(32)
setup_priorityuint(8)7
holding_priorityuint(8)7
flagsflags(8)0x4
name_lengthuint(8)Size of name in octets
namebytes — name_length octets74 75 6e 6e 65 6c 31
paddingpadding(4)
objects › session_attribute_ra › flags
BitMaskName
01 (0x01)local_protection_desired
12 (0x02)label_recording_desired
24 (0x04)se_style_desired
38 (0x08)bandwidth_protection_desired
416 (0x10)node_protection_desired

objects › session_attribute

FieldTypeDefaultAutoDescription
setup_priorityuint(8)7
holding_priorityuint(8)7
flagsflags(8)0x4
name_lengthuint(8)Size of name in octets
namebytes — name_length octets74 75 6e 6e 65 6c 31
paddingpadding(4)
objects › session_attribute › flags
BitMaskName
01 (0x01)local_protection_desired
12 (0x02)label_recording_desired
24 (0x04)se_style_desired
38 (0x08)bandwidth_protection_desired
416 (0x10)node_protection_desired

Constraints

LevelRule
warningversion = 1
errorheader at least 8 octets

Sample templates

  • rsvp-hello — templates/protocols/mpls/rsvp-hello.wpg.yaml
  • rsvp-path-err — templates/protocols/mpls/rsvp-path-err.wpg.yaml
  • rsvp-path-tear — templates/protocols/mpls/rsvp-path-tear.wpg.yaml
  • rsvp-te-path — templates/protocols/mpls/rsvp-te-path.wpg.yaml
  • rsvp-te-resv — templates/protocols/mpls/rsvp-te-resv.wpg.yaml

BGP (bgp)

Reached from

Lower layerSelectorValue
tcpdst_port / src_port179 (0x00b3)

Fields

FieldTypeDefaultAutoDescription
markerbytes(16)ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff16-octet marker (all ones).
lengthuint(16)Length of the header and payload in octetsLength of the BGP message including the header, in octets (Auto).
typeenum(8)4 (keepalive)Protocol number of the next layer (see Next layer)BGP message type (OPEN / UPDATE / NOTIFICATION / KEEPALIVE / ROUTE-REFRESH; Auto from the next layer).

type

ValueName
1 (0x01)open
2 (0x02)update
3 (0x03)notification
4 (0x04)keepalive
5 (0x05)route_refresh

Next layer

The next layer is selected by type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)bgp_open
2 (0x02)bgp_update
3 (0x03)bgp_notification
5 (0x05)bgp_route_refresh

Constraints

LevelRule
errorheader and payload at least 19 octets
warningheader and payload at most 4096 octets

Sample templates

  • bgp-keepalive — templates/protocols/routing/bgp-keepalive.wpg.yaml
  • bgp-notification — templates/protocols/routing/bgp-notification.wpg.yaml
  • bgp-open — templates/protocols/routing/bgp-open.wpg.yaml
  • bgp-route-refresh — templates/protocols/routing/bgp-route-refresh.wpg.yaml
  • bgp-update-evpn — templates/protocols/routing/bgp-update-evpn.wpg.yaml
  • bgp-update-mp-ipv6 — templates/protocols/routing/bgp-update-mp-ipv6.wpg.yaml
  • bgp-update-vpnv4 — templates/protocols/routing/bgp-update-vpnv4.wpg.yaml
  • bgp-update — templates/protocols/routing/bgp-update.wpg.yaml

BGP OPEN (bgp_open)

  • Layer: Application and control
  • Header: variable length

Reached from

Lower layerSelectorValue
bgptype1 (0x01)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)4BGP version (4).
my_asuint(16)65001Autonomous system number of the sender (23456 = AS_TRANS for 4-octet AS).
hold_timeuint(16)180Proposed hold time, in seconds (0 or at least 3).
bgp_identifieripv4192.0.2.1BGP identifier (router ID) of the sender.
opt_params_lengthuint(8)Length of the header in octets (-10)Length of the optional parameters, in octets (Auto).
opt_paramstlv — opt_params_length octets1 itemsOptional parameters (type 2 = capabilities).

opt_params

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)capabilitiescapabilities

opt_params › capabilities

FieldTypeDefaultAutoDescription
capabilitiestlv — rest of the PDU
opt_params › capabilities › capabilities
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)multiprotocolafi, reserved, safi
2 (0x02)route_refresh
64 (0x40)graceful_restartrestart_flags, restart_time, address_families
65 (0x41)four_octet_asasn
69 (0x45)add_pathaddress_families
70 (0x46)enhanced_route_refresh
128 (0x80)route_refresh_cisco
opt_params › capabilities › capabilities › multiprotocol
FieldTypeDefaultAutoDescription
afiuint(16)
reserveduint(8)
safiuint(8)
opt_params › capabilities › capabilities › graceful_restart
FieldTypeDefaultAutoDescription
restart_flagsuint(4)
restart_timeuint(12)
address_familiesbytes — rest of the PDU
opt_params › capabilities › capabilities › four_octet_as
FieldTypeDefaultAutoDescription
asnuint(32)
opt_params › capabilities › capabilities › add_path
FieldTypeDefaultAutoDescription
address_familiesbytes — rest of the PDU

Constraints

LevelRule
warningversion = 4

Sample templates

  • bgp-open — templates/protocols/routing/bgp-open.wpg.yaml

BGP UPDATE (bgp_update)

  • Layer: Application and control
  • Header: variable length

Reached from

Lower layerSelectorValue
bgptype2 (0x02)

Fields

FieldTypeDefaultAutoDescription
withdrawn_routes_lengthuint(16)Size of withdrawn_routes in octetsLength of the withdrawn routes, in octets (Auto).
withdrawn_routeslist<struct> — withdrawn_routes_length octets[]Withdrawn IPv4 routes (prefix length in bits, prefix).
total_path_attribute_lengthuint(16)Size of path_attributes in octetsLength of the path attributes, in octets (Auto).
path_attributestlv — total_path_attribute_length octets3 itemsPath attributes (flags + type code; the length is 16 bits with the Extended Length flag, set automatically above 255 octets).
nlrilist<struct> — rest of the PDU1 itemsAnnounced IPv4 routes (prefix length in bits, prefix); other families go in MP_REACH_NLRI.

withdrawn_routes

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes

  • Type 16 bits, length 8 bits.
  • The length counts the value only.
  • Type bit 0x1000 selects a 16-bit length.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
16385 (0x4001)originorigin
16386 (0x4002)as_pathsegments
16387 (0x4003)next_hopnext_hop
32772 (0x8004)multi_exit_discmed
16389 (0x4005)local_preflocal_pref
16390 (0x4006)atomic_aggregate
49159 (0xc007)aggregatorasn, address
49160 (0xc008)communitiesvalues
32782 (0x800e)mp_reach_ipv4_unicastafi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 01 01
32782 (0x800e)mp_reach_ipv6_unicastafi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 02 01
32782 (0x800e)mp_reach_vpnv4afi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 01 80
32782 (0x800e)mp_reach_vpnv6afi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 02 80
32782 (0x800e)mp_reach_evpnafi, safi, next_hop_length, next_hop, reserved, nlri; when the value starts with 00 19 46
32782 (0x800e)mp_reach_nlriafi, safi, next_hop_length, next_hop, reserved, nlri
32783 (0x800f)mp_unreach_ipv4_unicastafi, safi, withdrawn; when the value starts with 00 01 01
32783 (0x800f)mp_unreach_ipv6_unicastafi, safi, withdrawn; when the value starts with 00 02 01
32783 (0x800f)mp_unreach_vpnv4afi, safi, withdrawn; when the value starts with 00 01 80
32783 (0x800f)mp_unreach_vpnv6afi, safi, withdrawn; when the value starts with 00 02 80
32783 (0x800f)mp_unreach_evpnafi, safi, withdrawn; when the value starts with 00 19 46
32783 (0x800f)mp_unreach_nlriafi, safi, withdrawn
49168 (0xc010)extended_communitiesvalues
49184 (0xc020)large_communitiesvalues
49174 (0xc016)pmsi_tunnelflags, tunnel_type, mpls_label, tunnel_id

path_attributes › origin

FieldTypeDefaultAutoDescription
originuint(8)

path_attributes › as_path

FieldTypeDefaultAutoDescription
segmentslist<struct> — rest of the PDU
path_attributes › as_path › segments

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
segment_typeenum(8)
segment_lengthuint(8)
asnslist<uint(32)> — segment_length * 4 octets
path_attributes › as_path › segments › segment_type
ValueName
1 (0x01)as_set
2 (0x02)as_sequence

path_attributes › next_hop

FieldTypeDefaultAutoDescription
next_hopipv4

path_attributes › multi_exit_disc

FieldTypeDefaultAutoDescription
meduint(32)

path_attributes › local_pref

FieldTypeDefaultAutoDescription
local_prefuint(32)

path_attributes › aggregator

FieldTypeDefaultAutoDescription
asnuint(32)
addressipv4

path_attributes › communities

FieldTypeDefaultAutoDescription
valueslist<uint(32)> — rest of the PDU

path_attributes › mp_reach_ipv4_unicast

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)1
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<ipv4> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_ipv4_unicast › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_reach_ipv6_unicast

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)1
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<ipv6> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_ipv6_unicast › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_reach_vpnv4

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)128
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<struct> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_vpnv4 › next_hop

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
rdbytes(8)
addressipv4
path_attributes › mp_reach_vpnv4 › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_reach_vpnv6

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)128
next_hop_lengthuint(8)Size of next_hop in octets
next_hoplist<struct> — next_hop_length octets
reserveduint(8)
nlrilist<struct> — rest of the PDU
path_attributes › mp_reach_vpnv6 › next_hop

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
rdbytes(8)
addressipv6
path_attributes › mp_reach_vpnv6 › nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_reach_evpn

FieldTypeDefaultAutoDescription
afiuint(16)25
safiuint(8)70
next_hop_lengthuint(8)Size of next_hop in octets
next_hopbytes — next_hop_length octets
reserveduint(8)
nlritlv — rest of the PDU
path_attributes › mp_reach_evpn › nlri
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)ethernet_adrd, esi, ethernet_tag, mpls_label
2 (0x02)mac_iprd, esi, ethernet_tag, mac_length, mac, ip_length, ip_address, labels
3 (0x03)inclusive_multicastrd, ethernet_tag, ip_length, originating_ip
4 (0x04)ethernet_segmentrd, esi, ip_length, originating_ip
5 (0x05)ip_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 34 octets
5 (0x05)ipv6_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 58 octets
path_attributes › mp_reach_evpn › nlri › ethernet_ad
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mpls_labeluint(24)
path_attributes › mp_reach_evpn › nlri › mac_ip
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mac_lengthuint(8)
macmac
ip_lengthuint(8)
ip_addressbytes — ip_length / 8 octets
labelslist<uint(24)> — rest of the PDU
path_attributes › mp_reach_evpn › nlri › inclusive_multicast
FieldTypeDefaultAutoDescription
rdbytes(8)
ethernet_taguint(32)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_reach_evpn › nlri › ethernet_segment
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_reach_evpn › nlri › ip_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv4
gatewayipv4
mpls_labeluint(24)
path_attributes › mp_reach_evpn › nlri › ipv6_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv6
gatewayipv6
mpls_labeluint(24)

path_attributes › mp_reach_nlri

FieldTypeDefaultAutoDescription
afiuint(16)
safiuint(8)
next_hop_lengthuint(8)Size of next_hop in octets
next_hopbytes — next_hop_length octets
reserveduint(8)
nlribytes — rest of the PDU

path_attributes › mp_unreach_ipv4_unicast

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)1
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_ipv4_unicast › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_unreach_ipv6_unicast

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)1
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_ipv6_unicast › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

path_attributes › mp_unreach_vpnv4

FieldTypeDefaultAutoDescription
afiuint(16)1
safiuint(8)128
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_vpnv4 › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_unreach_vpnv6

FieldTypeDefaultAutoDescription
afiuint(16)2
safiuint(8)128
withdrawnlist<struct> — rest of the PDU
path_attributes › mp_unreach_vpnv6 › withdrawn

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
labeluint(20)
expuint(3)
bosuint(1)
rdbytes(8)
prefixbytes — (length - 81) / 8 octets

path_attributes › mp_unreach_evpn

FieldTypeDefaultAutoDescription
afiuint(16)25
safiuint(8)70
withdrawntlv — rest of the PDU
path_attributes › mp_unreach_evpn › withdrawn
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)ethernet_adrd, esi, ethernet_tag, mpls_label
2 (0x02)mac_iprd, esi, ethernet_tag, mac_length, mac, ip_length, ip_address, labels
3 (0x03)inclusive_multicastrd, ethernet_tag, ip_length, originating_ip
4 (0x04)ethernet_segmentrd, esi, ip_length, originating_ip
5 (0x05)ip_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 34 octets
5 (0x05)ipv6_prefixrd, esi, ethernet_tag, ip_prefix_length, ip_prefix, gateway, mpls_label; when the value is 58 octets
path_attributes › mp_unreach_evpn › withdrawn › ethernet_ad
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mpls_labeluint(24)
path_attributes › mp_unreach_evpn › withdrawn › mac_ip
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
mac_lengthuint(8)
macmac
ip_lengthuint(8)
ip_addressbytes — ip_length / 8 octets
labelslist<uint(24)> — rest of the PDU
path_attributes › mp_unreach_evpn › withdrawn › inclusive_multicast
FieldTypeDefaultAutoDescription
rdbytes(8)
ethernet_taguint(32)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_unreach_evpn › withdrawn › ethernet_segment
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ip_lengthuint(8)
originating_ipbytes — ip_length / 8 octets
path_attributes › mp_unreach_evpn › withdrawn › ip_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv4
gatewayipv4
mpls_labeluint(24)
path_attributes › mp_unreach_evpn › withdrawn › ipv6_prefix
FieldTypeDefaultAutoDescription
rdbytes(8)
esibytes(10)
ethernet_taguint(32)
ip_prefix_lengthuint(8)
ip_prefixipv6
gatewayipv6
mpls_labeluint(24)

path_attributes › mp_unreach_nlri

FieldTypeDefaultAutoDescription
afiuint(16)
safiuint(8)
withdrawnbytes — rest of the PDU

path_attributes › extended_communities

FieldTypeDefaultAutoDescription
valueslist<uint(64)> — rest of the PDU

path_attributes › large_communities

FieldTypeDefaultAutoDescription
valueslist<struct> — rest of the PDU
path_attributes › large_communities › values

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
global_adminuint(32)
local_data1uint(32)
local_data2uint(32)

path_attributes › pmsi_tunnel

FieldTypeDefaultAutoDescription
flagsuint(8)
tunnel_typeenum(8)
mpls_labeluint(24)
tunnel_idbytes — rest of the PDU
path_attributes › pmsi_tunnel › tunnel_type
ValueName
0 (0x00)none
1 (0x01)rsvp_te_p2mp
2 (0x02)mldp_p2mp
3 (0x03)pim_ssm
4 (0x04)pim_sm
5 (0x05)bidir_pim
6 (0x06)ingress_replication
7 (0x07)mldp_mp2mp

nlri

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)
prefixbytes — (length + 7) / 8 octets

Sample templates

BGP NOTIFICATION (bgp_notification)

  • Layer: Application and control
  • Header: variable length

Reached from

Lower layerSelectorValue
bgptype3 (0x03)

Fields

FieldTypeDefaultAutoDescription
error_codeenum(8)6 (cease)NOTIFICATION error code.
error_subcodeuint(8)2NOTIFICATION error subcode.
databytes — rest of the PDU""Diagnostic data of the NOTIFICATION.

error_code

ValueName
1 (0x01)message_header_error
2 (0x02)open_message_error
3 (0x03)update_message_error
4 (0x04)hold_timer_expired
5 (0x05)fsm_error
6 (0x06)cease
7 (0x07)route_refresh_message_error

Sample templates

BGP ROUTE-REFRESH (bgp_route_refresh)

  • Layer: Application and control
  • Header: 4 octets (fixed)

Reached from

Lower layerSelectorValue
bgptype5 (0x05)

Fields

FieldTypeDefaultAutoDescription
afiuint(16)1Address Family Identifier (1 = IPv4, 2 = IPv6).
subtypeenum(8)0 (normal)ROUTE-REFRESH subtype (0 = normal, 1 = BoRR, 2 = EoRR).
safiuint(8)1Subsequent Address Family Identifier (1 = unicast, 2 = multicast).

subtype

ValueName
0 (0x00)normal
1 (0x01)borr
2 (0x02)eorr

Sample templates

RIP (rip)

Reached from

Lower layerSelectorValue
udpdst_port / src_port520 (0x0208)

Fields

FieldTypeDefaultAutoDescription
commandenum(8)2 (response)RIP command (1 = request, 2 = response).
versionuint(8)2RIP version (1 or 2; RIPng uses 1).
zerouint(16)0
entrieslist<struct> — rest of the PDU1 itemsRoute entries (AFI, route tag, address, mask, next hop, metric).

command

ValueName
1 (0x01)request
2 (0x02)response

entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
afiuint(16)
route_taguint(16)
addressipv4
subnet_maskipv4
next_hopipv4
metricuint(32)

Constraints

LevelRule
warningversion within 1..2

Sample templates

RIPng (ripng)

Reached from

Lower layerSelectorValue
udpdst_port / src_port521 (0x0209)

Fields

FieldTypeDefaultAutoDescription
commandenum(8)2 (response)RIP command (1 = request, 2 = response).
versionuint(8)1RIP version (1 or 2; RIPng uses 1).
reserveduint(16)0
entrieslist<struct> — rest of the PDU1 itemsRoute table entries (prefix, route tag, prefix length, metric; 0xff = next hop).

command

ValueName
1 (0x01)request
2 (0x02)response

entries

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
prefixipv6
route_taguint(16)
prefix_lengthuint(8)
metricuint(8)

Sample templates

  • ripng-response — templates/protocols/routing/ripng-response.wpg.yaml

HSRPv1 (hsrp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port1985 (0x07c1)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)0HSRP version (0 for HSRPv1).
op_codeenum(8)0 (hello)HSRP operation (0 = Hello, 1 = Coup, 2 = Resign, 3 = Advertise).
stateenum(8)16 (active)Sender state (1 = Learn, 2 = Listen, 4 = Speak, 8 = Standby, 16 = Active).
hello_timeuint(8)3Interval between Hello messages, in seconds.
hold_timeuint(8)10Time a Hello stays valid, in seconds.
priorityuint(8)100Router priority within the group.
groupuint(8)0Standby group number.
reserveduint(8)0
auth_databytes(8)63 69 73 63 6f 00 00 00Clear-text authentication password (8 octets, default “cisco”).
virtual_ipipv4192.0.2.254Virtual IPv4 address of the group.

op_code

ValueName
0 (0x00)hello
1 (0x01)coup
2 (0x02)resign
3 (0x03)advertise

state

ValueName
0 (0x00)initial
1 (0x01)learn
2 (0x02)listen
4 (0x04)speak
8 (0x08)standby
16 (0x10)active

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1 (0x01)hsrpv2re-decodes this layer

Sample templates

  • hsrpv1 — templates/protocols/fhrp/hsrpv1.wpg.yaml

HSRPv2 (hsrpv2)

Reached from

Lower layerSelectorValue
udpdst_port / src_port1985 (0x07c1)
udpdst_port / src_port2029 (0x07ed)
hsrpversion1 (0x01) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
tlvstlv — rest of the PDU1 itemsHSRPv2 TLVs (Group State, Interface State, Text / MD5 Authentication; 8-bit type and length).

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)group_stateversion, op_code, state, ip_version, group, identifier, priority, hello_time, hold_time, virtual_ip
2 (0x02)interface_stateactive_groups, passive_groups
3 (0x03)text_authauth_data
4 (0x04)md5_auth

tlvs › group_state

FieldTypeDefaultAutoDescription
versionuint(8)2
op_codeuint(8)0
stateuint(8)6
ip_versionuint(8)4
groupuint(16)0
identifiermac02:00:00:00:00:01
priorityuint(32)100
hello_timeuint(32)3000
hold_timeuint(32)10000
virtual_ipbytes(16)c0 00 02 fe 00 00 00 00 00 00 00 00 00 00 00 00

tlvs › interface_state

FieldTypeDefaultAutoDescription
active_groupsuint(16)1
passive_groupsuint(16)0

tlvs › text_auth

FieldTypeDefaultAutoDescription
auth_databytes(8)63 69 73 63 6f 00 00 00

Sample templates

  • hsrpv2 — templates/protocols/fhrp/hsrpv2.wpg.yaml

GLBP (glbp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port3222 (0x0c96)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)1GLBP version (1).
unknown1uint(8)0
groupuint(16)1GLBP group number.
unknown2uint(16)0
owner_idmac02:00:00:00:00:01MAC address of the sending router.
tlvstlv — rest of the PDU1 itemsGLBP TLVs (Hello, Request/Response, Authentication; length includes the header).

tlvs

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)hellounknown1, vg_state, unknown2, priority, unknown3, hello_interval, hold_interval, redirect, timeout, unknown4, address_type, address_length, virtual_ip
2 (0x02)request_response
3 (0x03)auth

tlvs › hello

FieldTypeDefaultAutoDescription
unknown1uint(8)0
vg_stateuint(8)32
unknown2uint(8)0
priorityuint(8)100
unknown3uint(16)0
hello_intervaluint(32)3000
hold_intervaluint(32)10000
redirectuint(16)600
timeoutuint(16)14400
unknown4uint(16)0
address_typeuint(8)1
address_lengthuint(8)4
virtual_ipipv4192.0.2.254

Sample templates

  • glbp — templates/protocols/fhrp/glbp.wpg.yaml

DHCPv4 (dhcpv4)

Reached from

Lower layerSelectorValue
udpdst_port / src_port67 (0x0043)
udpdst_port / src_port68 (0x0044)

Fields

FieldTypeDefaultAutoDescription
openum(8)1 (boot_request)BOOTP message op code (1 = BOOTREQUEST, 2 = BOOTREPLY).
htypeuint(8)1Hardware address type (1 = Ethernet).
hlenuint(8)6Hardware address length, in octets (6 for Ethernet).
hopsuint(8)0Relay hop count, incremented by each relay agent.
xiduint(32)305419896Transaction ID chosen by the client.
secsuint(16)0Seconds elapsed since the client began acquisition.
flagsflags(16)0x0BOOTP flags (bit 15 = broadcast reply requested).
ciaddripv40.0.0.0Client IP address (when already bound).
yiaddripv40.0.0.0“Your” (client) IP address assigned by the server.
siaddripv40.0.0.0Next server IP address (boot server).
giaddripv40.0.0.0Relay agent (gateway) IP address; non-zero when relayed.
chaddrmac02:00:00:00:00:01Client hardware (MAC) address; followed by 10 octets of padding.
chaddr_paddingbytes(10)00 00 00 00 00 00 00 00 00 00
snamebytes(64)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Optional server host name (64 octets, NUL padded).
filebytes(128)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Boot file name (128 octets, NUL padded).
magic_cookieuint(32)1669485411DHCP magic cookie (0x63825363).
optionstlv — rest of the PDU2 itemsDHCP options (8-bit code / length; Pad, End, Message Type, Relay Agent Information, …).

op

ValueName
1 (0x01)boot_request
2 (0x02)boot_reply

flags

BitMaskName
1532768 (0x8000)broadcast

options

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
0 (0x00)pad(type only, no length or value)
1 (0x01)subnet_maskmask
3 (0x03)routeraddresses
6 (0x06)dns_serversaddresses
12 (0x0c)host_name
15 (0x0f)domain_name
50 (0x32)requested_ipaddress
51 (0x33)lease_timeseconds
53 (0x35)message_typetype
54 (0x36)server_idaddress
55 (0x37)parameter_request_listcodes
58 (0x3a)renewal_timeseconds
59 (0x3b)rebinding_timeseconds
61 (0x3d)client_id
82 (0x52)relay_agent_infosuboptions
255 (0xff)end(type only, no length or value)

options › subnet_mask

FieldTypeDefaultAutoDescription
maskipv4

options › router

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

options › dns_servers

FieldTypeDefaultAutoDescription
addresseslist<ipv4> — rest of the PDU

options › requested_ip

FieldTypeDefaultAutoDescription
addressipv4

options › lease_time

FieldTypeDefaultAutoDescription
secondsuint(32)

options › message_type

FieldTypeDefaultAutoDescription
typeenum(8)
options › message_type › type
ValueName
1 (0x01)discover
2 (0x02)offer
3 (0x03)request
4 (0x04)decline
5 (0x05)ack
6 (0x06)nak
7 (0x07)release
8 (0x08)inform

options › server_id

FieldTypeDefaultAutoDescription
addressipv4

options › parameter_request_list

FieldTypeDefaultAutoDescription
codeslist<uint(8)> — rest of the PDU

options › renewal_time

FieldTypeDefaultAutoDescription
secondsuint(32)

options › rebinding_time

FieldTypeDefaultAutoDescription
secondsuint(32)

options › relay_agent_info

FieldTypeDefaultAutoDescription
suboptionstlv — rest of the PDU
options › relay_agent_info › suboptions
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)circuit_id
2 (0x02)remote_id
5 (0x05)link_selectionaddress
11 (0x0b)server_id_overrideaddress
FieldTypeDefaultAutoDescription
addressipv4
options › relay_agent_info › suboptions › server_id_override
FieldTypeDefaultAutoDescription
addressipv4

Constraints

LevelRule
warningmagic_cookie = 1669485411

Sample templates

DHCPv6 (dhcpv6)

Reached from

Lower layerSelectorValue
udpdst_port / src_port546 (0x0222)
udpdst_port / src_port547 (0x0223)

Fields

FieldTypeDefaultAutoDescription
msg_typeenum(8)1 (solicit)DHCPv6 message type (Solicit, Advertise, Request, Reply, Relay-Forward, …).
transaction_iduint(24)466024-bit transaction ID.
optionstlv — rest of the PDU3 itemsDHCPv6 options (16-bit code / length; Client ID, IA_NA, Relay Message, …).

msg_type

ValueName
1 (0x01)solicit
2 (0x02)advertise
3 (0x03)request
4 (0x04)confirm
5 (0x05)renew
6 (0x06)rebind
7 (0x07)reply
8 (0x08)release
9 (0x09)decline
10 (0x0a)reconfigure
11 (0x0b)information_request
12 (0x0c)relay_forw
13 (0x0d)relay_repl

options

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)client_id
2 (0x0002)server_id
3 (0x0003)ia_naiaid, t1, t2, options
4 (0x0004)ia_taiaid, options
6 (0x0006)orocodes
7 (0x0007)preferencevalue
8 (0x0008)elapsed_timetime
9 (0x0009)relay_message
13 (0x000d)status_codecode, message
14 (0x000e)rapid_commit
18 (0x0012)interface_id
23 (0x0017)dns_serversaddresses
24 (0x0018)domain_list
25 (0x0019)ia_pdiaid, t1, t2, options
37 (0x0025)remote_identerprise, id

options › ia_na

FieldTypeDefaultAutoDescription
iaiduint(32)
t1uint(32)
t2uint(32)
optionstlv — rest of the PDU
options › ia_na › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix
options › ia_na › options › ia_addr
FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
options › ia_na › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › ia_na › options › ia_prefix
FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6

options › ia_ta

FieldTypeDefaultAutoDescription
iaiduint(32)
optionstlv — rest of the PDU
options › ia_ta › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix
options › ia_ta › options › ia_addr
FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
options › ia_ta › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › ia_ta › options › ia_prefix
FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6

options › oro

FieldTypeDefaultAutoDescription
codeslist<uint(16)> — rest of the PDU

options › preference

FieldTypeDefaultAutoDescription
valueuint(8)

options › elapsed_time

FieldTypeDefaultAutoDescription
timeuint(16)

options › status_code

FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU

options › dns_servers

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

options › ia_pd

FieldTypeDefaultAutoDescription
iaiduint(32)
t1uint(32)
t2uint(32)
optionstlv — rest of the PDU
options › ia_pd › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix
options › ia_pd › options › ia_addr
FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
options › ia_pd › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › ia_pd › options › ia_prefix
FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6

options › remote_id

FieldTypeDefaultAutoDescription
enterpriseuint(32)
idbytes — rest of the PDU

Next layer

The next layer is selected by msg_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
12 (0x0c)dhcpv6_relayre-decodes this layer
13 (0x0d)dhcpv6_relayre-decodes this layer

Sample templates

DHCPv6 Relay (dhcpv6_relay)

Reached from

Lower layerSelectorValue
dhcpv6msg_type12 (0x0c) (re-decodes this layer)
dhcpv6msg_type13 (0x0d) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
msg_typeenum(8)12 (relay_forw)DHCPv6 message type (Solicit, Advertise, Request, Reply, Relay-Forward, …).
hop_countuint(8)0Number of relay agents that have relayed this message.
link_addressipv6::Address identifying the client’s link (relay).
peer_addressipv6fe80::1Address of the client or relay the message came from.
optionstlv — rest of the PDU1 itemsDHCPv6 options (16-bit code / length; Client ID, IA_NA, Relay Message, …).

msg_type

ValueName
12 (0x0c)relay_forw
13 (0x0d)relay_repl

options

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)client_id
2 (0x0002)server_id
3 (0x0003)ia_naiaid, t1, t2, options
4 (0x0004)ia_taiaid, options
6 (0x0006)orocodes
7 (0x0007)preferencevalue
8 (0x0008)elapsed_timetime
9 (0x0009)relay_messagemsg_type, transaction_id, options
13 (0x000d)status_codecode, message
14 (0x000e)rapid_commit
18 (0x0012)interface_id
23 (0x0017)dns_serversaddresses
24 (0x0018)domain_list
25 (0x0019)ia_pdiaid, t1, t2, options
37 (0x0025)remote_identerprise, id

options › ia_na

FieldTypeDefaultAutoDescription
iaiduint(32)
t1uint(32)
t2uint(32)
optionstlv — rest of the PDU
options › ia_na › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix
options › ia_na › options › ia_addr
FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
options › ia_na › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › ia_na › options › ia_prefix
FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6

options › ia_ta

FieldTypeDefaultAutoDescription
iaiduint(32)
optionstlv — rest of the PDU
options › ia_ta › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix
options › ia_ta › options › ia_addr
FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
options › ia_ta › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › ia_ta › options › ia_prefix
FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6

options › oro

FieldTypeDefaultAutoDescription
codeslist<uint(16)> — rest of the PDU

options › preference

FieldTypeDefaultAutoDescription
valueuint(8)

options › elapsed_time

FieldTypeDefaultAutoDescription
timeuint(16)

options › relay_message

FieldTypeDefaultAutoDescription
msg_typeenum(8)
transaction_iduint(24)
optionstlv — rest of the PDU
options › relay_message › msg_type
ValueName
1 (0x01)solicit
2 (0x02)advertise
3 (0x03)request
4 (0x04)confirm
5 (0x05)renew
6 (0x06)rebind
7 (0x07)reply
8 (0x08)release
9 (0x09)decline
10 (0x0a)reconfigure
11 (0x0b)information_request
12 (0x0c)relay_forw
13 (0x0d)relay_repl
options › relay_message › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)client_id
2 (0x0002)server_id
3 (0x0003)ia_naiaid, t1, t2, options
4 (0x0004)ia_taiaid, options
6 (0x0006)orocodes
7 (0x0007)preferencevalue
8 (0x0008)elapsed_timetime
9 (0x0009)relay_message
13 (0x000d)status_codecode, message
14 (0x000e)rapid_commit
18 (0x0012)interface_id
23 (0x0017)dns_serversaddresses
24 (0x0018)domain_list
25 (0x0019)ia_pdiaid, t1, t2, options
37 (0x0025)remote_identerprise, id
options › relay_message › options › ia_na
FieldTypeDefaultAutoDescription
iaiduint(32)
t1uint(32)
t2uint(32)
optionstlv — rest of the PDU

options › relay_message › options › ia_na › options

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix

options › relay_message › options › ia_na › options › ia_addr

FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)

options › relay_message › options › ia_na › options › status_code

FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU

options › relay_message › options › ia_na › options › ia_prefix

FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6
options › relay_message › options › ia_ta
FieldTypeDefaultAutoDescription
iaiduint(32)
optionstlv — rest of the PDU

options › relay_message › options › ia_ta › options

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix

options › relay_message › options › ia_ta › options › ia_addr

FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)

options › relay_message › options › ia_ta › options › status_code

FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU

options › relay_message › options › ia_ta › options › ia_prefix

FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6
options › relay_message › options › oro
FieldTypeDefaultAutoDescription
codeslist<uint(16)> — rest of the PDU
options › relay_message › options › preference
FieldTypeDefaultAutoDescription
valueuint(8)
options › relay_message › options › elapsed_time
FieldTypeDefaultAutoDescription
timeuint(16)
options › relay_message › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › relay_message › options › dns_servers
FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU
options › relay_message › options › ia_pd
FieldTypeDefaultAutoDescription
iaiduint(32)
t1uint(32)
t2uint(32)
optionstlv — rest of the PDU

options › relay_message › options › ia_pd › options

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix

options › relay_message › options › ia_pd › options › ia_addr

FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)

options › relay_message › options › ia_pd › options › status_code

FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU

options › relay_message › options › ia_pd › options › ia_prefix

FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6
options › relay_message › options › remote_id
FieldTypeDefaultAutoDescription
enterpriseuint(32)
idbytes — rest of the PDU

options › status_code

FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU

options › dns_servers

FieldTypeDefaultAutoDescription
addresseslist<ipv6> — rest of the PDU

options › ia_pd

FieldTypeDefaultAutoDescription
iaiduint(32)
t1uint(32)
t2uint(32)
optionstlv — rest of the PDU
options › ia_pd › options
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
5 (0x0005)ia_addraddress, preferred_lifetime, valid_lifetime
13 (0x000d)status_codecode, message
26 (0x001a)ia_prefixpreferred_lifetime, valid_lifetime, prefix_length, prefix
options › ia_pd › options › ia_addr
FieldTypeDefaultAutoDescription
addressipv6
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
options › ia_pd › options › status_code
FieldTypeDefaultAutoDescription
codeuint(16)
messagebytes — rest of the PDU
options › ia_pd › options › ia_prefix
FieldTypeDefaultAutoDescription
preferred_lifetimeuint(32)
valid_lifetimeuint(32)
prefix_lengthuint(8)
prefixipv6

options › remote_id

FieldTypeDefaultAutoDescription
enterpriseuint(32)
idbytes — rest of the PDU

Constraints

LevelRule
warningmsg_type within 12..13

Sample templates

DNS (dns)

Reached from

Lower layerSelectorValue
udpdst_port / src_port53 (0x0035)

Fields

FieldTypeDefaultAutoDescription
iduint(16)4660Query identifier, copied into the response.
qrenum(1)0 (query)Query (0) or response (1).
opcodeenum(4)0 (query)Kind of query (0 = standard query, 4 = NOTIFY, 5 = UPDATE).
aauint(1)0Authoritative answer flag.
tcuint(1)0Truncation flag.
rduint(1)1Recursion desired flag.
rauint(1)0Recursion available flag.
zuint(1)0Reserved bit (must be 0).
aduint(1)0Authentic data flag (DNSSEC).
cduint(1)0Checking disabled flag (DNSSEC).
rcodeenum(4)0 (no_error)Response code (0 = NOERROR, 3 = NXDOMAIN, …).
qdcountuint(16)1Number of entries in the question section.
ancountuint(16)0Number of resource records in the answer section.
nscountuint(16)0Number of resource records in the authority section.
arcountuint(16)0Number of resource records in the additional section.
sectionsbytes — rest of the PDU07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01Question / answer / authority / additional sections (length-prefixed label names); opaque octets.

qr

ValueName
0query
1response

opcode

ValueName
0query
1iquery
2status
4notify
5update

rcode

ValueName
0no_error
1format_error
2server_failure
3nx_domain
4not_implemented
5refused

Constraints

LevelRule
warningz = 0
warningheader and payload at most 512 octets

Sample templates

  • dns-query — templates/protocols/app/dns-query.wpg.yaml
  • dns-response — templates/protocols/app/dns-response.wpg.yaml

NTP (ntp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port123 (0x007b)

Fields

FieldTypeDefaultAutoDescription
lienum(2)0 (no_warning)Leap indicator (3 = clock unsynchronized).
versionuint(3)4NTP version number (4).
modeenum(3)3 (client)Association mode (3 = client, 4 = server, 5 = broadcast).
stratumuint(8)0Stratum (0 = unspecified, 1 = primary reference, 2-15 = secondary).
pollint(8)6Maximum poll interval, log2 seconds (signed).
precisionint(8)-20Clock precision, log2 seconds (signed).
root_delayuint(32)0Round-trip delay to the reference clock (16.16 fixed point seconds).
root_dispersionuint(32)0Dispersion to the reference clock (16.16 fixed point seconds).
reference_idbytes(4)00 00 00 00Reference ID (ASCII code for stratum 1, else an IPv4 address or hash).
reference_tsuint(64)0Time the system clock was last set (64-bit NTP timestamp).
origin_tsuint(64)0Client transmit time echoed by the server (64-bit NTP timestamp).
receive_tsuint(64)0Time the request arrived at the server (64-bit NTP timestamp).
transmit_tsuint(64)0Time the packet left the sender (64-bit NTP timestamp).
extensionsbytes — rest of the PDU""Extension fields and MAC; opaque octets.

li

ValueName
0no_warning
1last_minute_61
2last_minute_59
3unsynchronized

mode

ValueName
0reserved
1symmetric_active
2symmetric_passive
3client
4server
5broadcast
6control
7private

Constraints

LevelRule
warningversion within 1..4

Sample templates

  • ntp-client — templates/protocols/app/ntp-client.wpg.yaml

SNMP (snmp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port161 (0x00a1)
udpdst_port / src_port162 (0x00a2)

Fields

FieldTypeDefaultAutoDescription
msg_taguint(8)48BER tag octet (0x30 SEQUENCE, 0x02 INTEGER, 0x04 OCTET STRING).
msg_lengthuint(8)Length of the header and payload in octets (-2)BER length of the SNMP message SEQUENCE (Auto; short form, below 128).
version_taguint(8)2BER tag octet (0x30 SEQUENCE, 0x02 INTEGER, 0x04 OCTET STRING).
version_lengthuint(8)1BER length of the version INTEGER (1).
versionenum(8)1 (v2c)SNMP version (0 = v1, 1 = v2c).
community_taguint(8)4BER tag octet (0x30 SEQUENCE, 0x02 INTEGER, 0x04 OCTET STRING).
community_lengthuint(8)6BER length of the community string, in octets.
communitybytes — community_length octets70 75 62 6c 69 63Community string (e.g. “public”).

version

ValueName
0 (0x00)v1
1 (0x01)v2c

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
(any other value)snmp_pdu

Constraints

LevelRule
warningmsg_tag = 48
warningheader and payload at most 129 octets

Sample templates

SNMP PDU (snmp_pdu)

Reached from

Lower layerSelectorValue
snmpversion(any other value)

Fields

FieldTypeDefaultAutoDescription
pdu_typeenum(8)160 (get_request)PDU tag (0xa0 GetRequest, 0xa2 Response, 0xa4 v1 Trap, 0xa7 SNMPv2-Trap, …).
pdu_lengthuint(8)Length of the header and payload in octets (-2)BER length of the PDU contents (Auto; short form, below 128).
bodytlv — rest of the PDU4 itemsPDU contents as BER TLVs: request-id, error-status, error-index and the variable-bindings SEQUENCE.

pdu_type

ValueName
160 (0xa0)get_request
161 (0xa1)get_next_request
162 (0xa2)response
163 (0xa3)set_request
165 (0xa5)get_bulk_request
166 (0xa6)inform_request
167 (0xa7)snmpv2_trap
168 (0xa8)report

body

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view
48 (0x30)sequenceitems

body › ip_address

FieldTypeDefaultAutoDescription
addressipv4

body › sequence

FieldTypeDefaultAutoDescription
itemstlv — rest of the PDU
body › sequence › items
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view
48 (0x30)sequenceitems
body › sequence › items › ip_address
FieldTypeDefaultAutoDescription
addressipv4
body › sequence › items › sequence
FieldTypeDefaultAutoDescription
itemstlv — rest of the PDU

body › sequence › items › sequence › items

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view

body › sequence › items › sequence › items › ip_address

FieldTypeDefaultAutoDescription
addressipv4

Next layer

The next layer is selected by pdu_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
164 (0xa4)snmp_trapre-decodes this layer

Constraints

LevelRule
warningheader and payload at most 129 octets

Sample templates

SNMPv1 Trap (snmp_trap)

Reached from

Lower layerSelectorValue
snmp_pdupdu_type164 (0xa4) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
pdu_typeenum(8)164 (trap)PDU tag (0xa0 GetRequest, 0xa2 Response, 0xa4 v1 Trap, 0xa7 SNMPv2-Trap, …).
pdu_lengthuint(8)Length of the header and payload in octets (-2)BER length of the PDU contents (Auto; short form, below 128).
bodytlv — rest of the PDU6 itemsTrap contents as BER TLVs: enterprise, agent-addr, generic-trap, specific-trap, time-stamp and variable bindings.

pdu_type

ValueName
164 (0xa4)trap

body

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view
48 (0x30)sequenceitems

body › ip_address

FieldTypeDefaultAutoDescription
addressipv4

body › sequence

FieldTypeDefaultAutoDescription
itemstlv — rest of the PDU
body › sequence › items
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view
48 (0x30)sequenceitems
body › sequence › items › ip_address
FieldTypeDefaultAutoDescription
addressipv4
body › sequence › items › sequence
FieldTypeDefaultAutoDescription
itemstlv — rest of the PDU

body › sequence › items › sequence › items

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view

body › sequence › items › sequence › items › ip_address

FieldTypeDefaultAutoDescription
addressipv4

Constraints

LevelRule
warningpdu_type = 164
warningheader and payload at most 129 octets

Sample templates

  • snmp-trap-v1 — templates/protocols/app/snmp-trap-v1.wpg.yaml

Syslog (syslog)

Reached from

Lower layerSelectorValue
udpdst_port / src_port514 (0x0202)

Fields

FieldTypeDefaultAutoDescription
messagebytes — rest of the PDU3c 33 34 3e 31 20 32 30 32 36 2d 30 31 2d 30 31 54 30 30 3a 30 30 3a 30 30 5a 20 68 6f 73 74 20 61 70 70 20 2d 20 2d 20 2d 20 68 65 6c 6c 6fSyslog message text, starting with <PRI> (facility * 8 + severity).

Sample templates

  • syslog — templates/protocols/app/syslog.wpg.yaml

RADIUS (radius)

Reached from

Lower layerSelectorValue
udpdst_port / src_port1812 (0x0714)
udpdst_port / src_port1813 (0x0715)

Fields

FieldTypeDefaultAutoDescription
codeenum(8)1 (access_request)RADIUS packet type (Access-Request, Access-Accept, Accounting-Request, …).
identifieruint(8)0Identifier matching requests and replies.
lengthuint(16)Length of the header and payload in octetsLength of the whole RADIUS packet, in octets (Auto).
authenticatorbytes(16)00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0016-octet Request / Response Authenticator (Manual).
attributestlv — length - 20 octets2 itemsRADIUS attributes (8-bit type, 8-bit length including the header).

code

ValueName
1 (0x01)access_request
2 (0x02)access_accept
3 (0x03)access_reject
4 (0x04)accounting_request
5 (0x05)accounting_response
11 (0x0b)access_challenge
12 (0x0c)status_server
40 (0x28)disconnect_request
41 (0x29)disconnect_ack
42 (0x2a)disconnect_nak
43 (0x2b)coa_request
44 (0x2c)coa_ack
45 (0x2d)coa_nak

attributes

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)user_name
2 (0x02)user_password
3 (0x03)chap_password
4 (0x04)nas_ip_addressaddress
5 (0x05)nas_portvalue
6 (0x06)service_typevalue
7 (0x07)framed_protocolvalue
8 (0x08)framed_ip_addressaddress
18 (0x12)reply_message
24 (0x18)state
25 (0x19)class
26 (0x1a)vendor_specificvendor_id, value
27 (0x1b)session_timeoutvalue
30 (0x1e)called_station_id
31 (0x1f)calling_station_id
32 (0x20)nas_identifier
40 (0x28)acct_status_typevalue
44 (0x2c)acct_session_id
61 (0x3d)nas_port_typevalue
79 (0x4f)eap_message
80 (0x50)message_authenticator

attributes › nas_ip_address

FieldTypeDefaultAutoDescription
addressipv4

attributes › nas_port

FieldTypeDefaultAutoDescription
valueuint(32)

attributes › service_type

FieldTypeDefaultAutoDescription
valueuint(32)

attributes › framed_protocol

FieldTypeDefaultAutoDescription
valueuint(32)

attributes › framed_ip_address

FieldTypeDefaultAutoDescription
addressipv4

attributes › vendor_specific

FieldTypeDefaultAutoDescription
vendor_iduint(32)
valuebytes — rest of the PDU

attributes › session_timeout

FieldTypeDefaultAutoDescription
valueuint(32)

attributes › acct_status_type

FieldTypeDefaultAutoDescription
valueuint(32)

attributes › nas_port_type

FieldTypeDefaultAutoDescription
valueuint(32)

Constraints

LevelRule
warninglength within 20..4096

Sample templates

TFTP (tftp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port69 (0x0045)

Fields

FieldTypeDefaultAutoDescription
opcodeenum(16)1 (rrq)TFTP opcode (1 = RRQ, 2 = WRQ, 3 = DATA, 4 = ACK, 5 = ERROR, 6 = OACK).
filenamecstring"boot.bin"File name (NUL-terminated).
modecstring"octet"Transfer mode: netascii, octet or mail (NUL-terminated).
optionslist<struct> — rest of the PDU[]Option name / value string pairs (RFC 2347): blksize, timeout, tsize, windowsize, …

opcode

ValueName
1 (0x0001)rrq
2 (0x0002)wrq
3 (0x0003)data
4 (0x0004)ack
5 (0x0005)error
6 (0x0006)oack

options

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
namecstring"blksize"
valuecstring"1428"

Next layer

The next layer is selected by opcode; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
3 (0x0003)tftp_datare-decodes this layer
4 (0x0004)tftp_ackre-decodes this layer
5 (0x0005)tftp_errorre-decodes this layer
6 (0x0006)tftp_oackre-decodes this layer

Sample templates

  • tftp-rrq — templates/protocols/app/tftp-rrq.wpg.yaml

TFTP DATA (tftp_data)

Reached from

Lower layerSelectorValue
tftpopcode3 (0x0003) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
opcodeenum(16)3 (data)TFTP opcode (1 = RRQ, 2 = WRQ, 3 = DATA, 4 = ACK, 5 = ERROR, 6 = OACK).
blockuint(16)1Block number (starting at 1).
databytes — rest of the PDU""Data octets (512 per block; a shorter block ends the transfer).

opcode

ValueName
1 (0x0001)rrq
2 (0x0002)wrq
3 (0x0003)data
4 (0x0004)ack
5 (0x0005)error
6 (0x0006)oack

Constraints

LevelRule
warningopcode = 3

Sample templates

  • tftp-data — templates/protocols/app/tftp-data.wpg.yaml

TFTP ACK (tftp_ack)

Reached from

Lower layerSelectorValue
tftpopcode4 (0x0004) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
opcodeenum(16)4 (ack)TFTP opcode (1 = RRQ, 2 = WRQ, 3 = DATA, 4 = ACK, 5 = ERROR, 6 = OACK).
blockuint(16)1Block number (starting at 1).

opcode

ValueName
1 (0x0001)rrq
2 (0x0002)wrq
3 (0x0003)data
4 (0x0004)ack
5 (0x0005)error
6 (0x0006)oack

Constraints

LevelRule
warningopcode = 4

Sample templates

  • tftp-ack — templates/protocols/app/tftp-ack.wpg.yaml

TFTP ERROR (tftp_error)

Reached from

Lower layerSelectorValue
tftpopcode5 (0x0005) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
opcodeenum(16)5 (error)TFTP opcode (1 = RRQ, 2 = WRQ, 3 = DATA, 4 = ACK, 5 = ERROR, 6 = OACK).
error_codeenum(16)1 (file_not_found)TFTP error code (1 = file not found, 2 = access violation, …).
messagecstring"File not found"Error message (NUL-terminated).

opcode

ValueName
1 (0x0001)rrq
2 (0x0002)wrq
3 (0x0003)data
4 (0x0004)ack
5 (0x0005)error
6 (0x0006)oack

error_code

ValueName
0 (0x0000)not_defined
1 (0x0001)file_not_found
2 (0x0002)access_violation
3 (0x0003)disk_full
4 (0x0004)illegal_operation
5 (0x0005)unknown_tid
6 (0x0006)file_exists
7 (0x0007)no_such_user
8 (0x0008)option_negotiation

Constraints

LevelRule
warningopcode = 5

Sample templates

  • tftp-error — templates/protocols/app/tftp-error.wpg.yaml

TFTP OACK (tftp_oack)

Reached from

Lower layerSelectorValue
tftpopcode6 (0x0006) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
opcodeenum(16)6 (oack)TFTP opcode (1 = RRQ, 2 = WRQ, 3 = DATA, 4 = ACK, 5 = ERROR, 6 = OACK).
optionslist<struct> — rest of the PDU1 itemsOption name / value string pairs (RFC 2347): blksize, timeout, tsize, windowsize, …

opcode

ValueName
1 (0x0001)rrq
2 (0x0002)wrq
3 (0x0003)data
4 (0x0004)ack
5 (0x0005)error
6 (0x0006)oack

options

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
namecstring"blksize"
valuecstring"1428"

Constraints

LevelRule
warningopcode = 6

Sample templates

  • tftp-oack — templates/protocols/app/tftp-oack.wpg.yaml

LDP (ldp)

Reached from

Lower layerSelectorValue
tcpdst_port / src_port646 (0x0286)
udpdst_port / src_port646 (0x0286)

Fields

FieldTypeDefaultAutoDescription
versionuint(16)1LDP version (1).
pdu_lengthuint(16)Length of the header in octets (-4)Length of the PDU after the version and PDU length fields (Auto).
lsr_idipv4192.0.2.1LSR ID: the first four octets of the LDP identifier.
label_spaceuint(16)0Label space ID: the last two octets of the LDP identifier (0 = platform-wide).
messagestlv — pdu_length - 6 octets1 itemsMessages (16-bit type with the U bit, 16-bit length of the value, message ID, TLVs): Notification, Hello, Initialization, KeepAlive, Address / Address Withdraw, Label Mapping / Request / Withdraw / Release / Abort Request. TLVs: FEC, Address List, Hop Count, Path Vector, Generic Label, Status, Common Hello / Session Parameters, transport addresses, Configuration Sequence Number. Lengths are Auto.

messages

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)notificationmessage_id, tlvs
256 (0x0100)hellomessage_id, tlvs
512 (0x0200)initializationmessage_id, tlvs
513 (0x0201)keepalivemessage_id, tlvs
768 (0x0300)addressmessage_id, tlvs
769 (0x0301)address_withdrawmessage_id, tlvs
1024 (0x0400)label_mappingmessage_id, tlvs
1025 (0x0401)label_requestmessage_id, tlvs
1026 (0x0402)label_withdrawmessage_id, tlvs
1027 (0x0403)label_releasemessage_id, tlvs
1028 (0x0404)label_abort_requestmessage_id, tlvs

messages › notification

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU1 items
messages › notification › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › notification › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › notification › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › notification › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › notification › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › notification › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › notification › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › notification › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › notification › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › notification › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › notification › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › notification › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › notification › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › notification › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › notification › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › notification › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › notification › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › notification › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › hello

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU1 items
messages › hello › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › hello › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › hello › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › hello › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › hello › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › hello › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › hello › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › hello › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › hello › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › hello › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › hello › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › hello › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › hello › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › hello › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › hello › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › hello › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › hello › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › hello › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › initialization

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU1 items
messages › initialization › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › initialization › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › initialization › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › initialization › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › initialization › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › initialization › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › initialization › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › initialization › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › initialization › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › initialization › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › initialization › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › initialization › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › initialization › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › initialization › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › initialization › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › initialization › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › initialization › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › initialization › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › keepalive

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › keepalive › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › keepalive › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › keepalive › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › keepalive › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › keepalive › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › keepalive › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › keepalive › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › keepalive › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › keepalive › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › keepalive › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › keepalive › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › keepalive › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › keepalive › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › keepalive › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › keepalive › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › keepalive › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › keepalive › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › keepalive › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › address

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › address › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › address › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › address › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › address › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › address › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › address › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › address › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › address › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › address › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › address › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › address › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › address › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › address › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › address › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › address › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › address › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › address › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › address › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › address_withdraw

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › address_withdraw › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › address_withdraw › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › address_withdraw › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › address_withdraw › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › address_withdraw › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › address_withdraw › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › address_withdraw › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › address_withdraw › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › address_withdraw › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › address_withdraw › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › address_withdraw › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › address_withdraw › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › address_withdraw › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › address_withdraw › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › address_withdraw › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › address_withdraw › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › address_withdraw › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › address_withdraw › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › label_mapping

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › label_mapping › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › label_mapping › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › label_mapping › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › label_mapping › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › label_mapping › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › label_mapping › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › label_mapping › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › label_mapping › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › label_mapping › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › label_mapping › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › label_mapping › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › label_mapping › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › label_mapping › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › label_mapping › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › label_mapping › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › label_mapping › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › label_mapping › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › label_mapping › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › label_request

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › label_request › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › label_request › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › label_request › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › label_request › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › label_request › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › label_request › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › label_request › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › label_request › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › label_request › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › label_request › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › label_request › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › label_request › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › label_request › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › label_request › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › label_request › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › label_request › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › label_request › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › label_request › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › label_withdraw

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › label_withdraw › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › label_withdraw › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › label_withdraw › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › label_withdraw › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › label_withdraw › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › label_withdraw › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › label_withdraw › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › label_withdraw › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › label_withdraw › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › label_withdraw › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › label_withdraw › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › label_withdraw › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › label_withdraw › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › label_withdraw › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › label_withdraw › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › label_withdraw › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › label_withdraw › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › label_withdraw › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › label_release

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › label_release › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › label_release › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › label_release › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › label_release › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › label_release › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › label_release › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › label_release › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › label_release › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › label_release › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › label_release › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › label_release › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › label_release › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › label_release › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › label_release › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › label_release › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › label_release › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › label_release › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › label_release › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

messages › label_abort_request

FieldTypeDefaultAutoDescription
message_iduint(32)1
tlvstlv — rest of the PDU[]
messages › label_abort_request › tlvs
  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
256 (0x0100)fec_wildcardelement_type; when the value starts with 01
256 (0x0100)fecelements
257 (0x0101)address_listaddress_family, addresses; when the value starts with 00 01
257 (0x0101)address_list_ipv6address_family, addresses; when the value starts with 00 02
259 (0x0103)hop_counthop_count
260 (0x0104)path_vectorlsr_ids
512 (0x0200)generic_labelreserved, label
768 (0x0300)statuse, f, status_code, message_id, message_type
1024 (0x0400)common_hello_parametershold_time, t, r, g, reserved
1025 (0x0401)ipv4_transport_addressaddress
1026 (0x0402)configuration_sequence_numbersequence_number
1027 (0x0403)ipv6_transport_addressaddress
1280 (0x0500)common_session_parametersprotocol_version, keepalive_time, a, d, reserved, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space
1536 (0x0600)label_request_message_idmessage_id
messages › label_abort_request › tlvs › fec_wildcard
FieldTypeDefaultAutoDescription
element_typeuint(8)1
messages › label_abort_request › tlvs › fec
FieldTypeDefaultAutoDescription
elementslist<struct> — rest of the PDU

messages › label_abort_request › tlvs › fec › elements

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
element_typeuint(8)2
address_familyenum(16)1 (ipv4)
prefix_lengthuint(8)
prefixbytes — (prefix_length + 7) / 8 octets

messages › label_abort_request › tlvs › fec › elements › address_family

ValueName
1 (0x0001)ipv4
2 (0x0002)ipv6
messages › label_abort_request › tlvs › address_list
FieldTypeDefaultAutoDescription
address_familyuint(16)1
addresseslist<ipv4> — rest of the PDU
messages › label_abort_request › tlvs › address_list_ipv6
FieldTypeDefaultAutoDescription
address_familyuint(16)2
addresseslist<ipv6> — rest of the PDU
messages › label_abort_request › tlvs › hop_count
FieldTypeDefaultAutoDescription
hop_countuint(8)1
messages › label_abort_request › tlvs › path_vector
FieldTypeDefaultAutoDescription
lsr_idslist<ipv4> — rest of the PDU
messages › label_abort_request › tlvs › generic_label
FieldTypeDefaultAutoDescription
reserveduint(12)0
labeluint(20)16
messages › label_abort_request › tlvs › status
FieldTypeDefaultAutoDescription
euint(1)0
fuint(1)0
status_codeenum(30)0 (success)
message_iduint(32)
message_typeuint(16)

messages › label_abort_request › tlvs › status › status_code

ValueName
0 (0x00000000)success
1 (0x00000001)bad_ldp_identifier
2 (0x00000002)bad_protocol_version
3 (0x00000003)bad_pdu_length
4 (0x00000004)unknown_message_type
5 (0x00000005)bad_message_length
6 (0x00000006)unknown_tlv
7 (0x00000007)bad_tlv_length
8 (0x00000008)malformed_tlv_value
9 (0x00000009)hold_timer_expired
10 (0x0000000a)shutdown
11 (0x0000000b)loop_detected
12 (0x0000000c)unknown_fec
13 (0x0000000d)no_route
14 (0x0000000e)no_label_resources
15 (0x0000000f)label_resources_available
16 (0x00000010)session_rejected_no_hello
17 (0x00000011)session_rejected_advertisement_mode
18 (0x00000012)session_rejected_max_pdu_length
19 (0x00000013)session_rejected_label_range
20 (0x00000014)keepalive_timer_expired
21 (0x00000015)label_request_aborted
22 (0x00000016)missing_message_parameters
23 (0x00000017)unsupported_address_family
24 (0x00000018)session_rejected_bad_keepalive_time
25 (0x00000019)internal_error
messages › label_abort_request › tlvs › common_hello_parameters
FieldTypeDefaultAutoDescription
hold_timeuint(16)15
tuint(1)0
ruint(1)0
guint(1)0
reserveduint(13)0
messages › label_abort_request › tlvs › ipv4_transport_address
FieldTypeDefaultAutoDescription
addressipv4
messages › label_abort_request › tlvs › configuration_sequence_number
FieldTypeDefaultAutoDescription
sequence_numberuint(32)1
messages › label_abort_request › tlvs › ipv6_transport_address
FieldTypeDefaultAutoDescription
addressipv6
messages › label_abort_request › tlvs › common_session_parameters
FieldTypeDefaultAutoDescription
protocol_versionuint(16)1
keepalive_timeuint(16)180
auint(1)0
duint(1)0
reserveduint(6)0
pv_limuint(8)0
max_pdu_lengthuint(16)0
receiver_lsr_idipv4192.0.2.2
receiver_label_spaceuint(16)0
messages › label_abort_request › tlvs › label_request_message_id
FieldTypeDefaultAutoDescription
message_iduint(32)

Constraints

LevelRule
warningversion = 1
errorheader at least 10 octets
warningheader at most 4096 octets

Sample templates

BFD (bfd)

Reached from

Lower layerSelectorValue
udpdst_port / src_port3784 (0x0ec8)
udpdst_port / src_port4784 (0x12b0)
udpdst_port / src_port6784 (0x1a80)

Fields

FieldTypeDefaultAutoDescription
versionuint(3)1BFD version (1).
diagenum(5)0 (no_diagnostic)Diagnostic code: the reason of the last state change of the local session.
stateenum(2)1 (down)Session state: 0 AdminDown, 1 Down, 2 Init, 3 Up.
puint(1)0P bit: Poll (a parameter change, the peer answers with F).
fuint(1)0F bit: Final (answer to a Poll).
cuint(1)0C bit: Control Plane Independent.
auint(1)Number of items of authenticationA bit: authentication present (Auto: set when there is an authentication section).
duint(1)0D bit: Demand mode.
muint(1)0M bit: Multipoint (0).
detect_multuint(8)3Detect time multiplier.
lengthuint(8)Length of the header in octetsLength of the control packet in octets, including the authentication section (Auto).
my_discriminatoruint(32)1My discriminator: a non-zero value unique to the session on the sender.
your_discriminatoruint(32)0Your discriminator: the peer’s discriminator (0 while unknown).
desired_min_tx_intervaluint(32)1000000Desired minimum TX interval in microseconds.
required_min_rx_intervaluint(32)1000000Required minimum RX interval in microseconds.
required_min_echo_rx_intervaluint(32)0Required minimum echo RX interval in microseconds (0 = no echo).
authenticationtlv — length - 24 octetsAuthentication section (8-bit type, 8-bit length including the header): simple password, keyed MD5 / SHA1 and their meticulous variants. The digest / hash is Manual.

diag

ValueName
0no_diagnostic
1control_detection_time_expired
2echo_function_failed
3neighbor_signaled_session_down
4forwarding_plane_reset
5path_down
6concatenated_path_down
7administratively_down
8reverse_concatenated_path_down
9mis_connectivity_defect

state

ValueName
0admin_down
1down
2init
3up

authentication

  • Type 8 bits, length 8 bits.
  • The length counts the type and length fields too.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)simple_passwordkey_id, password
2 (0x02)keyed_md5key_id, reserved, sequence_number, digest
3 (0x03)meticulous_keyed_md5key_id, reserved, sequence_number, digest
4 (0x04)keyed_sha1key_id, reserved, sequence_number, hash
5 (0x05)meticulous_keyed_sha1key_id, reserved, sequence_number, hash

authentication › simple_password

FieldTypeDefaultAutoDescription
key_iduint(8)1
passwordbytes — rest of the PDU

authentication › keyed_md5

FieldTypeDefaultAutoDescription
key_iduint(8)1
reserveduint(8)0
sequence_numberuint(32)
digestbytes(16)

authentication › meticulous_keyed_md5

FieldTypeDefaultAutoDescription
key_iduint(8)1
reserveduint(8)0
sequence_numberuint(32)
digestbytes(16)

authentication › keyed_sha1

FieldTypeDefaultAutoDescription
key_iduint(8)1
reserveduint(8)0
sequence_numberuint(32)
hashbytes(20)

authentication › meticulous_keyed_sha1

FieldTypeDefaultAutoDescription
key_iduint(8)1
reserveduint(8)0
sequence_numberuint(32)
hashbytes(20)

Constraints

LevelRule
warningversion = 1
warningdetect_mult ≠ 0
warningmy_discriminator ≠ 0
errorheader at least 24 octets

Sample templates

GTPv2-C (gtpv2)

Reached from

Lower layerSelectorValue
udpdst_port / src_port2123 (0x084b)
gtpv2p1 (at least 8 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(3)2GTP version (2).
puint(1)0P flag: a piggybacked message follows (the next GTPv2-C layer).
tuint(1)Number of items of teidT flag: the TEID field is present (Auto: set when a TEID is given).
mpuint(1)0MP flag: the message priority is present.
spareuint(2)0
message_typeenum(8)32 (create_session_request)Message type (Echo, Create / Modify / Delete Session, Create / Update / Delete Bearer, …).
message_lengthuint(16)Length of the header in octets (-4)Message length in octets, without the first 4 octets (Auto).
teidlist<uint(32)> — t items1 itemsTunnel Endpoint Identifier of the receiver (absent in Echo messages; 0 in an initial request).
sequence_numberuint(24)1Sequence number (24 bits) matching a response to its request.
message_priorityuint(4)0Message priority (0 highest), used when MP is set.
spare2uint(4)0
iestlv — up to offset message_length + 4 of the group6 itemsInformation elements (8-bit type, 16-bit length of the data, spare / instance octet): IMSI, Cause, Recovery, APN, AMBR, EBI, IP Address, MEI, MSISDN, PAA, Bearer QoS, RAT Type, Serving Network, F-TEID, Bearer Context (grouped), PDN Type, … Lengths are Auto.

message_type

ValueName
1 (0x01)echo_request
2 (0x02)echo_response
3 (0x03)version_not_supported
32 (0x20)create_session_request
33 (0x21)create_session_response
34 (0x22)modify_bearer_request
35 (0x23)modify_bearer_response
36 (0x24)delete_session_request
37 (0x25)delete_session_response
95 (0x5f)create_bearer_request
96 (0x60)create_bearer_response
97 (0x61)update_bearer_request
98 (0x62)update_bearer_response
99 (0x63)delete_bearer_request
100 (0x64)delete_bearer_response
170 (0xaa)release_access_bearers_request
171 (0xab)release_access_bearers_response
176 (0xb0)downlink_data_notification
177 (0xb1)downlink_data_notification_ack

ies

  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • The first 1 value octets after the length are not counted in it.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)imsispare, instance, digits
2 (0x02)causespare, instance, cause, spare2, pce, bce, cs, offending_ie
3 (0x03)recoveryspare, instance, restart_counter
71 (0x47)apnspare, instance, apn
72 (0x48)ambrspare, instance, uplink, downlink
73 (0x49)ebispare, instance, spare2, ebi
74 (0x4a)ip_addressspare, instance, address; when the value is 5 octets
74 (0x4a)ip_address_ipv6spare, instance, address; when the value is 17 octets
75 (0x4b)meispare, instance, digits
76 (0x4c)msisdnspare, instance, digits
77 (0x4d)indicationspare, instance, flags
78 (0x4e)pcospare, instance, data
79 (0x4f)paaspare, instance, spare2, pdn_type, ipv4; when the value is 6 octets
79 (0x4f)paa_ipv6spare, instance, spare2, pdn_type, ipv6_prefix_length, ipv6; when the value is 19 octets
79 (0x4f)paa_ipv4v6spare, instance, spare2, pdn_type, ipv6_prefix_length, ipv6, ipv4; when the value is 23 octets
80 (0x50)bearer_qosspare, instance, spare2, pci, pl, spare3, pvi, qci, mbr_uplink, mbr_downlink, gbr_uplink, gbr_downlink
82 (0x52)rat_typespare, instance, rat_type
83 (0x53)serving_networkspare, instance, mcc_digit2, mcc_digit1, mnc_digit3, mcc_digit3, mnc_digit2, mnc_digit1
84 (0x54)bearer_tftspare, instance, tft
86 (0x56)ulispare, instance, data
87 (0x57)fteidspare, instance, v4, v6, interface_type, teid, ipv4; when the value is 10 octets
87 (0x57)fteid_ipv6spare, instance, v4, v6, interface_type, teid, ipv6; when the value is 22 octets
87 (0x57)fteid_ipv4v6spare, instance, v4, v6, interface_type, teid, ipv4, ipv6; when the value is 26 octets
94 (0x5e)charging_idspare, instance, charging_id
95 (0x5f)charging_characteristicsspare, instance, value
99 (0x63)pdn_typespare, instance, spare2, pdn_type
114 (0x72)ue_time_zonespare, instance, time_zone, spare2, daylight_saving_time
127 (0x7f)apn_restrictionspare, instance, restriction
128 (0x80)selection_modespare, instance, spare2, selection_mode
255 (0xff)private_extensionspare, instance, enterprise_id, value
93 (0x5d)bearer_contextspare, instance, ies

ies › imsi

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
digitsbytes — rest of the PDU

ies › cause

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
causeenum(8)16 (request_accepted)
spare2uint(5)0
pceuint(1)0
bceuint(1)0
csuint(1)0
offending_iebytes — rest of the PDU
ies › cause › cause
ValueName
2 (0x02)local_detach
3 (0x03)complete_detach
4 (0x04)rat_changed_from_3gpp_to_non_3gpp
8 (0x08)isr_deactivation
16 (0x10)request_accepted
17 (0x11)request_accepted_partially
18 (0x12)new_pdn_type_due_to_network_preference
19 (0x13)new_pdn_type_due_to_single_address_bearer_only
64 (0x40)context_not_found
65 (0x41)invalid_message_format
66 (0x42)version_not_supported_by_next_peer
67 (0x43)invalid_length
68 (0x44)service_not_supported
69 (0x45)mandatory_ie_incorrect
70 (0x46)mandatory_ie_missing
72 (0x48)system_failure
73 (0x49)no_resources_available
78 (0x4e)missing_or_unknown_apn
83 (0x53)preferred_pdn_type_not_supported
84 (0x54)all_dynamic_addresses_are_occupied
89 (0x59)service_denied
92 (0x5c)user_authentication_failed
93 (0x5d)apn_access_denied_no_subscription
94 (0x5e)request_rejected
100 (0x64)remote_peer_not_responding
110 (0x6e)temporarily_rejected_due_to_handover_in_progress

ies › recovery

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
restart_counteruint(8)0

ies › apn

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
apnbytes — rest of the PDU

ies › ambr

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
uplinkuint(32)1000
downlinkuint(32)1000

ies › ebi

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(4)0
ebiuint(4)5

ies › ip_address

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
addressipv4

ies › ip_address_ipv6

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
addressipv6

ies › mei

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
digitsbytes — rest of the PDU

ies › msisdn

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
digitsbytes — rest of the PDU

ies › indication

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
flagsbytes — rest of the PDU

ies › pco

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
databytes — rest of the PDU

ies › paa

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeuint(3)1
ipv4ipv4

ies › paa_ipv6

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeuint(3)2
ipv6_prefix_lengthuint(8)64
ipv6ipv6::

ies › paa_ipv4v6

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeuint(3)3
ipv6_prefix_lengthuint(8)64
ipv6ipv6::
ipv4ipv4

ies › bearer_qos

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(1)0
pciuint(1)0
pluint(4)15
spare3uint(1)0
pviuint(1)0
qciuint(8)9
mbr_uplinkuint(40)0
mbr_downlinkuint(40)0
gbr_uplinkuint(40)0
gbr_downlinkuint(40)0

ies › rat_type

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
rat_typeenum(8)6 (eutran)
ies › rat_type › rat_type
ValueName
1 (0x01)utran
2 (0x02)geran
3 (0x03)wlan
4 (0x04)gan
5 (0x05)hspa_evolution
6 (0x06)eutran
7 (0x07)virtual
8 (0x08)eutran_nb_iot
9 (0x09)lte_m
10 (0x0a)nr

ies › serving_network

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
mcc_digit2uint(4)0
mcc_digit1uint(4)0
mnc_digit3uint(4)15
mcc_digit3uint(4)1
mnc_digit2uint(4)1
mnc_digit1uint(4)0

ies › bearer_tft

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
tftbytes — rest of the PDU

ies › uli

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
databytes — rest of the PDU

ies › fteid

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
v4uint(1)1
v6uint(1)0
interface_typeenum(6)10 (s11_mme_gtp_c)
teiduint(32)1
ipv4ipv4192.0.2.1
ies › fteid › interface_type
ValueName
0s1_u_enodeb_gtp_u
1s1_u_sgw_gtp_u
2s12_rnc_gtp_u
3s12_sgw_gtp_u
4s5_s8_sgw_gtp_u
5s5_s8_pgw_gtp_u
6s5_s8_sgw_gtp_c
7s5_s8_pgw_gtp_c
10s11_mme_gtp_c
11s11_s4_sgw_gtp_c
16s2b_epdg_gtp_c
17s2b_u_epdg_gtp_u
18s2b_pgw_gtp_c
19s2b_u_pgw_gtp_u

ies › fteid_ipv6

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
v4uint(1)0
v6uint(1)1
interface_typeenum(6)10 (s11_mme_gtp_c)
teiduint(32)1
ipv6ipv62001:db8::1
ies › fteid_ipv6 › interface_type
ValueName
0s1_u_enodeb_gtp_u
1s1_u_sgw_gtp_u
2s12_rnc_gtp_u
3s12_sgw_gtp_u
4s5_s8_sgw_gtp_u
5s5_s8_pgw_gtp_u
6s5_s8_sgw_gtp_c
7s5_s8_pgw_gtp_c
10s11_mme_gtp_c
11s11_s4_sgw_gtp_c
16s2b_epdg_gtp_c
17s2b_u_epdg_gtp_u
18s2b_pgw_gtp_c
19s2b_u_pgw_gtp_u

ies › fteid_ipv4v6

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
v4uint(1)1
v6uint(1)1
interface_typeenum(6)10 (s11_mme_gtp_c)
teiduint(32)1
ipv4ipv4192.0.2.1
ipv6ipv62001:db8::1
ies › fteid_ipv4v6 › interface_type
ValueName
0s1_u_enodeb_gtp_u
1s1_u_sgw_gtp_u
2s12_rnc_gtp_u
3s12_sgw_gtp_u
4s5_s8_sgw_gtp_u
5s5_s8_pgw_gtp_u
6s5_s8_sgw_gtp_c
7s5_s8_pgw_gtp_c
10s11_mme_gtp_c
11s11_s4_sgw_gtp_c
16s2b_epdg_gtp_c
17s2b_u_epdg_gtp_u
18s2b_pgw_gtp_c
19s2b_u_pgw_gtp_u

ies › charging_id

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
charging_iduint(32)1

ies › charging_characteristics

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
valueuint(16)2048

ies › pdn_type

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeenum(3)1 (ipv4)
ies › pdn_type › pdn_type
ValueName
1ipv4
2ipv6
3ipv4v6
4non_ip
5ethernet

ies › ue_time_zone

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
time_zoneuint(8)0
spare2uint(6)0
daylight_saving_timeuint(2)0

ies › apn_restriction

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
restrictionuint(8)0

ies › selection_mode

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(6)0
selection_modeuint(2)0

ies › private_extension

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
enterprise_iduint(16)0
valuebytes — rest of the PDU

ies › bearer_context

FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
iestlv — rest of the PDU1 items
ies › bearer_context › ies
  • Type 8 bits, length 16 bits.
  • The length counts the value only.
  • The first 1 value octets after the length are not counted in it.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x01)imsispare, instance, digits
2 (0x02)causespare, instance, cause, spare2, pce, bce, cs, offending_ie
3 (0x03)recoveryspare, instance, restart_counter
71 (0x47)apnspare, instance, apn
72 (0x48)ambrspare, instance, uplink, downlink
73 (0x49)ebispare, instance, spare2, ebi
74 (0x4a)ip_addressspare, instance, address; when the value is 5 octets
74 (0x4a)ip_address_ipv6spare, instance, address; when the value is 17 octets
75 (0x4b)meispare, instance, digits
76 (0x4c)msisdnspare, instance, digits
77 (0x4d)indicationspare, instance, flags
78 (0x4e)pcospare, instance, data
79 (0x4f)paaspare, instance, spare2, pdn_type, ipv4; when the value is 6 octets
79 (0x4f)paa_ipv6spare, instance, spare2, pdn_type, ipv6_prefix_length, ipv6; when the value is 19 octets
79 (0x4f)paa_ipv4v6spare, instance, spare2, pdn_type, ipv6_prefix_length, ipv6, ipv4; when the value is 23 octets
80 (0x50)bearer_qosspare, instance, spare2, pci, pl, spare3, pvi, qci, mbr_uplink, mbr_downlink, gbr_uplink, gbr_downlink
82 (0x52)rat_typespare, instance, rat_type
83 (0x53)serving_networkspare, instance, mcc_digit2, mcc_digit1, mnc_digit3, mcc_digit3, mnc_digit2, mnc_digit1
84 (0x54)bearer_tftspare, instance, tft
86 (0x56)ulispare, instance, data
87 (0x57)fteidspare, instance, v4, v6, interface_type, teid, ipv4; when the value is 10 octets
87 (0x57)fteid_ipv6spare, instance, v4, v6, interface_type, teid, ipv6; when the value is 22 octets
87 (0x57)fteid_ipv4v6spare, instance, v4, v6, interface_type, teid, ipv4, ipv6; when the value is 26 octets
94 (0x5e)charging_idspare, instance, charging_id
95 (0x5f)charging_characteristicsspare, instance, value
99 (0x63)pdn_typespare, instance, spare2, pdn_type
114 (0x72)ue_time_zonespare, instance, time_zone, spare2, daylight_saving_time
127 (0x7f)apn_restrictionspare, instance, restriction
128 (0x80)selection_modespare, instance, spare2, selection_mode
255 (0xff)private_extensionspare, instance, enterprise_id, value
ies › bearer_context › ies › imsi
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
digitsbytes — rest of the PDU
ies › bearer_context › ies › cause
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
causeenum(8)16 (request_accepted)
spare2uint(5)0
pceuint(1)0
bceuint(1)0
csuint(1)0
offending_iebytes — rest of the PDU

ies › bearer_context › ies › cause › cause

ValueName
2 (0x02)local_detach
3 (0x03)complete_detach
4 (0x04)rat_changed_from_3gpp_to_non_3gpp
8 (0x08)isr_deactivation
16 (0x10)request_accepted
17 (0x11)request_accepted_partially
18 (0x12)new_pdn_type_due_to_network_preference
19 (0x13)new_pdn_type_due_to_single_address_bearer_only
64 (0x40)context_not_found
65 (0x41)invalid_message_format
66 (0x42)version_not_supported_by_next_peer
67 (0x43)invalid_length
68 (0x44)service_not_supported
69 (0x45)mandatory_ie_incorrect
70 (0x46)mandatory_ie_missing
72 (0x48)system_failure
73 (0x49)no_resources_available
78 (0x4e)missing_or_unknown_apn
83 (0x53)preferred_pdn_type_not_supported
84 (0x54)all_dynamic_addresses_are_occupied
89 (0x59)service_denied
92 (0x5c)user_authentication_failed
93 (0x5d)apn_access_denied_no_subscription
94 (0x5e)request_rejected
100 (0x64)remote_peer_not_responding
110 (0x6e)temporarily_rejected_due_to_handover_in_progress
ies › bearer_context › ies › recovery
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
restart_counteruint(8)0
ies › bearer_context › ies › apn
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
apnbytes — rest of the PDU
ies › bearer_context › ies › ambr
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
uplinkuint(32)1000
downlinkuint(32)1000
ies › bearer_context › ies › ebi
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(4)0
ebiuint(4)5
ies › bearer_context › ies › ip_address
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
addressipv4
ies › bearer_context › ies › ip_address_ipv6
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
addressipv6
ies › bearer_context › ies › mei
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
digitsbytes — rest of the PDU
ies › bearer_context › ies › msisdn
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
digitsbytes — rest of the PDU
ies › bearer_context › ies › indication
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
flagsbytes — rest of the PDU
ies › bearer_context › ies › pco
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
databytes — rest of the PDU
ies › bearer_context › ies › paa
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeuint(3)1
ipv4ipv4
ies › bearer_context › ies › paa_ipv6
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeuint(3)2
ipv6_prefix_lengthuint(8)64
ipv6ipv6::
ies › bearer_context › ies › paa_ipv4v6
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeuint(3)3
ipv6_prefix_lengthuint(8)64
ipv6ipv6::
ipv4ipv4
ies › bearer_context › ies › bearer_qos
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(1)0
pciuint(1)0
pluint(4)15
spare3uint(1)0
pviuint(1)0
qciuint(8)9
mbr_uplinkuint(40)0
mbr_downlinkuint(40)0
gbr_uplinkuint(40)0
gbr_downlinkuint(40)0
ies › bearer_context › ies › rat_type
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
rat_typeenum(8)6 (eutran)

ies › bearer_context › ies › rat_type › rat_type

ValueName
1 (0x01)utran
2 (0x02)geran
3 (0x03)wlan
4 (0x04)gan
5 (0x05)hspa_evolution
6 (0x06)eutran
7 (0x07)virtual
8 (0x08)eutran_nb_iot
9 (0x09)lte_m
10 (0x0a)nr
ies › bearer_context › ies › serving_network
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
mcc_digit2uint(4)0
mcc_digit1uint(4)0
mnc_digit3uint(4)15
mcc_digit3uint(4)1
mnc_digit2uint(4)1
mnc_digit1uint(4)0
ies › bearer_context › ies › bearer_tft
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
tftbytes — rest of the PDU
ies › bearer_context › ies › uli
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
databytes — rest of the PDU
ies › bearer_context › ies › fteid
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
v4uint(1)1
v6uint(1)0
interface_typeenum(6)10 (s11_mme_gtp_c)
teiduint(32)1
ipv4ipv4192.0.2.1

ies › bearer_context › ies › fteid › interface_type

ValueName
0s1_u_enodeb_gtp_u
1s1_u_sgw_gtp_u
2s12_rnc_gtp_u
3s12_sgw_gtp_u
4s5_s8_sgw_gtp_u
5s5_s8_pgw_gtp_u
6s5_s8_sgw_gtp_c
7s5_s8_pgw_gtp_c
10s11_mme_gtp_c
11s11_s4_sgw_gtp_c
16s2b_epdg_gtp_c
17s2b_u_epdg_gtp_u
18s2b_pgw_gtp_c
19s2b_u_pgw_gtp_u
ies › bearer_context › ies › fteid_ipv6
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
v4uint(1)0
v6uint(1)1
interface_typeenum(6)10 (s11_mme_gtp_c)
teiduint(32)1
ipv6ipv62001:db8::1

ies › bearer_context › ies › fteid_ipv6 › interface_type

ValueName
0s1_u_enodeb_gtp_u
1s1_u_sgw_gtp_u
2s12_rnc_gtp_u
3s12_sgw_gtp_u
4s5_s8_sgw_gtp_u
5s5_s8_pgw_gtp_u
6s5_s8_sgw_gtp_c
7s5_s8_pgw_gtp_c
10s11_mme_gtp_c
11s11_s4_sgw_gtp_c
16s2b_epdg_gtp_c
17s2b_u_epdg_gtp_u
18s2b_pgw_gtp_c
19s2b_u_pgw_gtp_u
ies › bearer_context › ies › fteid_ipv4v6
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
v4uint(1)1
v6uint(1)1
interface_typeenum(6)10 (s11_mme_gtp_c)
teiduint(32)1
ipv4ipv4192.0.2.1
ipv6ipv62001:db8::1

ies › bearer_context › ies › fteid_ipv4v6 › interface_type

ValueName
0s1_u_enodeb_gtp_u
1s1_u_sgw_gtp_u
2s12_rnc_gtp_u
3s12_sgw_gtp_u
4s5_s8_sgw_gtp_u
5s5_s8_pgw_gtp_u
6s5_s8_sgw_gtp_c
7s5_s8_pgw_gtp_c
10s11_mme_gtp_c
11s11_s4_sgw_gtp_c
16s2b_epdg_gtp_c
17s2b_u_epdg_gtp_u
18s2b_pgw_gtp_c
19s2b_u_pgw_gtp_u
ies › bearer_context › ies › charging_id
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
charging_iduint(32)1
ies › bearer_context › ies › charging_characteristics
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
valueuint(16)2048
ies › bearer_context › ies › pdn_type
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(5)0
pdn_typeenum(3)1 (ipv4)

ies › bearer_context › ies › pdn_type › pdn_type

ValueName
1ipv4
2ipv6
3ipv4v6
4non_ip
5ethernet
ies › bearer_context › ies › ue_time_zone
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
time_zoneuint(8)0
spare2uint(6)0
daylight_saving_timeuint(2)0
ies › bearer_context › ies › apn_restriction
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
restrictionuint(8)0
ies › bearer_context › ies › selection_mode
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
spare2uint(6)0
selection_modeuint(2)0
ies › bearer_context › ies › private_extension
FieldTypeDefaultAutoDescription
spareuint(4)0
instanceuint(4)0
enterprise_iduint(16)0
valuebytes — rest of the PDU

Next layer

The next layer is selected by p; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
1gtpv2at least 8 octets remaining

Constraints

LevelRule
warningversion = 2
errorheader at least 8 octets

Sample templates

Diameter (diameter)

Reached from

Lower layerSelectorValue
tcpdst_port / src_port3868 (0x0f1c)

Fields

FieldTypeDefaultAutoDescription
versionuint(8)1Diameter version (1).
message_lengthuint(24)Length of the header in octetsMessage length in octets, including the header and the AVP padding (Auto).
ruint(1)1R flag: request (0 = answer).
puint(1)0P flag: proxiable.
euint(1)0E flag: the answer carries a protocol error.
tuint(1)0T flag: potentially retransmitted message.
reserveduint(4)0
command_codeenum(24)257 (capabilities_exchange)Command code (Capabilities-Exchange, Device-Watchdog, Credit-Control, …).
application_iduint(32)0Application-ID (0 = Diameter common messages).
hop_by_hopuint(32)1Hop-by-Hop identifier matching an answer to its request on one connection.
end_to_enduint(32)1End-to-End identifier detecting duplicate requests.
avpstlv — up to offset message_length of the group5 itemsAVPs (32-bit code, V / M / P flags, 24-bit length without the padding, optional Vendor-ID, data padded to 4 octets): base protocol and Credit-Control AVPs, grouped AVPs one level deep. Lengths, padding and the V flag are Auto.

command_code

ValueName
257 (0x000101)capabilities_exchange
258 (0x000102)re_auth
271 (0x00010f)accounting
272 (0x000110)credit_control
274 (0x000112)abort_session
275 (0x000113)session_termination
280 (0x000118)device_watchdog
282 (0x00011a)disconnect_peer
316 (0x00013c)update_location
317 (0x00013d)cancel_location
318 (0x00013e)authentication_information
319 (0x00013f)insert_subscriber_data
320 (0x000140)delete_subscriber_data
321 (0x000141)purge_ue
323 (0x000143)notify

avps

  • Type 32 bits, length 24 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x00000001)user_namev, m, p, reserved, vendor_id, value
25 (0x00000019)classv, m, p, reserved, vendor_id, value
27 (0x0000001b)session_timeoutv, m, p, reserved, vendor_id, value
33 (0x00000021)proxy_statev, m, p, reserved, vendor_id, value
44 (0x0000002c)accounting_session_idv, m, p, reserved, vendor_id, value
50 (0x00000032)acct_multi_session_idv, m, p, reserved, vendor_id, value
55 (0x00000037)event_timestampv, m, p, reserved, vendor_id, value
85 (0x00000055)acct_interim_intervalv, m, p, reserved, vendor_id, value
258 (0x00000102)auth_application_idv, m, p, reserved, vendor_id, value
259 (0x00000103)acct_application_idv, m, p, reserved, vendor_id, value
262 (0x00000106)redirect_max_cache_timev, m, p, reserved, vendor_id, value
263 (0x00000107)session_idv, m, p, reserved, vendor_id, value
264 (0x00000108)origin_hostv, m, p, reserved, vendor_id, value
265 (0x00000109)supported_vendor_idv, m, p, reserved, vendor_id, value
266 (0x0000010a)vendor_idv, m, p, reserved, vendor_id, value
267 (0x0000010b)firmware_revisionv, m, p, reserved, vendor_id, value
268 (0x0000010c)result_codev, m, p, reserved, vendor_id, value
269 (0x0000010d)product_namev, m, p, reserved, vendor_id, value
270 (0x0000010e)session_bindingv, m, p, reserved, vendor_id, value
272 (0x00000110)multi_round_time_outv, m, p, reserved, vendor_id, value
273 (0x00000111)disconnect_causev, m, p, reserved, vendor_id, value
274 (0x00000112)auth_request_typev, m, p, reserved, vendor_id, value
276 (0x00000114)auth_grace_periodv, m, p, reserved, vendor_id, value
277 (0x00000115)auth_session_statev, m, p, reserved, vendor_id, value
278 (0x00000116)origin_state_idv, m, p, reserved, vendor_id, value
280 (0x00000118)proxy_hostv, m, p, reserved, vendor_id, value
281 (0x00000119)error_messagev, m, p, reserved, vendor_id, value
282 (0x0000011a)route_recordv, m, p, reserved, vendor_id, value
283 (0x0000011b)destination_realmv, m, p, reserved, vendor_id, value
285 (0x0000011d)re_auth_request_typev, m, p, reserved, vendor_id, value
287 (0x0000011f)accounting_sub_session_idv, m, p, reserved, vendor_id, value
291 (0x00000123)authorization_lifetimev, m, p, reserved, vendor_id, value
292 (0x00000124)redirect_hostv, m, p, reserved, vendor_id, value
293 (0x00000125)destination_hostv, m, p, reserved, vendor_id, value
294 (0x00000126)error_reporting_hostv, m, p, reserved, vendor_id, value
295 (0x00000127)termination_causev, m, p, reserved, vendor_id, value
296 (0x00000128)origin_realmv, m, p, reserved, vendor_id, value
298 (0x0000012a)experimental_result_codev, m, p, reserved, vendor_id, value
299 (0x0000012b)inband_security_idv, m, p, reserved, vendor_id, value
415 (0x0000019f)cc_request_numberv, m, p, reserved, vendor_id, value
416 (0x000001a0)cc_request_typev, m, p, reserved, vendor_id, value
444 (0x000001bc)subscription_id_datav, m, p, reserved, vendor_id, value
450 (0x000001c2)subscription_id_typev, m, p, reserved, vendor_id, value
455 (0x000001c7)multiple_services_indicatorv, m, p, reserved, vendor_id, value
461 (0x000001cd)service_context_idv, m, p, reserved, vendor_id, value
480 (0x000001e0)accounting_record_typev, m, p, reserved, vendor_id, value
485 (0x000001e5)accounting_record_numberv, m, p, reserved, vendor_id, value
257 (0x00000101)host_ip_addressv, m, p, reserved, vendor_id, address_family, address; when the value is 7 octets
257 (0x00000101)host_ip_address_ipv6v, m, p, reserved, vendor_id, address_family, address; when the value is 19 octets
260 (0x00000104)vendor_specific_application_idv, m, p, reserved, vendor_id, avps
279 (0x00000117)failed_avpv, m, p, reserved, vendor_id, avps
284 (0x0000011c)proxy_infov, m, p, reserved, vendor_id, avps
297 (0x00000129)experimental_resultv, m, p, reserved, vendor_id, avps
443 (0x000001bb)subscription_idv, m, p, reserved, vendor_id, avps

avps › user_name

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › class

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › session_timeout

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › proxy_state

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › accounting_session_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › acct_multi_session_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › event_timestamp

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › acct_interim_interval

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › auth_application_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › acct_application_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › redirect_max_cache_time

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › session_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › origin_host

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › supported_vendor_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › vendor_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › firmware_revision

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › result_code

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)2001 (success)
avps › result_code › value
ValueName
1001 (0x000003e9)multi_round_auth
2001 (0x000007d1)success
2002 (0x000007d2)limited_success
3001 (0x00000bb9)command_unsupported
3002 (0x00000bba)unable_to_deliver
3003 (0x00000bbb)realm_not_served
3004 (0x00000bbc)too_busy
3005 (0x00000bbd)loop_detected
3006 (0x00000bbe)redirect_indication
3007 (0x00000bbf)application_unsupported
3008 (0x00000bc0)invalid_hdr_bits
3009 (0x00000bc1)invalid_avp_bits
3010 (0x00000bc2)unknown_peer
4001 (0x00000fa1)authentication_rejected
4002 (0x00000fa2)out_of_space
4003 (0x00000fa3)election_lost
5001 (0x00001389)avp_unsupported
5002 (0x0000138a)unknown_session_id
5003 (0x0000138b)authorization_rejected
5004 (0x0000138c)invalid_avp_value
5005 (0x0000138d)missing_avp
5006 (0x0000138e)resources_exceeded
5007 (0x0000138f)contradicting_avps
5008 (0x00001390)avp_not_allowed
5009 (0x00001391)avp_occurs_too_many_times
5010 (0x00001392)no_common_application
5011 (0x00001393)unsupported_version
5012 (0x00001394)unable_to_comply
5013 (0x00001395)invalid_bit_in_header
5014 (0x00001396)invalid_avp_length
5015 (0x00001397)invalid_message_length
5016 (0x00001398)invalid_avp_bit_combo
5017 (0x00001399)no_common_security

avps › product_name

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › session_binding

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › multi_round_time_out

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › disconnect_cause

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (rebooting)
avps › disconnect_cause › value
ValueName
0 (0x00000000)rebooting
1 (0x00000001)busy
2 (0x00000002)do_not_want_to_talk_to_you

avps › auth_request_type

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)3 (authorize_authenticate)
avps › auth_request_type › value
ValueName
1 (0x00000001)authenticate_only
2 (0x00000002)authorize_only
3 (0x00000003)authorize_authenticate

avps › auth_grace_period

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › auth_session_state

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (no_state_maintained)
avps › auth_session_state › value
ValueName
0 (0x00000000)state_maintained
1 (0x00000001)no_state_maintained

avps › origin_state_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › proxy_host

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › error_message

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › route_record

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › destination_realm

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › re_auth_request_type

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (authorize_only)
avps › re_auth_request_type › value
ValueName
0 (0x00000000)authorize_only
1 (0x00000001)authorize_authenticate

avps › accounting_sub_session_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(64)

avps › authorization_lifetime

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › redirect_host

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › destination_host

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › error_reporting_host

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › termination_cause

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (logout)
avps › termination_cause › value
ValueName
1 (0x00000001)logout
2 (0x00000002)service_not_provided
3 (0x00000003)bad_answer
4 (0x00000004)administrative
5 (0x00000005)link_broken
6 (0x00000006)auth_expired
7 (0x00000007)user_moved
8 (0x00000008)session_timeout

avps › origin_realm

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › experimental_result_code

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › inband_security_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › cc_request_number

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › cc_request_type

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (initial_request)
avps › cc_request_type › value
ValueName
1 (0x00000001)initial_request
2 (0x00000002)update_request
3 (0x00000003)termination_request
4 (0x00000004)event_request

avps › subscription_id_data

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › subscription_id_type

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (end_user_e164)
avps › subscription_id_type › value
ValueName
0 (0x00000000)end_user_e164
1 (0x00000001)end_user_imsi
2 (0x00000002)end_user_sip_uri
3 (0x00000003)end_user_nai
4 (0x00000004)end_user_private

avps › multiple_services_indicator

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (not_supported)
avps › multiple_services_indicator › value
ValueName
0 (0x00000000)not_supported
1 (0x00000001)supported

avps › service_context_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU

avps › accounting_record_type

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (event_record)
avps › accounting_record_type › value
ValueName
1 (0x00000001)event_record
2 (0x00000002)start_record
3 (0x00000003)interim_record
4 (0x00000004)stop_record

avps › accounting_record_number

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)

avps › host_ip_address

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)1
addressipv4192.0.2.1

avps › host_ip_address_ipv6

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)2
addressipv62001:db8::1

avps › vendor_specific_application_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
avpstlv — rest of the PDU2 items
avps › vendor_specific_application_id › avps
  • Type 32 bits, length 24 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x00000001)user_namev, m, p, reserved, vendor_id, value
25 (0x00000019)classv, m, p, reserved, vendor_id, value
27 (0x0000001b)session_timeoutv, m, p, reserved, vendor_id, value
33 (0x00000021)proxy_statev, m, p, reserved, vendor_id, value
44 (0x0000002c)accounting_session_idv, m, p, reserved, vendor_id, value
50 (0x00000032)acct_multi_session_idv, m, p, reserved, vendor_id, value
55 (0x00000037)event_timestampv, m, p, reserved, vendor_id, value
85 (0x00000055)acct_interim_intervalv, m, p, reserved, vendor_id, value
258 (0x00000102)auth_application_idv, m, p, reserved, vendor_id, value
259 (0x00000103)acct_application_idv, m, p, reserved, vendor_id, value
262 (0x00000106)redirect_max_cache_timev, m, p, reserved, vendor_id, value
263 (0x00000107)session_idv, m, p, reserved, vendor_id, value
264 (0x00000108)origin_hostv, m, p, reserved, vendor_id, value
265 (0x00000109)supported_vendor_idv, m, p, reserved, vendor_id, value
266 (0x0000010a)vendor_idv, m, p, reserved, vendor_id, value
267 (0x0000010b)firmware_revisionv, m, p, reserved, vendor_id, value
268 (0x0000010c)result_codev, m, p, reserved, vendor_id, value
269 (0x0000010d)product_namev, m, p, reserved, vendor_id, value
270 (0x0000010e)session_bindingv, m, p, reserved, vendor_id, value
272 (0x00000110)multi_round_time_outv, m, p, reserved, vendor_id, value
273 (0x00000111)disconnect_causev, m, p, reserved, vendor_id, value
274 (0x00000112)auth_request_typev, m, p, reserved, vendor_id, value
276 (0x00000114)auth_grace_periodv, m, p, reserved, vendor_id, value
277 (0x00000115)auth_session_statev, m, p, reserved, vendor_id, value
278 (0x00000116)origin_state_idv, m, p, reserved, vendor_id, value
280 (0x00000118)proxy_hostv, m, p, reserved, vendor_id, value
281 (0x00000119)error_messagev, m, p, reserved, vendor_id, value
282 (0x0000011a)route_recordv, m, p, reserved, vendor_id, value
283 (0x0000011b)destination_realmv, m, p, reserved, vendor_id, value
285 (0x0000011d)re_auth_request_typev, m, p, reserved, vendor_id, value
287 (0x0000011f)accounting_sub_session_idv, m, p, reserved, vendor_id, value
291 (0x00000123)authorization_lifetimev, m, p, reserved, vendor_id, value
292 (0x00000124)redirect_hostv, m, p, reserved, vendor_id, value
293 (0x00000125)destination_hostv, m, p, reserved, vendor_id, value
294 (0x00000126)error_reporting_hostv, m, p, reserved, vendor_id, value
295 (0x00000127)termination_causev, m, p, reserved, vendor_id, value
296 (0x00000128)origin_realmv, m, p, reserved, vendor_id, value
298 (0x0000012a)experimental_result_codev, m, p, reserved, vendor_id, value
299 (0x0000012b)inband_security_idv, m, p, reserved, vendor_id, value
415 (0x0000019f)cc_request_numberv, m, p, reserved, vendor_id, value
416 (0x000001a0)cc_request_typev, m, p, reserved, vendor_id, value
444 (0x000001bc)subscription_id_datav, m, p, reserved, vendor_id, value
450 (0x000001c2)subscription_id_typev, m, p, reserved, vendor_id, value
455 (0x000001c7)multiple_services_indicatorv, m, p, reserved, vendor_id, value
461 (0x000001cd)service_context_idv, m, p, reserved, vendor_id, value
480 (0x000001e0)accounting_record_typev, m, p, reserved, vendor_id, value
485 (0x000001e5)accounting_record_numberv, m, p, reserved, vendor_id, value
257 (0x00000101)host_ip_addressv, m, p, reserved, vendor_id, address_family, address; when the value is 7 octets
257 (0x00000101)host_ip_address_ipv6v, m, p, reserved, vendor_id, address_family, address; when the value is 19 octets
avps › vendor_specific_application_id › avps › user_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › class
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › session_timeout
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › proxy_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › accounting_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › acct_multi_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › event_timestamp
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › acct_interim_interval
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › auth_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › acct_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › redirect_max_cache_time
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › origin_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › supported_vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › firmware_revision
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)2001 (success)

avps › vendor_specific_application_id › avps › result_code › value

ValueName
1001 (0x000003e9)multi_round_auth
2001 (0x000007d1)success
2002 (0x000007d2)limited_success
3001 (0x00000bb9)command_unsupported
3002 (0x00000bba)unable_to_deliver
3003 (0x00000bbb)realm_not_served
3004 (0x00000bbc)too_busy
3005 (0x00000bbd)loop_detected
3006 (0x00000bbe)redirect_indication
3007 (0x00000bbf)application_unsupported
3008 (0x00000bc0)invalid_hdr_bits
3009 (0x00000bc1)invalid_avp_bits
3010 (0x00000bc2)unknown_peer
4001 (0x00000fa1)authentication_rejected
4002 (0x00000fa2)out_of_space
4003 (0x00000fa3)election_lost
5001 (0x00001389)avp_unsupported
5002 (0x0000138a)unknown_session_id
5003 (0x0000138b)authorization_rejected
5004 (0x0000138c)invalid_avp_value
5005 (0x0000138d)missing_avp
5006 (0x0000138e)resources_exceeded
5007 (0x0000138f)contradicting_avps
5008 (0x00001390)avp_not_allowed
5009 (0x00001391)avp_occurs_too_many_times
5010 (0x00001392)no_common_application
5011 (0x00001393)unsupported_version
5012 (0x00001394)unable_to_comply
5013 (0x00001395)invalid_bit_in_header
5014 (0x00001396)invalid_avp_length
5015 (0x00001397)invalid_message_length
5016 (0x00001398)invalid_avp_bit_combo
5017 (0x00001399)no_common_security
avps › vendor_specific_application_id › avps › product_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › session_binding
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › multi_round_time_out
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › disconnect_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (rebooting)

avps › vendor_specific_application_id › avps › disconnect_cause › value

ValueName
0 (0x00000000)rebooting
1 (0x00000001)busy
2 (0x00000002)do_not_want_to_talk_to_you
avps › vendor_specific_application_id › avps › auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)3 (authorize_authenticate)

avps › vendor_specific_application_id › avps › auth_request_type › value

ValueName
1 (0x00000001)authenticate_only
2 (0x00000002)authorize_only
3 (0x00000003)authorize_authenticate
avps › vendor_specific_application_id › avps › auth_grace_period
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › auth_session_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (no_state_maintained)

avps › vendor_specific_application_id › avps › auth_session_state › value

ValueName
0 (0x00000000)state_maintained
1 (0x00000001)no_state_maintained
avps › vendor_specific_application_id › avps › origin_state_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › proxy_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › error_message
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › route_record
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › destination_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › re_auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (authorize_only)

avps › vendor_specific_application_id › avps › re_auth_request_type › value

ValueName
0 (0x00000000)authorize_only
1 (0x00000001)authorize_authenticate
avps › vendor_specific_application_id › avps › accounting_sub_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(64)
avps › vendor_specific_application_id › avps › authorization_lifetime
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › redirect_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › destination_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › error_reporting_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › termination_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (logout)

avps › vendor_specific_application_id › avps › termination_cause › value

ValueName
1 (0x00000001)logout
2 (0x00000002)service_not_provided
3 (0x00000003)bad_answer
4 (0x00000004)administrative
5 (0x00000005)link_broken
6 (0x00000006)auth_expired
7 (0x00000007)user_moved
8 (0x00000008)session_timeout
avps › vendor_specific_application_id › avps › origin_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › experimental_result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › inband_security_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › cc_request_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › cc_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (initial_request)

avps › vendor_specific_application_id › avps › cc_request_type › value

ValueName
1 (0x00000001)initial_request
2 (0x00000002)update_request
3 (0x00000003)termination_request
4 (0x00000004)event_request
avps › vendor_specific_application_id › avps › subscription_id_data
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › subscription_id_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (end_user_e164)

avps › vendor_specific_application_id › avps › subscription_id_type › value

ValueName
0 (0x00000000)end_user_e164
1 (0x00000001)end_user_imsi
2 (0x00000002)end_user_sip_uri
3 (0x00000003)end_user_nai
4 (0x00000004)end_user_private
avps › vendor_specific_application_id › avps › multiple_services_indicator
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (not_supported)

avps › vendor_specific_application_id › avps › multiple_services_indicator › value

ValueName
0 (0x00000000)not_supported
1 (0x00000001)supported
avps › vendor_specific_application_id › avps › service_context_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › vendor_specific_application_id › avps › accounting_record_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (event_record)

avps › vendor_specific_application_id › avps › accounting_record_type › value

ValueName
1 (0x00000001)event_record
2 (0x00000002)start_record
3 (0x00000003)interim_record
4 (0x00000004)stop_record
avps › vendor_specific_application_id › avps › accounting_record_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › vendor_specific_application_id › avps › host_ip_address
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)1
addressipv4192.0.2.1
avps › vendor_specific_application_id › avps › host_ip_address_ipv6
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)2
addressipv62001:db8::1

avps › failed_avp

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
avpstlv — rest of the PDU[]
avps › failed_avp › avps
  • Type 32 bits, length 24 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x00000001)user_namev, m, p, reserved, vendor_id, value
25 (0x00000019)classv, m, p, reserved, vendor_id, value
27 (0x0000001b)session_timeoutv, m, p, reserved, vendor_id, value
33 (0x00000021)proxy_statev, m, p, reserved, vendor_id, value
44 (0x0000002c)accounting_session_idv, m, p, reserved, vendor_id, value
50 (0x00000032)acct_multi_session_idv, m, p, reserved, vendor_id, value
55 (0x00000037)event_timestampv, m, p, reserved, vendor_id, value
85 (0x00000055)acct_interim_intervalv, m, p, reserved, vendor_id, value
258 (0x00000102)auth_application_idv, m, p, reserved, vendor_id, value
259 (0x00000103)acct_application_idv, m, p, reserved, vendor_id, value
262 (0x00000106)redirect_max_cache_timev, m, p, reserved, vendor_id, value
263 (0x00000107)session_idv, m, p, reserved, vendor_id, value
264 (0x00000108)origin_hostv, m, p, reserved, vendor_id, value
265 (0x00000109)supported_vendor_idv, m, p, reserved, vendor_id, value
266 (0x0000010a)vendor_idv, m, p, reserved, vendor_id, value
267 (0x0000010b)firmware_revisionv, m, p, reserved, vendor_id, value
268 (0x0000010c)result_codev, m, p, reserved, vendor_id, value
269 (0x0000010d)product_namev, m, p, reserved, vendor_id, value
270 (0x0000010e)session_bindingv, m, p, reserved, vendor_id, value
272 (0x00000110)multi_round_time_outv, m, p, reserved, vendor_id, value
273 (0x00000111)disconnect_causev, m, p, reserved, vendor_id, value
274 (0x00000112)auth_request_typev, m, p, reserved, vendor_id, value
276 (0x00000114)auth_grace_periodv, m, p, reserved, vendor_id, value
277 (0x00000115)auth_session_statev, m, p, reserved, vendor_id, value
278 (0x00000116)origin_state_idv, m, p, reserved, vendor_id, value
280 (0x00000118)proxy_hostv, m, p, reserved, vendor_id, value
281 (0x00000119)error_messagev, m, p, reserved, vendor_id, value
282 (0x0000011a)route_recordv, m, p, reserved, vendor_id, value
283 (0x0000011b)destination_realmv, m, p, reserved, vendor_id, value
285 (0x0000011d)re_auth_request_typev, m, p, reserved, vendor_id, value
287 (0x0000011f)accounting_sub_session_idv, m, p, reserved, vendor_id, value
291 (0x00000123)authorization_lifetimev, m, p, reserved, vendor_id, value
292 (0x00000124)redirect_hostv, m, p, reserved, vendor_id, value
293 (0x00000125)destination_hostv, m, p, reserved, vendor_id, value
294 (0x00000126)error_reporting_hostv, m, p, reserved, vendor_id, value
295 (0x00000127)termination_causev, m, p, reserved, vendor_id, value
296 (0x00000128)origin_realmv, m, p, reserved, vendor_id, value
298 (0x0000012a)experimental_result_codev, m, p, reserved, vendor_id, value
299 (0x0000012b)inband_security_idv, m, p, reserved, vendor_id, value
415 (0x0000019f)cc_request_numberv, m, p, reserved, vendor_id, value
416 (0x000001a0)cc_request_typev, m, p, reserved, vendor_id, value
444 (0x000001bc)subscription_id_datav, m, p, reserved, vendor_id, value
450 (0x000001c2)subscription_id_typev, m, p, reserved, vendor_id, value
455 (0x000001c7)multiple_services_indicatorv, m, p, reserved, vendor_id, value
461 (0x000001cd)service_context_idv, m, p, reserved, vendor_id, value
480 (0x000001e0)accounting_record_typev, m, p, reserved, vendor_id, value
485 (0x000001e5)accounting_record_numberv, m, p, reserved, vendor_id, value
257 (0x00000101)host_ip_addressv, m, p, reserved, vendor_id, address_family, address; when the value is 7 octets
257 (0x00000101)host_ip_address_ipv6v, m, p, reserved, vendor_id, address_family, address; when the value is 19 octets
avps › failed_avp › avps › user_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › class
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › session_timeout
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › proxy_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › accounting_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › acct_multi_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › event_timestamp
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › acct_interim_interval
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › auth_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › acct_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › redirect_max_cache_time
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › origin_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › supported_vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › firmware_revision
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)2001 (success)

avps › failed_avp › avps › result_code › value

ValueName
1001 (0x000003e9)multi_round_auth
2001 (0x000007d1)success
2002 (0x000007d2)limited_success
3001 (0x00000bb9)command_unsupported
3002 (0x00000bba)unable_to_deliver
3003 (0x00000bbb)realm_not_served
3004 (0x00000bbc)too_busy
3005 (0x00000bbd)loop_detected
3006 (0x00000bbe)redirect_indication
3007 (0x00000bbf)application_unsupported
3008 (0x00000bc0)invalid_hdr_bits
3009 (0x00000bc1)invalid_avp_bits
3010 (0x00000bc2)unknown_peer
4001 (0x00000fa1)authentication_rejected
4002 (0x00000fa2)out_of_space
4003 (0x00000fa3)election_lost
5001 (0x00001389)avp_unsupported
5002 (0x0000138a)unknown_session_id
5003 (0x0000138b)authorization_rejected
5004 (0x0000138c)invalid_avp_value
5005 (0x0000138d)missing_avp
5006 (0x0000138e)resources_exceeded
5007 (0x0000138f)contradicting_avps
5008 (0x00001390)avp_not_allowed
5009 (0x00001391)avp_occurs_too_many_times
5010 (0x00001392)no_common_application
5011 (0x00001393)unsupported_version
5012 (0x00001394)unable_to_comply
5013 (0x00001395)invalid_bit_in_header
5014 (0x00001396)invalid_avp_length
5015 (0x00001397)invalid_message_length
5016 (0x00001398)invalid_avp_bit_combo
5017 (0x00001399)no_common_security
avps › failed_avp › avps › product_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › session_binding
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › multi_round_time_out
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › disconnect_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (rebooting)

avps › failed_avp › avps › disconnect_cause › value

ValueName
0 (0x00000000)rebooting
1 (0x00000001)busy
2 (0x00000002)do_not_want_to_talk_to_you
avps › failed_avp › avps › auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)3 (authorize_authenticate)

avps › failed_avp › avps › auth_request_type › value

ValueName
1 (0x00000001)authenticate_only
2 (0x00000002)authorize_only
3 (0x00000003)authorize_authenticate
avps › failed_avp › avps › auth_grace_period
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › auth_session_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (no_state_maintained)

avps › failed_avp › avps › auth_session_state › value

ValueName
0 (0x00000000)state_maintained
1 (0x00000001)no_state_maintained
avps › failed_avp › avps › origin_state_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › proxy_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › error_message
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › route_record
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › destination_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › re_auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (authorize_only)

avps › failed_avp › avps › re_auth_request_type › value

ValueName
0 (0x00000000)authorize_only
1 (0x00000001)authorize_authenticate
avps › failed_avp › avps › accounting_sub_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(64)
avps › failed_avp › avps › authorization_lifetime
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › redirect_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › destination_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › error_reporting_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › termination_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (logout)

avps › failed_avp › avps › termination_cause › value

ValueName
1 (0x00000001)logout
2 (0x00000002)service_not_provided
3 (0x00000003)bad_answer
4 (0x00000004)administrative
5 (0x00000005)link_broken
6 (0x00000006)auth_expired
7 (0x00000007)user_moved
8 (0x00000008)session_timeout
avps › failed_avp › avps › origin_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › experimental_result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › inband_security_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › cc_request_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › cc_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (initial_request)

avps › failed_avp › avps › cc_request_type › value

ValueName
1 (0x00000001)initial_request
2 (0x00000002)update_request
3 (0x00000003)termination_request
4 (0x00000004)event_request
avps › failed_avp › avps › subscription_id_data
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › subscription_id_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (end_user_e164)

avps › failed_avp › avps › subscription_id_type › value

ValueName
0 (0x00000000)end_user_e164
1 (0x00000001)end_user_imsi
2 (0x00000002)end_user_sip_uri
3 (0x00000003)end_user_nai
4 (0x00000004)end_user_private
avps › failed_avp › avps › multiple_services_indicator
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (not_supported)

avps › failed_avp › avps › multiple_services_indicator › value

ValueName
0 (0x00000000)not_supported
1 (0x00000001)supported
avps › failed_avp › avps › service_context_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › failed_avp › avps › accounting_record_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (event_record)

avps › failed_avp › avps › accounting_record_type › value

ValueName
1 (0x00000001)event_record
2 (0x00000002)start_record
3 (0x00000003)interim_record
4 (0x00000004)stop_record
avps › failed_avp › avps › accounting_record_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › failed_avp › avps › host_ip_address
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)1
addressipv4192.0.2.1
avps › failed_avp › avps › host_ip_address_ipv6
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)2
addressipv62001:db8::1

avps › proxy_info

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
avpstlv — rest of the PDU2 items
avps › proxy_info › avps
  • Type 32 bits, length 24 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x00000001)user_namev, m, p, reserved, vendor_id, value
25 (0x00000019)classv, m, p, reserved, vendor_id, value
27 (0x0000001b)session_timeoutv, m, p, reserved, vendor_id, value
33 (0x00000021)proxy_statev, m, p, reserved, vendor_id, value
44 (0x0000002c)accounting_session_idv, m, p, reserved, vendor_id, value
50 (0x00000032)acct_multi_session_idv, m, p, reserved, vendor_id, value
55 (0x00000037)event_timestampv, m, p, reserved, vendor_id, value
85 (0x00000055)acct_interim_intervalv, m, p, reserved, vendor_id, value
258 (0x00000102)auth_application_idv, m, p, reserved, vendor_id, value
259 (0x00000103)acct_application_idv, m, p, reserved, vendor_id, value
262 (0x00000106)redirect_max_cache_timev, m, p, reserved, vendor_id, value
263 (0x00000107)session_idv, m, p, reserved, vendor_id, value
264 (0x00000108)origin_hostv, m, p, reserved, vendor_id, value
265 (0x00000109)supported_vendor_idv, m, p, reserved, vendor_id, value
266 (0x0000010a)vendor_idv, m, p, reserved, vendor_id, value
267 (0x0000010b)firmware_revisionv, m, p, reserved, vendor_id, value
268 (0x0000010c)result_codev, m, p, reserved, vendor_id, value
269 (0x0000010d)product_namev, m, p, reserved, vendor_id, value
270 (0x0000010e)session_bindingv, m, p, reserved, vendor_id, value
272 (0x00000110)multi_round_time_outv, m, p, reserved, vendor_id, value
273 (0x00000111)disconnect_causev, m, p, reserved, vendor_id, value
274 (0x00000112)auth_request_typev, m, p, reserved, vendor_id, value
276 (0x00000114)auth_grace_periodv, m, p, reserved, vendor_id, value
277 (0x00000115)auth_session_statev, m, p, reserved, vendor_id, value
278 (0x00000116)origin_state_idv, m, p, reserved, vendor_id, value
280 (0x00000118)proxy_hostv, m, p, reserved, vendor_id, value
281 (0x00000119)error_messagev, m, p, reserved, vendor_id, value
282 (0x0000011a)route_recordv, m, p, reserved, vendor_id, value
283 (0x0000011b)destination_realmv, m, p, reserved, vendor_id, value
285 (0x0000011d)re_auth_request_typev, m, p, reserved, vendor_id, value
287 (0x0000011f)accounting_sub_session_idv, m, p, reserved, vendor_id, value
291 (0x00000123)authorization_lifetimev, m, p, reserved, vendor_id, value
292 (0x00000124)redirect_hostv, m, p, reserved, vendor_id, value
293 (0x00000125)destination_hostv, m, p, reserved, vendor_id, value
294 (0x00000126)error_reporting_hostv, m, p, reserved, vendor_id, value
295 (0x00000127)termination_causev, m, p, reserved, vendor_id, value
296 (0x00000128)origin_realmv, m, p, reserved, vendor_id, value
298 (0x0000012a)experimental_result_codev, m, p, reserved, vendor_id, value
299 (0x0000012b)inband_security_idv, m, p, reserved, vendor_id, value
415 (0x0000019f)cc_request_numberv, m, p, reserved, vendor_id, value
416 (0x000001a0)cc_request_typev, m, p, reserved, vendor_id, value
444 (0x000001bc)subscription_id_datav, m, p, reserved, vendor_id, value
450 (0x000001c2)subscription_id_typev, m, p, reserved, vendor_id, value
455 (0x000001c7)multiple_services_indicatorv, m, p, reserved, vendor_id, value
461 (0x000001cd)service_context_idv, m, p, reserved, vendor_id, value
480 (0x000001e0)accounting_record_typev, m, p, reserved, vendor_id, value
485 (0x000001e5)accounting_record_numberv, m, p, reserved, vendor_id, value
257 (0x00000101)host_ip_addressv, m, p, reserved, vendor_id, address_family, address; when the value is 7 octets
257 (0x00000101)host_ip_address_ipv6v, m, p, reserved, vendor_id, address_family, address; when the value is 19 octets
avps › proxy_info › avps › user_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › class
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › session_timeout
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › proxy_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › accounting_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › acct_multi_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › event_timestamp
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › acct_interim_interval
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › auth_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › acct_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › redirect_max_cache_time
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › origin_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › supported_vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › firmware_revision
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)2001 (success)

avps › proxy_info › avps › result_code › value

ValueName
1001 (0x000003e9)multi_round_auth
2001 (0x000007d1)success
2002 (0x000007d2)limited_success
3001 (0x00000bb9)command_unsupported
3002 (0x00000bba)unable_to_deliver
3003 (0x00000bbb)realm_not_served
3004 (0x00000bbc)too_busy
3005 (0x00000bbd)loop_detected
3006 (0x00000bbe)redirect_indication
3007 (0x00000bbf)application_unsupported
3008 (0x00000bc0)invalid_hdr_bits
3009 (0x00000bc1)invalid_avp_bits
3010 (0x00000bc2)unknown_peer
4001 (0x00000fa1)authentication_rejected
4002 (0x00000fa2)out_of_space
4003 (0x00000fa3)election_lost
5001 (0x00001389)avp_unsupported
5002 (0x0000138a)unknown_session_id
5003 (0x0000138b)authorization_rejected
5004 (0x0000138c)invalid_avp_value
5005 (0x0000138d)missing_avp
5006 (0x0000138e)resources_exceeded
5007 (0x0000138f)contradicting_avps
5008 (0x00001390)avp_not_allowed
5009 (0x00001391)avp_occurs_too_many_times
5010 (0x00001392)no_common_application
5011 (0x00001393)unsupported_version
5012 (0x00001394)unable_to_comply
5013 (0x00001395)invalid_bit_in_header
5014 (0x00001396)invalid_avp_length
5015 (0x00001397)invalid_message_length
5016 (0x00001398)invalid_avp_bit_combo
5017 (0x00001399)no_common_security
avps › proxy_info › avps › product_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › session_binding
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › multi_round_time_out
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › disconnect_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (rebooting)

avps › proxy_info › avps › disconnect_cause › value

ValueName
0 (0x00000000)rebooting
1 (0x00000001)busy
2 (0x00000002)do_not_want_to_talk_to_you
avps › proxy_info › avps › auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)3 (authorize_authenticate)

avps › proxy_info › avps › auth_request_type › value

ValueName
1 (0x00000001)authenticate_only
2 (0x00000002)authorize_only
3 (0x00000003)authorize_authenticate
avps › proxy_info › avps › auth_grace_period
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › auth_session_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (no_state_maintained)

avps › proxy_info › avps › auth_session_state › value

ValueName
0 (0x00000000)state_maintained
1 (0x00000001)no_state_maintained
avps › proxy_info › avps › origin_state_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › proxy_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › error_message
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › route_record
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › destination_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › re_auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (authorize_only)

avps › proxy_info › avps › re_auth_request_type › value

ValueName
0 (0x00000000)authorize_only
1 (0x00000001)authorize_authenticate
avps › proxy_info › avps › accounting_sub_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(64)
avps › proxy_info › avps › authorization_lifetime
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › redirect_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › destination_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › error_reporting_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › termination_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (logout)

avps › proxy_info › avps › termination_cause › value

ValueName
1 (0x00000001)logout
2 (0x00000002)service_not_provided
3 (0x00000003)bad_answer
4 (0x00000004)administrative
5 (0x00000005)link_broken
6 (0x00000006)auth_expired
7 (0x00000007)user_moved
8 (0x00000008)session_timeout
avps › proxy_info › avps › origin_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › experimental_result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › inband_security_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › cc_request_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › cc_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (initial_request)

avps › proxy_info › avps › cc_request_type › value

ValueName
1 (0x00000001)initial_request
2 (0x00000002)update_request
3 (0x00000003)termination_request
4 (0x00000004)event_request
avps › proxy_info › avps › subscription_id_data
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › subscription_id_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (end_user_e164)

avps › proxy_info › avps › subscription_id_type › value

ValueName
0 (0x00000000)end_user_e164
1 (0x00000001)end_user_imsi
2 (0x00000002)end_user_sip_uri
3 (0x00000003)end_user_nai
4 (0x00000004)end_user_private
avps › proxy_info › avps › multiple_services_indicator
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (not_supported)

avps › proxy_info › avps › multiple_services_indicator › value

ValueName
0 (0x00000000)not_supported
1 (0x00000001)supported
avps › proxy_info › avps › service_context_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › proxy_info › avps › accounting_record_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (event_record)

avps › proxy_info › avps › accounting_record_type › value

ValueName
1 (0x00000001)event_record
2 (0x00000002)start_record
3 (0x00000003)interim_record
4 (0x00000004)stop_record
avps › proxy_info › avps › accounting_record_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › proxy_info › avps › host_ip_address
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)1
addressipv4192.0.2.1
avps › proxy_info › avps › host_ip_address_ipv6
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)2
addressipv62001:db8::1

avps › experimental_result

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
avpstlv — rest of the PDU2 items
avps › experimental_result › avps
  • Type 32 bits, length 24 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x00000001)user_namev, m, p, reserved, vendor_id, value
25 (0x00000019)classv, m, p, reserved, vendor_id, value
27 (0x0000001b)session_timeoutv, m, p, reserved, vendor_id, value
33 (0x00000021)proxy_statev, m, p, reserved, vendor_id, value
44 (0x0000002c)accounting_session_idv, m, p, reserved, vendor_id, value
50 (0x00000032)acct_multi_session_idv, m, p, reserved, vendor_id, value
55 (0x00000037)event_timestampv, m, p, reserved, vendor_id, value
85 (0x00000055)acct_interim_intervalv, m, p, reserved, vendor_id, value
258 (0x00000102)auth_application_idv, m, p, reserved, vendor_id, value
259 (0x00000103)acct_application_idv, m, p, reserved, vendor_id, value
262 (0x00000106)redirect_max_cache_timev, m, p, reserved, vendor_id, value
263 (0x00000107)session_idv, m, p, reserved, vendor_id, value
264 (0x00000108)origin_hostv, m, p, reserved, vendor_id, value
265 (0x00000109)supported_vendor_idv, m, p, reserved, vendor_id, value
266 (0x0000010a)vendor_idv, m, p, reserved, vendor_id, value
267 (0x0000010b)firmware_revisionv, m, p, reserved, vendor_id, value
268 (0x0000010c)result_codev, m, p, reserved, vendor_id, value
269 (0x0000010d)product_namev, m, p, reserved, vendor_id, value
270 (0x0000010e)session_bindingv, m, p, reserved, vendor_id, value
272 (0x00000110)multi_round_time_outv, m, p, reserved, vendor_id, value
273 (0x00000111)disconnect_causev, m, p, reserved, vendor_id, value
274 (0x00000112)auth_request_typev, m, p, reserved, vendor_id, value
276 (0x00000114)auth_grace_periodv, m, p, reserved, vendor_id, value
277 (0x00000115)auth_session_statev, m, p, reserved, vendor_id, value
278 (0x00000116)origin_state_idv, m, p, reserved, vendor_id, value
280 (0x00000118)proxy_hostv, m, p, reserved, vendor_id, value
281 (0x00000119)error_messagev, m, p, reserved, vendor_id, value
282 (0x0000011a)route_recordv, m, p, reserved, vendor_id, value
283 (0x0000011b)destination_realmv, m, p, reserved, vendor_id, value
285 (0x0000011d)re_auth_request_typev, m, p, reserved, vendor_id, value
287 (0x0000011f)accounting_sub_session_idv, m, p, reserved, vendor_id, value
291 (0x00000123)authorization_lifetimev, m, p, reserved, vendor_id, value
292 (0x00000124)redirect_hostv, m, p, reserved, vendor_id, value
293 (0x00000125)destination_hostv, m, p, reserved, vendor_id, value
294 (0x00000126)error_reporting_hostv, m, p, reserved, vendor_id, value
295 (0x00000127)termination_causev, m, p, reserved, vendor_id, value
296 (0x00000128)origin_realmv, m, p, reserved, vendor_id, value
298 (0x0000012a)experimental_result_codev, m, p, reserved, vendor_id, value
299 (0x0000012b)inband_security_idv, m, p, reserved, vendor_id, value
415 (0x0000019f)cc_request_numberv, m, p, reserved, vendor_id, value
416 (0x000001a0)cc_request_typev, m, p, reserved, vendor_id, value
444 (0x000001bc)subscription_id_datav, m, p, reserved, vendor_id, value
450 (0x000001c2)subscription_id_typev, m, p, reserved, vendor_id, value
455 (0x000001c7)multiple_services_indicatorv, m, p, reserved, vendor_id, value
461 (0x000001cd)service_context_idv, m, p, reserved, vendor_id, value
480 (0x000001e0)accounting_record_typev, m, p, reserved, vendor_id, value
485 (0x000001e5)accounting_record_numberv, m, p, reserved, vendor_id, value
257 (0x00000101)host_ip_addressv, m, p, reserved, vendor_id, address_family, address; when the value is 7 octets
257 (0x00000101)host_ip_address_ipv6v, m, p, reserved, vendor_id, address_family, address; when the value is 19 octets
avps › experimental_result › avps › user_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › class
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › session_timeout
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › proxy_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › accounting_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › acct_multi_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › event_timestamp
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › acct_interim_interval
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › auth_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › acct_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › redirect_max_cache_time
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › origin_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › supported_vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › firmware_revision
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)2001 (success)

avps › experimental_result › avps › result_code › value

ValueName
1001 (0x000003e9)multi_round_auth
2001 (0x000007d1)success
2002 (0x000007d2)limited_success
3001 (0x00000bb9)command_unsupported
3002 (0x00000bba)unable_to_deliver
3003 (0x00000bbb)realm_not_served
3004 (0x00000bbc)too_busy
3005 (0x00000bbd)loop_detected
3006 (0x00000bbe)redirect_indication
3007 (0x00000bbf)application_unsupported
3008 (0x00000bc0)invalid_hdr_bits
3009 (0x00000bc1)invalid_avp_bits
3010 (0x00000bc2)unknown_peer
4001 (0x00000fa1)authentication_rejected
4002 (0x00000fa2)out_of_space
4003 (0x00000fa3)election_lost
5001 (0x00001389)avp_unsupported
5002 (0x0000138a)unknown_session_id
5003 (0x0000138b)authorization_rejected
5004 (0x0000138c)invalid_avp_value
5005 (0x0000138d)missing_avp
5006 (0x0000138e)resources_exceeded
5007 (0x0000138f)contradicting_avps
5008 (0x00001390)avp_not_allowed
5009 (0x00001391)avp_occurs_too_many_times
5010 (0x00001392)no_common_application
5011 (0x00001393)unsupported_version
5012 (0x00001394)unable_to_comply
5013 (0x00001395)invalid_bit_in_header
5014 (0x00001396)invalid_avp_length
5015 (0x00001397)invalid_message_length
5016 (0x00001398)invalid_avp_bit_combo
5017 (0x00001399)no_common_security
avps › experimental_result › avps › product_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › session_binding
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › multi_round_time_out
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › disconnect_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (rebooting)

avps › experimental_result › avps › disconnect_cause › value

ValueName
0 (0x00000000)rebooting
1 (0x00000001)busy
2 (0x00000002)do_not_want_to_talk_to_you
avps › experimental_result › avps › auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)3 (authorize_authenticate)

avps › experimental_result › avps › auth_request_type › value

ValueName
1 (0x00000001)authenticate_only
2 (0x00000002)authorize_only
3 (0x00000003)authorize_authenticate
avps › experimental_result › avps › auth_grace_period
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › auth_session_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (no_state_maintained)

avps › experimental_result › avps › auth_session_state › value

ValueName
0 (0x00000000)state_maintained
1 (0x00000001)no_state_maintained
avps › experimental_result › avps › origin_state_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › proxy_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › error_message
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › route_record
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › destination_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › re_auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (authorize_only)

avps › experimental_result › avps › re_auth_request_type › value

ValueName
0 (0x00000000)authorize_only
1 (0x00000001)authorize_authenticate
avps › experimental_result › avps › accounting_sub_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(64)
avps › experimental_result › avps › authorization_lifetime
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › redirect_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › destination_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › error_reporting_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › termination_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (logout)

avps › experimental_result › avps › termination_cause › value

ValueName
1 (0x00000001)logout
2 (0x00000002)service_not_provided
3 (0x00000003)bad_answer
4 (0x00000004)administrative
5 (0x00000005)link_broken
6 (0x00000006)auth_expired
7 (0x00000007)user_moved
8 (0x00000008)session_timeout
avps › experimental_result › avps › origin_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › experimental_result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › inband_security_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › cc_request_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › cc_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (initial_request)

avps › experimental_result › avps › cc_request_type › value

ValueName
1 (0x00000001)initial_request
2 (0x00000002)update_request
3 (0x00000003)termination_request
4 (0x00000004)event_request
avps › experimental_result › avps › subscription_id_data
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › subscription_id_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (end_user_e164)

avps › experimental_result › avps › subscription_id_type › value

ValueName
0 (0x00000000)end_user_e164
1 (0x00000001)end_user_imsi
2 (0x00000002)end_user_sip_uri
3 (0x00000003)end_user_nai
4 (0x00000004)end_user_private
avps › experimental_result › avps › multiple_services_indicator
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (not_supported)

avps › experimental_result › avps › multiple_services_indicator › value

ValueName
0 (0x00000000)not_supported
1 (0x00000001)supported
avps › experimental_result › avps › service_context_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › experimental_result › avps › accounting_record_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (event_record)

avps › experimental_result › avps › accounting_record_type › value

ValueName
1 (0x00000001)event_record
2 (0x00000002)start_record
3 (0x00000003)interim_record
4 (0x00000004)stop_record
avps › experimental_result › avps › accounting_record_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › experimental_result › avps › host_ip_address
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)1
addressipv4192.0.2.1
avps › experimental_result › avps › host_ip_address_ipv6
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)2
addressipv62001:db8::1

avps › subscription_id

FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
avpstlv — rest of the PDU2 items
avps › subscription_id › avps
  • Type 32 bits, length 24 bits.
  • The length counts the type and length fields too.
  • The first 1 value octets sit between the type and the length.
  • Each item is zero-padded to a multiple of 4 octets (not counted in the length)
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x00000001)user_namev, m, p, reserved, vendor_id, value
25 (0x00000019)classv, m, p, reserved, vendor_id, value
27 (0x0000001b)session_timeoutv, m, p, reserved, vendor_id, value
33 (0x00000021)proxy_statev, m, p, reserved, vendor_id, value
44 (0x0000002c)accounting_session_idv, m, p, reserved, vendor_id, value
50 (0x00000032)acct_multi_session_idv, m, p, reserved, vendor_id, value
55 (0x00000037)event_timestampv, m, p, reserved, vendor_id, value
85 (0x00000055)acct_interim_intervalv, m, p, reserved, vendor_id, value
258 (0x00000102)auth_application_idv, m, p, reserved, vendor_id, value
259 (0x00000103)acct_application_idv, m, p, reserved, vendor_id, value
262 (0x00000106)redirect_max_cache_timev, m, p, reserved, vendor_id, value
263 (0x00000107)session_idv, m, p, reserved, vendor_id, value
264 (0x00000108)origin_hostv, m, p, reserved, vendor_id, value
265 (0x00000109)supported_vendor_idv, m, p, reserved, vendor_id, value
266 (0x0000010a)vendor_idv, m, p, reserved, vendor_id, value
267 (0x0000010b)firmware_revisionv, m, p, reserved, vendor_id, value
268 (0x0000010c)result_codev, m, p, reserved, vendor_id, value
269 (0x0000010d)product_namev, m, p, reserved, vendor_id, value
270 (0x0000010e)session_bindingv, m, p, reserved, vendor_id, value
272 (0x00000110)multi_round_time_outv, m, p, reserved, vendor_id, value
273 (0x00000111)disconnect_causev, m, p, reserved, vendor_id, value
274 (0x00000112)auth_request_typev, m, p, reserved, vendor_id, value
276 (0x00000114)auth_grace_periodv, m, p, reserved, vendor_id, value
277 (0x00000115)auth_session_statev, m, p, reserved, vendor_id, value
278 (0x00000116)origin_state_idv, m, p, reserved, vendor_id, value
280 (0x00000118)proxy_hostv, m, p, reserved, vendor_id, value
281 (0x00000119)error_messagev, m, p, reserved, vendor_id, value
282 (0x0000011a)route_recordv, m, p, reserved, vendor_id, value
283 (0x0000011b)destination_realmv, m, p, reserved, vendor_id, value
285 (0x0000011d)re_auth_request_typev, m, p, reserved, vendor_id, value
287 (0x0000011f)accounting_sub_session_idv, m, p, reserved, vendor_id, value
291 (0x00000123)authorization_lifetimev, m, p, reserved, vendor_id, value
292 (0x00000124)redirect_hostv, m, p, reserved, vendor_id, value
293 (0x00000125)destination_hostv, m, p, reserved, vendor_id, value
294 (0x00000126)error_reporting_hostv, m, p, reserved, vendor_id, value
295 (0x00000127)termination_causev, m, p, reserved, vendor_id, value
296 (0x00000128)origin_realmv, m, p, reserved, vendor_id, value
298 (0x0000012a)experimental_result_codev, m, p, reserved, vendor_id, value
299 (0x0000012b)inband_security_idv, m, p, reserved, vendor_id, value
415 (0x0000019f)cc_request_numberv, m, p, reserved, vendor_id, value
416 (0x000001a0)cc_request_typev, m, p, reserved, vendor_id, value
444 (0x000001bc)subscription_id_datav, m, p, reserved, vendor_id, value
450 (0x000001c2)subscription_id_typev, m, p, reserved, vendor_id, value
455 (0x000001c7)multiple_services_indicatorv, m, p, reserved, vendor_id, value
461 (0x000001cd)service_context_idv, m, p, reserved, vendor_id, value
480 (0x000001e0)accounting_record_typev, m, p, reserved, vendor_id, value
485 (0x000001e5)accounting_record_numberv, m, p, reserved, vendor_id, value
257 (0x00000101)host_ip_addressv, m, p, reserved, vendor_id, address_family, address; when the value is 7 octets
257 (0x00000101)host_ip_address_ipv6v, m, p, reserved, vendor_id, address_family, address; when the value is 19 octets
avps › subscription_id › avps › user_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › class
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › session_timeout
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › proxy_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › accounting_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › acct_multi_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › event_timestamp
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › acct_interim_interval
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › auth_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › acct_application_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › redirect_max_cache_time
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › origin_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › supported_vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › vendor_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › firmware_revision
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)2001 (success)

avps › subscription_id › avps › result_code › value

ValueName
1001 (0x000003e9)multi_round_auth
2001 (0x000007d1)success
2002 (0x000007d2)limited_success
3001 (0x00000bb9)command_unsupported
3002 (0x00000bba)unable_to_deliver
3003 (0x00000bbb)realm_not_served
3004 (0x00000bbc)too_busy
3005 (0x00000bbd)loop_detected
3006 (0x00000bbe)redirect_indication
3007 (0x00000bbf)application_unsupported
3008 (0x00000bc0)invalid_hdr_bits
3009 (0x00000bc1)invalid_avp_bits
3010 (0x00000bc2)unknown_peer
4001 (0x00000fa1)authentication_rejected
4002 (0x00000fa2)out_of_space
4003 (0x00000fa3)election_lost
5001 (0x00001389)avp_unsupported
5002 (0x0000138a)unknown_session_id
5003 (0x0000138b)authorization_rejected
5004 (0x0000138c)invalid_avp_value
5005 (0x0000138d)missing_avp
5006 (0x0000138e)resources_exceeded
5007 (0x0000138f)contradicting_avps
5008 (0x00001390)avp_not_allowed
5009 (0x00001391)avp_occurs_too_many_times
5010 (0x00001392)no_common_application
5011 (0x00001393)unsupported_version
5012 (0x00001394)unable_to_comply
5013 (0x00001395)invalid_bit_in_header
5014 (0x00001396)invalid_avp_length
5015 (0x00001397)invalid_message_length
5016 (0x00001398)invalid_avp_bit_combo
5017 (0x00001399)no_common_security
avps › subscription_id › avps › product_name
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › session_binding
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › multi_round_time_out
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › disconnect_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (rebooting)

avps › subscription_id › avps › disconnect_cause › value

ValueName
0 (0x00000000)rebooting
1 (0x00000001)busy
2 (0x00000002)do_not_want_to_talk_to_you
avps › subscription_id › avps › auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)3 (authorize_authenticate)

avps › subscription_id › avps › auth_request_type › value

ValueName
1 (0x00000001)authenticate_only
2 (0x00000002)authorize_only
3 (0x00000003)authorize_authenticate
avps › subscription_id › avps › auth_grace_period
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › auth_session_state
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (no_state_maintained)

avps › subscription_id › avps › auth_session_state › value

ValueName
0 (0x00000000)state_maintained
1 (0x00000001)no_state_maintained
avps › subscription_id › avps › origin_state_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › proxy_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › error_message
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › route_record
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › destination_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › re_auth_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (authorize_only)

avps › subscription_id › avps › re_auth_request_type › value

ValueName
0 (0x00000000)authorize_only
1 (0x00000001)authorize_authenticate
avps › subscription_id › avps › accounting_sub_session_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(64)
avps › subscription_id › avps › authorization_lifetime
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › redirect_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › destination_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › error_reporting_host
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)0
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › termination_cause
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (logout)

avps › subscription_id › avps › termination_cause › value

ValueName
1 (0x00000001)logout
2 (0x00000002)service_not_provided
3 (0x00000003)bad_answer
4 (0x00000004)administrative
5 (0x00000005)link_broken
6 (0x00000006)auth_expired
7 (0x00000007)user_moved
8 (0x00000008)session_timeout
avps › subscription_id › avps › origin_realm
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › experimental_result_code
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › inband_security_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › cc_request_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › cc_request_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (initial_request)

avps › subscription_id › avps › cc_request_type › value

ValueName
1 (0x00000001)initial_request
2 (0x00000002)update_request
3 (0x00000003)termination_request
4 (0x00000004)event_request
avps › subscription_id › avps › subscription_id_data
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › subscription_id_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (end_user_e164)

avps › subscription_id › avps › subscription_id_type › value

ValueName
0 (0x00000000)end_user_e164
1 (0x00000001)end_user_imsi
2 (0x00000002)end_user_sip_uri
3 (0x00000003)end_user_nai
4 (0x00000004)end_user_private
avps › subscription_id › avps › multiple_services_indicator
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)0 (not_supported)

avps › subscription_id › avps › multiple_services_indicator › value

ValueName
0 (0x00000000)not_supported
1 (0x00000001)supported
avps › subscription_id › avps › service_context_id
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valuebytes — rest of the PDU
avps › subscription_id › avps › accounting_record_type
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueenum(32)1 (event_record)

avps › subscription_id › avps › accounting_record_type › value

ValueName
1 (0x00000001)event_record
2 (0x00000002)start_record
3 (0x00000003)interim_record
4 (0x00000004)stop_record
avps › subscription_id › avps › accounting_record_number
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
valueuint(32)
avps › subscription_id › avps › host_ip_address
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)1
addressipv4192.0.2.1
avps › subscription_id › avps › host_ip_address_ipv6
FieldTypeDefaultAutoDescription
vuint(1)Number of items of vendor_id
muint(1)1
puint(1)0
reserveduint(5)0
vendor_idlist<uint(32)> — v items
address_familyuint(16)2
addressipv62001:db8::1

Constraints

LevelRule
warningversion = 1
errorheader at least 20 octets

Sample templates

SIP (sip)

Reached from

Lower layerSelectorValue
tcpdst_port / src_port5060 (0x13c4)
udpdst_port / src_port5060 (0x13c4)

Fields

FieldTypeDefaultAutoDescription
start_linebytes — up to the terminator 0d 0a (appended when building)"OPTIONS sip:bob@example.com SIP/2.0"Start line: a request line (method, Request-URI, SIP/2.0) or a status line (SIP/2.0, code, reason). The CRLF is added automatically.
headerslist<bytes> — up to the terminator 0d 0a (appended when building)9 itemsHeader lines (Name: value), one per element; the CRLFs and the empty line after them are added automatically. Content-Length is Manual.
bodybytes — rest of the PDU""Message body (an SDP offer / answer, …).

Sample templates

  • sip-invite — templates/protocols/voip/sip-invite.wpg.yaml
  • sip-register — templates/protocols/voip/sip-register.wpg.yaml

RTP (rtp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port5004 (0x138c)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTP version (2).
paddinguint(1)0P bit: padding octets at the end of the payload (the last one is their count, Manual).
xuint(1)Number of items of header_extensionX bit: a header extension follows the CSRC list (Auto).
ccuint(4)Number of items of csrcCSRC count (Auto).
markeruint(1)0Marker bit (profile-defined, e.g. the start of a talkspurt).
payload_typeenum(7)0 (pcmu)Payload type (0 PCMU, 8 PCMA, 9 G.722, 18 G.729, 96-127 dynamic).
sequence_numberuint(16)1Sequence number, incremented by one per RTP packet.
timestampuint(32)0Timestamp: sampling instant of the first payload octet.
ssrcuint(32)305419896Synchronization source identifier.
csrclist<uint(32)> — cc items[]Contributing source identifiers (up to 15).
header_extensionlist<struct> — x items[]Header extension: profile-defined 16 bits (0xBEDE: RFC 8285 one-byte elements), the length in 32-bit words (Auto) and the extension words.

payload_type

ValueName
0pcmu
3gsm
4g723
8pcma
9g722
13cn
18g729
96dynamic_96
101telephone_event

header_extension

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
profileuint(16)48862
lengthuint(16)Number of items of data
datalist<uint(32)> — length * 4 octets

Constraints

LevelRule
warningversion = 2

Sample templates

  • rtp-pcmu — templates/protocols/voip/rtp-pcmu.wpg.yaml

RTCP (rtcp)

Reached from

Lower layerSelectorValue
udpdst_port / src_port5005 (0x138d)
rtcppacket_type0 (0x00) – 255 (0xff) (at least 4 octets remaining)
rtcp_srversion2 (at least 4 octets remaining)
rtcp_rrversion2 (at least 4 octets remaining)
rtcp_sdesversion2 (at least 4 octets remaining)
rtcp_byeversion2 (at least 4 octets remaining)
rtcp_appversion2 (at least 4 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTCP version (2).
paddinguint(1)0P bit: padding octets at the end of the packet (Manual).
countuint(5)0Count / format field (5 bits) of a packet type that is not typed.
packet_typeenum(8)205 (rtpfb)Packet type (200 SR, 201 RR, 202 SDES, 203 BYE, 204 APP, 205 RTPFB, 206 PSFB, 207 XR).
lengthuint(16)Length of the header in 32-bit words (-1)Packet length in 32-bit words minus one (Auto).
bodybytes — up to offset length * 4 + 4 of the group12 34 56 78 00 00 00 00Packet body after the common header, as octets.

packet_type

ValueName
200 (0xc8)sr
201 (0xc9)rr
202 (0xca)sdes
203 (0xcb)bye
204 (0xcc)app
205 (0xcd)rtpfb
206 (0xce)psfb
207 (0xcf)xr

Next layer

The next layer is selected by packet_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
200 (0xc8)rtcp_srre-decodes this layer
201 (0xc9)rtcp_rrre-decodes this layer
202 (0xca)rtcp_sdesre-decodes this layer
203 (0xcb)rtcp_byere-decodes this layer
204 (0xcc)rtcp_appre-decodes this layer
0 (0x00) – 255 (0xff)rtcpat least 4 octets remaining
0 (0x00) – 255 (0xff)rtcp_srat least 4 octets remaining
0 (0x00) – 255 (0xff)rtcp_rrat least 4 octets remaining
0 (0x00) – 255 (0xff)rtcp_sdesat least 4 octets remaining
0 (0x00) – 255 (0xff)rtcp_byeat least 4 octets remaining
0 (0x00) – 255 (0xff)rtcp_appat least 4 octets remaining

Constraints

LevelRule
warningversion = 2

Sample templates

RTCP SR (rtcp_sr)

Reached from

Lower layerSelectorValue
rtcppacket_type200 (0xc8) (re-decodes this layer)
rtcppacket_type0 (0x00) – 255 (0xff) (at least 4 octets remaining)
rtcp_srversion2 (at least 4 octets remaining)
rtcp_rrversion2 (at least 4 octets remaining)
rtcp_sdesversion2 (at least 4 octets remaining)
rtcp_byeversion2 (at least 4 octets remaining)
rtcp_appversion2 (at least 4 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTCP version (2).
paddinguint(1)0P bit: padding octets at the end of the packet (Manual).
report_countuint(5)Number of items of report_blocksReception report count (Auto).
packet_typeenum(8)200 (sr)Packet type (200 SR, 201 RR, 202 SDES, 203 BYE, 204 APP, 205 RTPFB, 206 PSFB, 207 XR).
lengthuint(16)Length of the header in 32-bit words (-1)Packet length in 32-bit words minus one (Auto).
ssrcuint(32)305419896SSRC of the sender of this packet.
ntp_timestamp_mswuint(32)3942645760NTP timestamp (most significant word; the next field is the fraction).
ntp_timestamp_lswuint(32)0
rtp_timestampuint(32)0RTP timestamp corresponding to the NTP timestamp.
packet_countuint(32)0Sender’s packet count.
octet_countuint(32)0Sender’s payload octet count.
report_blockslist<struct> — report_count items[]Reception report blocks: SSRC, fraction lost, cumulative lost, extended highest sequence number, jitter, LSR, DLSR.
extensionbytes — up to offset length * 4 + 4 of the group""Profile-specific extension octets up to the packet length.

packet_type

ValueName
200 (0xc8)sr
201 (0xc9)rr
202 (0xca)sdes
203 (0xcb)bye
204 (0xcc)app
205 (0xcd)rtpfb
206 (0xce)psfb
207 (0xcf)xr

report_blocks

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ssrcuint(32)2271560481
fraction_lostuint(8)0
cumulative_lostuint(24)0
highest_sequenceuint(32)0
jitteruint(32)0
lsruint(32)0
dlsruint(32)0

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2rtcpat least 4 octets remaining
2rtcp_srat least 4 octets remaining
2rtcp_rrat least 4 octets remaining
2rtcp_sdesat least 4 octets remaining
2rtcp_byeat least 4 octets remaining
2rtcp_appat least 4 octets remaining

Constraints

LevelRule
warningversion = 2

Sample templates

  • rtcp-sr-sdes — templates/protocols/voip/rtcp-sr-sdes.wpg.yaml

RTCP RR (rtcp_rr)

Reached from

Lower layerSelectorValue
rtcppacket_type201 (0xc9) (re-decodes this layer)
rtcppacket_type0 (0x00) – 255 (0xff) (at least 4 octets remaining)
rtcp_srversion2 (at least 4 octets remaining)
rtcp_rrversion2 (at least 4 octets remaining)
rtcp_sdesversion2 (at least 4 octets remaining)
rtcp_byeversion2 (at least 4 octets remaining)
rtcp_appversion2 (at least 4 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTCP version (2).
paddinguint(1)0P bit: padding octets at the end of the packet (Manual).
report_countuint(5)Number of items of report_blocksReception report count (Auto).
packet_typeenum(8)201 (rr)Packet type (200 SR, 201 RR, 202 SDES, 203 BYE, 204 APP, 205 RTPFB, 206 PSFB, 207 XR).
lengthuint(16)Length of the header in 32-bit words (-1)Packet length in 32-bit words minus one (Auto).
ssrcuint(32)305419896SSRC of the sender of this packet.
report_blockslist<struct> — report_count items[]Reception report blocks: SSRC, fraction lost, cumulative lost, extended highest sequence number, jitter, LSR, DLSR.
extensionbytes — up to offset length * 4 + 4 of the group""Profile-specific extension octets up to the packet length.

packet_type

ValueName
200 (0xc8)sr
201 (0xc9)rr
202 (0xca)sdes
203 (0xcb)bye
204 (0xcc)app
205 (0xcd)rtpfb
206 (0xce)psfb
207 (0xcf)xr

report_blocks

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ssrcuint(32)2271560481
fraction_lostuint(8)0
cumulative_lostuint(24)0
highest_sequenceuint(32)0
jitteruint(32)0
lsruint(32)0
dlsruint(32)0

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2rtcpat least 4 octets remaining
2rtcp_srat least 4 octets remaining
2rtcp_rrat least 4 octets remaining
2rtcp_sdesat least 4 octets remaining
2rtcp_byeat least 4 octets remaining
2rtcp_appat least 4 octets remaining

Constraints

LevelRule
warningversion = 2

Sample templates

RTCP SDES (rtcp_sdes)

Reached from

Lower layerSelectorValue
rtcppacket_type202 (0xca) (re-decodes this layer)
rtcppacket_type0 (0x00) – 255 (0xff) (at least 4 octets remaining)
rtcp_srversion2 (at least 4 octets remaining)
rtcp_rrversion2 (at least 4 octets remaining)
rtcp_sdesversion2 (at least 4 octets remaining)
rtcp_byeversion2 (at least 4 octets remaining)
rtcp_appversion2 (at least 4 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTCP version (2).
paddinguint(1)0P bit: padding octets at the end of the packet (Manual).
source_countuint(5)Number of items of chunksSource count: SDES chunks or BYE identifiers (Auto).
packet_typeenum(8)202 (sdes)Packet type (200 SR, 201 RR, 202 SDES, 203 BYE, 204 APP, 205 RTPFB, 206 PSFB, 207 XR).
lengthuint(16)Length of the header in 32-bit words (-1)Packet length in 32-bit words minus one (Auto).
chunkslist<struct> — source_count items1 itemsSDES chunks: SSRC / CSRC and its items (type, length (Auto), text), ended by a null octet and padded to 32 bits.

packet_type

ValueName
200 (0xc8)sr
201 (0xc9)rr
202 (0xca)sdes
203 (0xcb)bye
204 (0xcc)app
205 (0xcd)rtpfb
206 (0xce)psfb
207 (0xcf)xr

chunks

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
ssrcuint(32)305419896
itemslist<struct> — up to the terminator 00 (appended when building)
paddingpadding(4)

chunks › items

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
typeenum(8)1 (cname)
lengthuint(8)Size of text in octets
textbytes — length octets
chunks › items › type
ValueName
1 (0x01)cname
2 (0x02)name
3 (0x03)email
4 (0x04)phone
5 (0x05)loc
6 (0x06)tool
7 (0x07)note
8 (0x08)priv

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2rtcpat least 4 octets remaining
2rtcp_srat least 4 octets remaining
2rtcp_rrat least 4 octets remaining
2rtcp_sdesat least 4 octets remaining
2rtcp_byeat least 4 octets remaining
2rtcp_appat least 4 octets remaining

Constraints

LevelRule
warningversion = 2

Sample templates

  • rtcp-rr-bye — templates/protocols/voip/rtcp-rr-bye.wpg.yaml
  • rtcp-sr-sdes — templates/protocols/voip/rtcp-sr-sdes.wpg.yaml

RTCP BYE (rtcp_bye)

Reached from

Lower layerSelectorValue
rtcppacket_type203 (0xcb) (re-decodes this layer)
rtcppacket_type0 (0x00) – 255 (0xff) (at least 4 octets remaining)
rtcp_srversion2 (at least 4 octets remaining)
rtcp_rrversion2 (at least 4 octets remaining)
rtcp_sdesversion2 (at least 4 octets remaining)
rtcp_byeversion2 (at least 4 octets remaining)
rtcp_appversion2 (at least 4 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTCP version (2).
paddinguint(1)0P bit: padding octets at the end of the packet (Manual).
source_countuint(5)Number of items of ssrcsSource count: SDES chunks or BYE identifiers (Auto).
packet_typeenum(8)203 (bye)Packet type (200 SR, 201 RR, 202 SDES, 203 BYE, 204 APP, 205 RTPFB, 206 PSFB, 207 XR).
lengthuint(16)Length of the header in 32-bit words (-1)Packet length in 32-bit words minus one (Auto).
ssrcslist<uint(32)> — source_count items1 itemsSSRC / CSRC identifiers leaving the session.
reasonlist<struct> — up to offset length * 4 + 4 of the group[]Optional reason for leaving: length (Auto), text, padding to 32 bits.

packet_type

ValueName
200 (0xc8)sr
201 (0xc9)rr
202 (0xca)sdes
203 (0xcb)bye
204 (0xcc)app
205 (0xcd)rtpfb
206 (0xce)psfb
207 (0xcf)xr

reason

Each item is a group of the fields below.

FieldTypeDefaultAutoDescription
lengthuint(8)Size of text in octets
textbytes — length octets
paddingpadding(4)

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2rtcpat least 4 octets remaining
2rtcp_srat least 4 octets remaining
2rtcp_rrat least 4 octets remaining
2rtcp_sdesat least 4 octets remaining
2rtcp_byeat least 4 octets remaining
2rtcp_appat least 4 octets remaining

Constraints

LevelRule
warningversion = 2

Sample templates

  • rtcp-rr-bye — templates/protocols/voip/rtcp-rr-bye.wpg.yaml

RTCP APP (rtcp_app)

Reached from

Lower layerSelectorValue
rtcppacket_type204 (0xcc) (re-decodes this layer)
rtcppacket_type0 (0x00) – 255 (0xff) (at least 4 octets remaining)
rtcp_srversion2 (at least 4 octets remaining)
rtcp_rrversion2 (at least 4 octets remaining)
rtcp_sdesversion2 (at least 4 octets remaining)
rtcp_byeversion2 (at least 4 octets remaining)
rtcp_appversion2 (at least 4 octets remaining)

Fields

FieldTypeDefaultAutoDescription
versionuint(2)2RTCP version (2).
paddinguint(1)0P bit: padding octets at the end of the packet (Manual).
subtypeuint(5)0Application-defined subtype.
packet_typeenum(8)204 (app)Packet type (200 SR, 201 RR, 202 SDES, 203 BYE, 204 APP, 205 RTPFB, 206 PSFB, 207 XR).
lengthuint(16)Length of the header in 32-bit words (-1)Packet length in 32-bit words minus one (Auto).
ssrcuint(32)305419896SSRC of the sender of this packet.
namebytes(4)57 50 47 30Name (4 ASCII characters).
databytes — up to offset length * 4 + 4 of the group""Application-dependent data (a multiple of 4 octets).

packet_type

ValueName
200 (0xc8)sr
201 (0xc9)rr
202 (0xca)sdes
203 (0xcb)bye
204 (0xcc)app
205 (0xcd)rtpfb
206 (0xce)psfb
207 (0xcf)xr

Next layer

The next layer is selected by version; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
2rtcpat least 4 octets remaining
2rtcp_srat least 4 octets remaining
2rtcp_rrat least 4 octets remaining
2rtcp_sdesat least 4 octets remaining
2rtcp_byeat least 4 octets remaining
2rtcp_appat least 4 octets remaining

Constraints

LevelRule
warningversion = 2

Sample templates

PTP (ptp)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port319 (0x013f)
udpdst_port / src_port320 (0x0140)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)0 (sync)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)0 (sync)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)0Log2 of the message interval in seconds (signed; 0x7f when not applicable).
databytes — message_length - 34 octets00 00 00 00 00 00 00 00 00 00Rest of the message after the common header, as octets (up to the message length).

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

Next layer

The next layer is selected by message_type; when the field is Auto the builder writes the value of the protocol stacked above.

ValueProtocolNote
0ptp_syncre-decodes this layer
1ptp_delay_reqre-decodes this layer
2ptp_pdelay_reqre-decodes this layer
3ptp_pdelay_respre-decodes this layer
8ptp_follow_upre-decodes this layer
9ptp_delay_respre-decodes this layer
10ptp_pdelay_resp_follow_upre-decodes this layer
11ptp_announcere-decodes this layer
12ptp_signalingre-decodes this layer
13ptp_managementre-decodes this layer

Sample templates

  • ptp-generic — templates/protocols/timing/ptp-generic.wpg.yaml

PTP Sync (ptp_sync)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port319 (0x013f)
ptpmessage_type0 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)0 (sync)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)0 (sync)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)0Log2 of the message interval in seconds (signed; 0x7f when not applicable).
origin_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
origin_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
tlvstlv — message_length - 44 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Delay_Req (ptp_delay_req)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port319 (0x013f)
ptpmessage_type1 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)1 (delay_req)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)1 (delay_req)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)127Log2 of the message interval in seconds (signed; 0x7f when not applicable).
origin_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
origin_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
tlvstlv — message_length - 44 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Pdelay_Req (ptp_pdelay_req)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port319 (0x013f)
ptpmessage_type2 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)2 (pdelay_req)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)5 (other)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)127Log2 of the message interval in seconds (signed; 0x7f when not applicable).
origin_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
origin_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
reservedbytes(10)00 00 00 00 00 00 00 00 00 00
tlvstlv — message_length - 54 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Pdelay_Resp (ptp_pdelay_resp)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port319 (0x013f)
ptpmessage_type3 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)3 (pdelay_resp)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)5 (other)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)127Log2 of the message interval in seconds (signed; 0x7f when not applicable).
request_receipt_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
request_receipt_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
requesting_port_clock_identityuint(64)144116287553929218Port identity: clock identity (all ones = every clock).
requesting_port_port_numberuint(16)1Port identity: port number (0xffff = every port).
tlvstlv — message_length - 54 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Follow_Up (ptp_follow_up)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port320 (0x0140)
ptpmessage_type8 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)8 (follow_up)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)2 (follow_up)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)0Log2 of the message interval in seconds (signed; 0x7f when not applicable).
precise_origin_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
precise_origin_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
tlvstlv — message_length - 44 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Delay_Resp (ptp_delay_resp)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port320 (0x0140)
ptpmessage_type9 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)9 (delay_resp)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)3 (delay_resp)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)0Log2 of the message interval in seconds (signed; 0x7f when not applicable).
receive_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
receive_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
requesting_port_clock_identityuint(64)144116287553929218Port identity: clock identity (all ones = every clock).
requesting_port_port_numberuint(16)1Port identity: port number (0xffff = every port).
tlvstlv — message_length - 54 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Pdelay_Resp_Follow_Up (ptp_pdelay_resp_follow_up)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port320 (0x0140)
ptpmessage_type10 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)10 (pdelay_resp_follow_up)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)5 (other)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)127Log2 of the message interval in seconds (signed; 0x7f when not applicable).
response_origin_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
response_origin_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
requesting_port_clock_identityuint(64)144116287553929218Port identity: clock identity (all ones = every clock).
requesting_port_port_numberuint(16)1Port identity: port number (0xffff = every port).
tlvstlv — message_length - 54 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Announce (ptp_announce)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port320 (0x0140)
ptpmessage_type11 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)11 (announce)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)5 (other)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)1Log2 of the message interval in seconds (signed; 0x7f when not applicable).
origin_timestamp_secondsuint(48)0Timestamp: seconds (48 bits).
origin_timestamp_nanosecondsuint(32)0Timestamp: nanoseconds (32 bits).
current_utc_offsetint(16)37Current UTC offset in seconds (TAI - UTC).
reserveduint(8)0
grandmaster_priority1uint(8)128Grandmaster priority (best master clock algorithm, lower wins).
grandmaster_clock_classuint(8)248Grandmaster clock class (6 = locked to a primary reference, 248 = default, 255 = slave only).
grandmaster_clock_accuracyenum(8)254 (unknown)Grandmaster clock accuracy (0x20 = within 25 ns … 0xfe = unknown).
grandmaster_offset_scaled_log_varianceuint(16)65535Grandmaster offsetScaledLogVariance.
grandmaster_priority2uint(8)128Grandmaster priority (best master clock algorithm, lower wins).
grandmaster_identityuint(64)144116287553929217Grandmaster clock identity.
steps_removeduint(16)0Number of boundary clocks between the grandmaster and the sender.
time_sourceenum(8)160 (internal_oscillator)Time source of the grandmaster: atomic clock, GPS, terrestrial radio, PTP, NTP, hand set, other, internal oscillator.
tlvstlv — message_length - 64 octets[]TLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

grandmaster_clock_accuracy

ValueName
32 (0x20)within_25ns
33 (0x21)within_100ns
34 (0x22)within_250ns
35 (0x23)within_1us
36 (0x24)within_2_5us
37 (0x25)within_10us
38 (0x26)within_25us
39 (0x27)within_100us
40 (0x28)within_250us
41 (0x29)within_1ms
42 (0x2a)within_2_5ms
43 (0x2b)within_10ms
44 (0x2c)within_25ms
45 (0x2d)within_100ms
46 (0x2e)within_250ms
47 (0x2f)within_1s
48 (0x30)within_10s
49 (0x31)over_10s
254 (0xfe)unknown

time_source

ValueName
16 (0x10)atomic_clock
32 (0x20)gps
48 (0x30)terrestrial_radio
64 (0x40)ptp
80 (0x50)ntp
96 (0x60)hand_set
144 (0x90)other
160 (0xa0)internal_oscillator

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Signaling (ptp_signaling)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port320 (0x0140)
ptpmessage_type12 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)12 (signaling)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)5 (other)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)127Log2 of the message interval in seconds (signed; 0x7f when not applicable).
target_port_clock_identityuint(64)18446744073709551615Port identity: clock identity (all ones = every clock).
target_port_port_numberuint(16)65535Port identity: port number (0xffff = every port).
tlvstlv — message_length - 44 octets1 itemsTLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

PTP Management (ptp_management)

Reached from

Lower layerSelectorValue
ethernet2ethertype35063 (0x88f7)
dot1qethertype35063 (0x88f7)
dot1adethertype35063 (0x88f7)
udpdst_port / src_port320 (0x0140)
ptpmessage_type13 (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
major_sdo_iduint(4)0majorSdoId (transportSpecific in IEEE 1588-2008): 0 for the default profiles, 1 for IEEE 802.1AS (gPTP).
message_typeenum(4)13 (management)Message type: 0 Sync, 1 Delay_Req, 2 Pdelay_Req, 3 Pdelay_Resp, 8 Follow_Up, 9 Delay_Resp, 10 Pdelay_Resp_Follow_Up, 11 Announce, 12 Signaling, 13 Management.
minor_versionuint(4)0minorVersionPTP (0 in IEEE 1588-2008, 1 in IEEE 1588-2019).
versionuint(4)2versionPTP (2).
message_lengthuint(16)Length of the header and payload in octetsLength of the whole message in octets, including the TLVs (Auto).
domain_numberuint(8)0Domain number.
minor_sdo_iduint(8)0minorSdoId (reserved, 0, in IEEE 1588-2008).
flagsflags(16)0x0Flag field: alternateMaster, twoStep, unicast, the profile specific and security bits in the first octet; leap61, leap59, currentUtcOffsetValid, ptpTimescale, timeTraceable, frequencyTraceable and synchronizationUncertain in the second.
correction_fieldint(64)0Correction in nanoseconds multiplied by 2^16 (signed).
message_type_specificuint(32)0Message type specific field (reserved, 0, in IEEE 1588-2008).
clock_identityuint(64)144116287553929217Clock identity of the source port (EUI-64, e.g. a MAC address with ff:fe in the middle).
port_numberuint(16)1Port number of the source port.
sequence_iduint(16)0Sequence ID; a Follow_Up / Delay_Resp / Pdelay_Resp copies the one of the message it answers.
control_fieldenum(8)4 (management)Control field (IEEE 1588 version 1 compatibility): 0 Sync, 1 Delay_Req, 2 Follow_Up, 3 Delay_Resp, 4 Management, 5 other messages.
log_message_intervalint(8)127Log2 of the message interval in seconds (signed; 0x7f when not applicable).
target_port_clock_identityuint(64)18446744073709551615Port identity: clock identity (all ones = every clock).
target_port_port_numberuint(16)65535Port identity: port number (0xffff = every port).
starting_boundary_hopsuint(8)1Starting boundary hops of a Management message.
boundary_hopsuint(8)1Remaining boundary hops.
reserveduint(4)0
actionenum(4)0 (get)Management action: GET, SET, RESPONSE, COMMAND, ACKNOWLEDGE.
reserved2uint(8)0
tlvstlv — message_length - 48 octets1 itemsTLVs (16-bit type, 16-bit length of the value, Auto): Management, Management Error Status, Organization Extension, unicast negotiation (Request / Grant / Cancel / Acknowledge Cancel), Path Trace, Alternate Time Offset Indicator. They end at the message length.

message_type

ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

flags

BitMaskName
1532768 (0x8000)security
1416384 (0x4000)profile_specific_2
138192 (0x2000)profile_specific_1
101024 (0x0400)unicast
9512 (0x0200)two_step
8256 (0x0100)alternate_master
664 (0x0040)synchronization_uncertain
532 (0x0020)frequency_traceable
416 (0x0010)time_traceable
38 (0x0008)ptp_timescale
24 (0x0004)current_utc_offset_valid
12 (0x0002)leap59
01 (0x0001)leap61

control_field

ValueName
0 (0x00)sync
1 (0x01)delay_req
2 (0x02)follow_up
3 (0x03)delay_resp
4 (0x04)management
5 (0x05)other

action

ValueName
0get
1set
2response
3command
4acknowledge

tlvs

  • Type 16 bits, length 16 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
1 (0x0001)managementmanagement_id, data_field
2 (0x0002)management_error_statusmanagement_error_id, management_id, reserved, display_data
3 (0x0003)organization_extensionorganization_id, organization_sub_type, data_field
4 (0x0004)request_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field
5 (0x0005)grant_unicast_transmissionmessage_type, reserved, log_inter_message_period, duration_field, reserved2, reserved3, renewal_invited
6 (0x0006)cancel_unicast_transmissionmessage_type, reserved, reserved2
7 (0x0007)acknowledge_cancel_unicast_transmissionmessage_type, reserved, reserved2
8 (0x0008)path_tracepath_sequence
9 (0x0009)alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name_length, display_name, pad

tlvs › management

FieldTypeDefaultAutoDescription
management_idenum(16)8192 (default_data_set)
data_fieldbytes — rest of the PDU
tlvs › management › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › management_error_status

FieldTypeDefaultAutoDescription
management_error_idenum(16)
management_idenum(16)
reserveduint(32)0
display_databytes — rest of the PDU
tlvs › management_error_status › management_error_id
ValueName
1 (0x0001)response_too_big
2 (0x0002)no_such_id
3 (0x0003)wrong_length
4 (0x0004)wrong_value
5 (0x0005)not_setable
6 (0x0006)not_supported
65534 (0xfffe)general_error
tlvs › management_error_status › management_id
ValueName
0 (0x0000)null_management
1 (0x0001)clock_description
2 (0x0002)user_description
8192 (0x2000)default_data_set
8193 (0x2001)current_data_set
8194 (0x2002)parent_data_set
8195 (0x2003)time_properties_data_set
8196 (0x2004)port_data_set
8197 (0x2005)priority1
8198 (0x2006)priority2
8199 (0x2007)domain
8200 (0x2008)slave_only
8201 (0x2009)log_announce_interval
8205 (0x200d)log_sync_interval
8213 (0x2015)utc_properties

tlvs › organization_extension

FieldTypeDefaultAutoDescription
organization_iduint(24)
organization_sub_typeuint(24)
data_fieldbytes — rest of the PDU

tlvs › request_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
tlvs › request_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › grant_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
log_inter_message_periodint(8)1
duration_fielduint(32)300
reserved2uint(8)0
reserved3uint(7)0
renewal_inviteduint(1)0
tlvs › grant_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › acknowledge_cancel_unicast_transmission

FieldTypeDefaultAutoDescription
message_typeenum(4)11 (announce)
reserveduint(4)0
reserved2uint(8)0
tlvs › acknowledge_cancel_unicast_transmission › message_type
ValueName
0sync
1delay_req
2pdelay_req
3pdelay_resp
8follow_up
9delay_resp
10pdelay_resp_follow_up
11announce
12signaling
13management

tlvs › path_trace

FieldTypeDefaultAutoDescription
path_sequencelist<uint(64)> — rest of the PDU

tlvs › alternate_time_offset_indicator

FieldTypeDefaultAutoDescription
key_fielduint(8)0
current_offsetint(32)0
jump_secondsint(32)0
time_of_next_jumpuint(48)0
display_name_lengthuint(8)Size of display_name in octets
display_namebytes — display_name_length octets
padbytes — rest of the PDU

Constraints

LevelRule
warningversion = 2

Sample templates

Payload (payload)

Reached from

No protocol of the catalog leads here: use it as the first layer or stack it explicitly.

Parameters

FieldTypeDefaultAutoDescription
modeenum(8)0 (fixed)How the payload is generated: fixed (data as given), pattern (data repeated to length), random (length octets from seed) or counter (data with a per-packet counter embedded).
databytes — rest of the PDU""Payload octets; in fixed mode cut or zero-extended to length when length is non-zero, in pattern mode the repeated unit (empty = 00 01 02 …).
lengthuint(32)0Payload length in octets; 0 keeps the length of data (fixed / counter mode).
seeduint(64)0Seed of the pseudo-random generator in random mode.
counter_offsetuint(32)0Octet offset of the embedded counter in counter mode.
counter_widthenum(8)4 (u32)Width of the embedded counter: 4 or 8 octets, big endian.
counter_valueuint(64)0Counter value written per packet by the stream expander (counter mode).

mode

ValueName
0 (0x00)fixed
1 (0x01)pattern
2 (0x02)random
3 (0x03)counter

counter_width

ValueName
4 (0x04)u32
8 (0x08)u64

Sample templates

Raw payload (raw)

Reached from

No protocol of the catalog leads here: use it as the first layer or stack it explicitly.

Fields

FieldTypeDefaultAutoDescription
databytes — rest of the PDU""Raw octets up to the end of the frame.

Sample templates

  • clnp-er — templates/protocols/l3/clnp-er.wpg.yaml
  • clnp-erq — templates/protocols/l3/clnp-erq.wpg.yaml
  • raw-payload — templates/protocols/payload/raw.wpg.yaml

P1 protocol notes

Status: draft

The protocol reference is the field listing generated from the protocol definition IR, one page per protocol. This chapter is the hand-written supplement to it for the P1 and P2 protocols (M6, M7); each page ends with links to the generated pages of the protocols it covers. For each group it covers:

  • how a protocol is reached from the layer below (demultiplexing on decode)
  • which fields are Auto and which you must set by hand (Manual)
  • the approximations and limits that remain because of what the engine can express
  • the bundled sample templates (templates/protocols/)

Per-field descriptions (ja/en) come with the GUI field editor and GET /api/protocols. The primary source for the limits is the module docs in crates/wpg-protocols/src/; where this chapter disagrees, the code wins.

PageProtocols
L2 control protocolsLLDP / CDP / STP / LACP and Marker / EAPOL / PPPoE / PPP (LCP, IPCP)
Encapsulation and tunnelsVXLAN / GRE / NVGRE / MPLS / MPLS-in-UDP / L2TPv2 and v3 / GTP-U / Geneve / IP-in-IP
Routing protocolsOSPFv2 and v3 / BGP-4 / RIPv1 and v2 / RIPng / EIGRP
Redundancy (FHRP)VRRPv2 and v3 / HSRPv1 and v2 / GLBP
Multicast controlIGMPv1, v2, v3 / MLDv1 and v2 / PIM-SM v2
Application protocolsDHCPv4 and v6 / DNS / NTP / SNMP / Syslog / RADIUS / TFTP
OSI encapsulation (P2)OSI PDUs over 802.2 LLC 0xfe / PPP 0x0023, the NSAP type
CLNP / ES-IS (P2)CLNP DT / ER / echo with options and segmentation, ES-IS ESH / ISH / Redirect
IS-IS (P2)LAN / P2P Hellos, LSPs, CSNP / PSNP, main TLVs and sub-TLVs
SCTP (P2)Common header with CRC32c, bundled chunks (DATA, INIT, SACK, HEARTBEAT, ABORT, ASCONF, RE-CONFIG, …), parameters and error causes
OSPF Opaque / SR, BGP MP / EVPN (P2)OSPFv2 TE / Router Information / Extended Prefix / Extended Link LSAs with SR SIDs, BGP NLRI for IPv6, VPN-IPv4 / VPN-IPv6 and EVPN
LDP / RSVP-TE / BFD (P2)LDP PDUs, messages and TLVs (FEC, labels, Hello / session parameters), RSVP-TE Path / Resv and other messages with their objects (ERO / RRO, SESSION_ATTRIBUTE, IntServ), BFD control packets with authentication (Micro-BFD included)
SRv6 SRH / SR-MPLS (P2)SRv6 Segment Routing Header (segment list, Pad / HMAC TLVs, upper-layer checksums toward the final destination, IPv4 / IPv6 / Ethernet encapsulation), SR-MPLS label stacks (reserved label names, SRGB + index, entropy labels)
PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)PTP messages over Ethernet / UDP with their TLVs, SyncE ESMC, Ethernet CFM / Y.1731 (CCM, LB, LT, AIS / LCK, LM / DM / SLM, …) with ERPS R-APS, 802.3ah OAMPDUs
MACsec / GTPv2-C / Diameter / SIP / RTP (P2)MACsec SecTAG (secure data / ICV opaque), GTPv2-C messages and IEs (grouped Bearer Context), Diameter messages and AVPs (vendor-specific, grouped), SIP start line / header lines / body, RTP header and compound RTCP (SR / RR / SDES / BYE / APP)

Common patterns

  • Header + body split: protocols whose common header type selects the body layout (OSPF, BGP, IGMP, PIM, ICMPv6 for MLD) are stacked as two layers, the header and the body (for example ospfv2 → ospfv2_hello). The header type is Auto from the next layer, so usually you only pick the body layer.
  • Re-parse: where one number or port carries several layouts (VRRPv2/v3, HSRPv1/v2, DHCPv6 relay, SNMP Trap, the TFTP opcodes), decoding starts with a representative definition and re-decodes as another one based on a version or type value. When building, pick the definition you want directly.
  • First-nibble demux: the payload under the bottom MPLS label, GTP-U and the packet inside PIM Register are told apart by their first 4 bits (4 → IPv4, 6 → IPv6).
  • Source-port fallback: UDP and TCP demultiplex on the destination port and fall back to the source port, so the reply direction (DNS responses, the passive side of BGP, …) decodes too.
  • Opaque regions: parts that cannot be typed are kept as octets. Give them as hex when building; decoding shows them as octets too.

Trying the samples

$ wpg template lint templates/protocols/routing/*.wpg.yaml
$ wpg render templates/protocols/routing/ospfv2-hello.wpg.yaml -o /tmp/ospf.pcapng
$ tshark -r /tmp/ospf.pcapng -V

Every sample is linted and rendered by crates/wpg-template/tests/samples.rs. The P1 golden byte tests live in crates/wpg-protocols/tests/p1_*.rs; run them with WPG_TSHARK=1 and they also check that tshark dissects the frames (the protocol is recognised and nothing is flagged malformed).

L2 control protocols

Status: draft

Notes on LLDP / CDP / STP / LACP and Marker / EAPOL / PPPoE / PPP. Definitions are in crates/wpg-protocols/src/l2control.rs, samples in templates/protocols/l2/.

How they are reached, and samples

idProtocolLayer belowSample
lldpLLDP (IEEE 802.1AB)ethernet2 EtherType 0x88cclldp.wpg.yaml
cdpCDPdot3 → llc → snap (OUI 0x00000c, PID 0x2000)cdp.wpg.yaml
stpSTP / RSTP / MSTP BPDUdot3 → llc (DSAP/SSAP 0x42)stp.wpg.yaml
lacpLACPDU (Slow Protocols subtype 1)ethernet2 EtherType 0x8809lacp.wpg.yaml
markerMarker / Marker Response (subtype 2)ethernet2 EtherType 0x8809marker.wpg.yaml
eapolEAPOL (IEEE 802.1X)ethernet2 EtherType 0x888eeapol.wpg.yaml
pppoe_discoveryPPPoE Discovery (PADI to PADT)ethernet2 EtherType 0x8863pppoe-discovery.wpg.yaml
pppoe_sessionPPPoE Sessionethernet2 EtherType 0x8864pppoe-ppp-lcp.wpg.yaml
ppp / ppp_lcp / ppp_ipcpPPP (LCP / IPCP)pppoe_sessionpppoe-ppp-lcp.wpg.yaml, pppoe-ppp-ipcp.wpg.yaml

Auto fields

  • cdp.checksum: the RFC 1071 Internet checksum.
  • eapol.length, pppoe_discovery.length, ppp_lcp.length / ppp_ipcp.length: the length of what follows.
  • ppp.protocol: from the next layer (LCP / IPCP / IPv4 / IPv6 …).
  • The length octets of CDP / PPPoE / LCP / IPCP TLVs and options.

Limits and approximations

  • LLDP TLV lengths are not Auto. An LLDP TLV header is a 7-bit type plus a 9-bit length, and the engine’s TLV type only handles whole-octet widths. tlvs is therefore a list of { type: uint(7), length: uint(9), value } structs and length is Manual. When you change a value, change its length too. The trailing End TLV (type 0) is an explicit item as well.
  • CDP checksum: the standard Internet checksum is computed. Cisco’s implementation sign-extends the trailing octet of an odd-length PDU, so for odd-length PDUs the value differs from real devices. Keep the TLVs at an even total length, or set the checksum by hand.
  • STP types the IEEE 802.1D Configuration BPDU (35 octets) exactly. The RSTP / MSTP extension (Version 1 Length, Version 3 Length, MSTI configuration records) is an opaque trailer. For an RST BPDU set protocol_version and bpdu_type and put the Version 1 Length (00) in trailer; for an MST BPDU give the rest of the MST part as hex as well.
  • Bridge and root identifiers are split into the 2-octet priority (including the system-id extension) and the 6-octet MAC. Timers are in 1/256-second units (max_age 20 s = 0x1400).
  • The EAPOL body (the EAP packet for type 0) is an opaque body.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ethernet2 · dot3 · llc · snap · lldp · cdp · stp · lacp · marker · eapol · pppoe_discovery · pppoe_session · ppp · ppp_lcp · ppp_ipcp

Encapsulation and tunnels

Status: draft

Notes on VXLAN / GRE / NVGRE / MPLS / MPLS-in-UDP / L2TPv2 and v3 / GTP-U / Geneve / IP-in-IP. Definitions are in crates/wpg-protocols/src/encap.rs, samples in templates/protocols/encap/.

How they are reached, and samples

idProtocolLayer belowLayer aboveSample
vxlanVXLANUDP 4789ethernet2vxlan.wpg.yaml
geneveGeneveUDP 6081chosen by protocol_typegeneve.wpg.yaml
greGRE (4-octet base)IPv4 protocol / IPv6 next header 47protocol_type (IPv4 / IPv6 / 0x6558 Ethernet / MPLS)gre-ipv4.wpg.yaml
nvgreNVGREbuild only (IP protocol 47 decodes as gre)ethernet2nvgre.wpg.yaml
mplsone MPLS labelEtherType 0x8847 / 0x8848, GRE, UDP 6635 (MPLS-in-UDP)s = 0: another mpls; s = 1: IPv4 / IPv6 by first nibblempls-ipv4.wpg.yaml, mpls-in-udp.wpg.yaml
l2tpv2L2TPv2UDP 1701body is opaquel2tpv2.wpg.yaml
l2tpv3L2TPv3 over IPIPv4 protocol 115body is opaquel2tpv3.wpg.yaml
gtpuGTP-U (mandatory 8 octets)UDP 2152IPv4 / IPv6 by first nibblegtpu-ipv4.wpg.yaml
—IP-in-IP / 6in4IPv4 protocol 4 → ipv4, 41 → ipv6—ipip.wpg.yaml, 6in4.wpg.yaml

There is no dedicated IP-in-IP protocol: stack ipv4 (or ipv6) on top of ipv4 and the outer protocol becomes 4 (41) automatically.

Auto fields

  • gre.protocol_type, geneve.protocol_type: from the next layer.
  • gtpu.length: the length after the GTP-U header.
  • mpls.s (bottom of stack): 0 when the next layer is mpls, 1 otherwise. Stack as many mpls layers as labels you need.
  • The outer UDP destination port, EtherType and IP protocol follow from the layer stacked above them.

Limits and approximations

  • GRE checksum / key / sequence number fields exist only when their flag bit is set, and the engine has no presence-conditional fields. gre is the 4-octet base (flags + protocol type) only; setting a flag does not add the field. For NVGRE, the common keyed case, use the dedicated nvgre (Key bit on by default, vsid + flow_id). nvgre is build-only: a received packet decodes as gre, and the 4 key octets are misread as the start of the inner frame. For other options, put the values in a raw layer right after gre and set the flags by hand.
  • MPLS pseudowires: below the bottom label the payload is told apart by its first nibble (4 → IPv4, 6 → IPv6). A control word or Ethernet pseudowire has no reliable marker and decodes as raw; when building, stack ethernet2 explicitly.
  • GTP-U optional fields (sequence number, N-PDU number, extension headers, present per the E/S/PN flags) are not modelled.
  • Geneve options have a header with 3 flag bits and a 5-bit length, narrower than an octet, so they are an opaque options region sized by opt_len.
  • L2TPv2 / v3 header fields depend heavily on the message kind (control / data) and flag bits, so the body is opaque octets.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ethernet2 · ipv4 · ipv6 · vxlan · gre · nvgre · mpls · gtpu · geneve · l2tpv2 · l2tpv3 · raw

Routing protocols

Status: draft

Notes on OSPFv2 / OSPFv3 / BGP-4 / RIPv1 and v2 / RIPng / EIGRP. Definitions are in crates/wpg-protocols/src/routing.rs, samples in templates/protocols/routing/. OSPFv2 Opaque LSAs / Segment Routing and the BGP multiprotocol NLRI (IPv6, VPN, EVPN) are described on the OSPF Opaque / SR, BGP MP / VPN / EVPN page.

How they are reached, and samples

idProtocolLayer belowSamples
ospfv2 + bodyOSPFv2 (RFC 2328)IPv4 protocol 89ospfv2-hello / -dbd / -lsr / -lsu-* / -lsack (opaque LSAs: ospfv2-lsu-te-lsa, -ri-sr, -ext-prefix-sr, -ext-link-sr)
ospfv3 + bodyOSPFv3 (RFC 5340)IPv6 next header 89ospfv3-hello / -dbd / -lsr / -lsu-* / -lsack
bgp + bodyBGP-4TCP 179 (destination, else source)bgp-open / -update / -keepalive / -notification / -route-refresh, bgp-update-mp-ipv6 / -vpnv4 / -evpn
ripRIPv1 / v2UDP 520ripv1-request, ripv2-response
ripngRIPngUDP 521ripng-response
eigrpEIGRP (basic TLVs)IP protocol 88 (IPv4 / IPv6)eigrp-hello, eigrp-update

Stacking the layers

OSPF and BGP are two layers, the common header and the body (an LSU adds an LSA header and an LSA body).

ipv4 / ospfv2 / ospfv2_hello
ipv4 / ospfv2 / ospfv2_lsu / ospfv2_lsa / ospfv2_router_lsa
ipv4 / ospfv2 / ospfv2_lsu / ospfv2_opaque_lsa / ospfv2_ri_lsa   # LS type 9 / 10 / 11
ipv6 / ospfv3 / ospfv3_lsu / ospfv3_lsa / ospfv3_intra_area_prefix_lsa
ipv4 / tcp / bgp / bgp_update
ipv4 / tcp / bgp                 # a KEEPALIVE is the header alone (type 4 is the default)

Auto fields

  • OSPF header type, packet_length and checksum. The OSPFv3 checksum includes the IPv6 pseudo header and is exact.
  • LSA header ls_type, length and ls_checksum (Fletcher, LS age excluded; exact for any age).
  • Router-LSA num_links.
  • BGP header length and type; OPEN opt_params_length; UPDATE withdrawn_routes_length and total_path_attribute_length; the Extended Length flag of path attributes longer than 255 octets.
  • EIGRP checksum.

Fields you set by hand

  • num_lsas of ospfv2_lsu / ospfv3_lsu (normally 1: an LSU carries one typed LSA).
  • ls_checksum of the LSA headers listed inside DBD / LSAck.

Limits and approximations

  • OSPFv2 authentication: the checksum leaves out the 64-bit authentication field, so it is exact for null and simple-password authentication. With cryptographic authentication (AuType 2) set the checksum to 0 by hand (in the builder, turn on “Allow malformed packets” to override it). The cryptographic-auth trailer after the packet is not modelled.
  • One typed LSA per LSU: there is no repeated-layer construct, so no further LSA can follow a typed LSA body.
  • LS types sharing a body: OSPFv2 types 3 / 4 and 5 / 7, and OSPFv3 0x4005 / 0x2007, have the same body layout, so Auto announces the first type. For the other one set ls_type by hand (a next-protocol mismatch warning results, but the packet can be sent).
  • OSPFv2 TOS entries (router-link num_tos > 0, summary / external TOS metrics) and the OSPFv3 prefix lists are not typed; they stay opaque prefixes / address_prefix octets.
  • BGP routes (NLRI / withdrawn routes) are lists of {length, prefix} (length in bits, ceil(length / 8) prefix octets). A hex string is still accepted as verbatim octets.
  • BGP path attributes are a TLV with a 16-bit type (flags << 8 | type code); the length is 8 bits, or 16 bits with the Extended Length flag (0x10), which is set automatically above 255 octets and kept when given in an explicit type. AS_PATH / AGGREGATOR use 4-octet AS numbers (RFC 6793). Extended optional parameters (RFC 9072) are not supported.
  • Only the first BGP message in a segment is decoded.
  • EIGRP route TLVs end in a variable-length destination (ceil(prefix_length / 8) octets), kept as destination octets running to the end of the TLV value; a multi-destination TLV stays in that one field.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ospfv2 · ospfv2_lsu · ospfv3 · ospfv3_lsu · bgp · rip · ripng · eigrp

Redundancy protocols (FHRP)

Status: draft

Notes on VRRPv2 and v3 / HSRPv1 and v2 / GLBP. Definitions are in crates/wpg-protocols/src/fhrp.rs, samples in templates/protocols/fhrp/.

How they are reached, and samples

idProtocolLayer belowSample
vrrpv3VRRPv3 (IPv4 addresses)IPv4 protocol 112vrrpv3.wpg.yaml
vrrpv2VRRPv2IPv4 protocol 112 (re-decoded when version is 2)vrrpv2.wpg.yaml
vrrpv3_ipv6VRRPv3 (IPv6 addresses)IPv6 next header 112vrrpv3-ipv6.wpg.yaml
hsrpHSRPv1UDP 1985hsrpv1.wpg.yaml
hsrpv2HSRPv2UDP 1985 (re-decoded for a first octet of 1), UDP 2029 (IPv6)hsrpv2.wpg.yaml
glbpGLBP (basic)UDP 3222glbp.wpg.yaml

Auto fields

  • VRRP checksum (Internet checksum for v2; including the IP pseudo header for v3) and the address counts (count_ip_addrs / count_ipvx_addrs).

Limits and approximations

  • VRRPv2 and v3 share IP protocol 112 and differ only in the version nibble. Decoding starts as vrrpv3 and re-decodes as vrrpv2 when version is 2. When building, pick the definition you want.
  • VRRPv3 address family follows the IP version of the enclosing packet, but a field cannot be sized from a lower layer, so there are two definitions: vrrpv3 (IPv4) and vrrpv3_ipv6 (IPv6).
  • HSRPv1 and v2 share UDP 1985. The first octet is the version (0) in v1 and the first TLV type (1, Group State) in v2, so decoding starts as hsrp and re-decodes as hsrpv2 for 1. The 16-octet HSRPv2 virtual address is IPv4 (zero padded) or IPv6 depending on ip_version, so it is opaque bytes(16).
  • GLBP is undocumented; only the Hello TLV (IPv4 virtual address) is typed. Request/Response and Authentication TLVs keep their value octets.
  • Only clear-text authentication is typed: VRRPv2 auth_data (8 octets), HSRPv1 auth_data and the HSRPv2 Text Authentication TLV (both default to cisco). The HSRPv2 MD5 authentication TLV stays value octets, and no digest is computed.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

vrrpv2 · vrrpv3 · vrrpv3_ipv6 · hsrp · hsrpv2 · glbp

Multicast control protocols

Status: draft

Notes on IGMPv1, v2, v3 / MLDv1 and v2 / PIM-SM v2. Definitions are in crates/wpg-protocols/src/mcast.rs, samples in templates/protocols/mcast/.

How they are reached, and samples

idProtocolLayer belowSample
igmp + igmpv2IGMPv1 / v2 (query, report, leave)IPv4 protocol 2igmpv2-query.wpg.yaml
igmp + igmpv3_queryIGMPv3 queryIPv4 protocol 2, type 0x11 with at least 8 octets leftigmpv3-query.wpg.yaml
igmp + igmpv3_reportIGMPv3 reportIPv4 protocol 2, type 0x22igmpv3-report.wpg.yaml
icmpv6 + mldMLDv1 (query, report, done)ICMPv6 type 130 / 131 / 132mldv1-query.wpg.yaml
icmpv6 + mldv2_queryMLDv2 queryICMPv6 type 130 with at least 24 octets leftmldv2-query.wpg.yaml
icmpv6 + mldv2_reportMLDv2 reportICMPv6 type 143mldv2-report.wpg.yaml
pim + pim_hello / pim_join_prunePIM-SM v2IPv4 protocol 103pim-hello.wpg.yaml, pim-join-prune.wpg.yaml
pim_registerPIM Register (standalone)chosen when building (decodes as pim)pim-register.wpg.yaml

Like ICMPv6, IGMP and PIM are two layers, a common header (type, checksum) and a body; the header type is Auto from the body. MLD bodies stack on icmpv6.

ipv4 / igmp / igmpv3_report
ipv6 / ipv6_hopopts / icmpv6 / mldv2_report
ipv4 / pim / pim_join_prune
ipv4 / pim_register / ipv4 / udp / payload

Auto fields

  • IGMP / PIM header type and checksum. The MLD checksum is computed by icmpv6, including the IPv6 pseudo header.
  • Counts: num_sources of IGMPv3 / MLDv2 queries, num_group_records / num_records of reports, num_sources inside a group record, and PIM Join/Prune num_groups / num_joined / num_pruned. Adding or removing list elements keeps them right.
  • pim_register.checksum: covers only the 8 octets of PIM header + Register flags (RFC 7761).

Limits and approximations

  • v2 and v3 queries differ only in length: with at least 8 (IGMPv3) or 24 (MLDv2) octets left, a query decodes as the v3 / v2 query body, otherwise as igmpv2 / mld.
  • PIM Register’s checksum does not cover the encapsulated packet, so pim_register is a standalone definition that repeats the PIM header. IP protocol 103 decodes as pim, so the body of a received Register decodes as raw. The inner packet is IPv4 or IPv6 by its first nibble.
  • PIM over IPv6 needs the IPv6 pseudo header in its checksum, but a checksum kind cannot depend on the lower layer, so pim is reached from IPv4 only and uses the plain Internet checksum.
  • PIM encoded addresses are typed for IPv4 (address family 1) only.
  • IGMP / MLD need the Router Alert option; the samples put it in the ipv4 options / the ipv6_hopopts layer.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ipv4 · ipv6_hopopts · icmpv6 · igmp · igmpv2 · igmpv3_query · igmpv3_report · mld · mldv2_query · mldv2_report · pim · pim_hello · pim_join_prune · pim_register · raw

Application protocols

Status: draft

Notes on DHCPv4 / DHCPv6 / DNS / NTP / SNMP / Syslog / RADIUS / TFTP. Definitions are in crates/wpg-protocols/src/app.rs, samples in templates/protocols/app/.

How they are reached, and samples

All of them are demultiplexed on the UDP port: the destination port, else the source port, so replies from a well-known port to an ephemeral one (DNS / SNMP / RADIUS responses, …) decode too.

idProtocolUDP portSamples
dhcpv4DHCPv4 (incl. relay agent information)67 / 68dhcpv4-discover, dhcpv4-relay
dhcpv6 / dhcpv6_relayDHCPv6 / Relay-Forward and Relay-Reply546 / 547dhcpv6-solicit, dhcpv6-relay-forward
dnsDNS53dns-query, dns-response
ntpNTP (RFC 5905 time packet)123ntp-client
snmp + snmp_pdu / snmp_trapSNMP v1 / v2c161 / 162snmp-get-request, snmp-trap-v1
syslogSyslog514syslog
radiusRADIUS1812 / 1813radius-access-request
tftp + tftp_data / tftp_ack / tftp_error / tftp_oackTFTP69tftp-rrq / -data / -ack / -error / -oack

Auto fields

  • radius.length.
  • SNMP msg_length / pdu_length (BER short form).
  • The length octets of DHCPv4 / DHCPv6 options and RADIUS attributes.

Fields you set by hand

  • DNS qdcount / ancount / nscount / arcount. The sections are opaque, so set the counts to match their contents.
  • SNMP community_length (update it when you change the community string).
  • RADIUS authenticator (Response Authenticator) and the Message-Authenticator attribute. Both are MD5 / HMAC-MD5 with the shared secret, and there is no keyed-digest auto rule. An Access-Request’s Request Authenticator is random, so any 16 octets will do.

Limits and approximations

  • DNS: names are length-prefixed labels ended by a zero octet, and each section is sized by a header count. The engine’s list type has neither a stop-on-terminator nor a count-driven length, so only the 12-octet header is typed and the sections (question, answer, authority, additional) are one opaque sections region. The default is an example.com A/IN question. Write compression pointers as octets too.
  • SNMP is BER-encoded ASN.1, modelled as a fixed layout of pre-encoded tag / length / value triples. Only the BER short-form length (contents below 128 octets) is supported; long-form lengths (0x81 nn, 0x82 nn nn) are not. Constructed tags nest to a fixed depth (varbind list → varbind → value). The PDU type is only known inside the PDU, so snmp is followed by snmp_pdu by default, which re-decodes as snmp_trap for the v1 Trap tag (0xa4).
  • DHCPv6 Relay-Forward / Relay-Reply (msg-type 12 / 13) have a different fixed layout from client / server messages, so decoding starts as dhcpv6 and re-decodes as dhcpv6_relay. The message inside the Relay Message option is typed one level deep only.
  • TFTP: the RRQ / WRQ file name, mode and options and the error message are typed as NUL-terminated strings. DATA / ACK / ERROR / OACK split into tftp_data and so on via re-parse on the opcode. The transfer itself runs between two ephemeral ports (TIDs), so packets not on port 69 decode as raw after UDP.
  • NTP control (mode 6) and private (mode 7) messages have their own layouts and are out of scope. Extension fields and the MAC are an opaque extensions.
  • Syslog is free text, a single opaque message. Give the string as is, in RFC 5424 or RFC 3164 format.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

dhcpv4 · dhcpv6 · dhcpv6_relay · dns · ntp · snmp · snmp_pdu · snmp_trap · syslog · radius · tftp · tftp_data · tftp_ack · tftp_error · tftp_oack · raw

OSI encapsulation (P2)

Status: draft

Notes on the OSI network-layer encapsulation shared by CLNP / ES-IS / IS-IS, and on the NSAP address type (M7). The definitions are in crates/wpg-protocols/src/osi.rs; the sample is templates/protocols/l2/dot3-llc-osi.wpg.yaml.

How it is reached

Layer belowSelectorLayer above
llcDSAP / SSAP 0xfechosen by the PDU’s leading NLPID octet
pppprotocol 0x0023 (RFC 1377)same

No “next protocol” number precedes an OSI PDU: its own first octet, the NLPID (ISO/IEC TR 9577), says what it is (0x81 CLNP, 0x82 ES-IS, 0x83 IS-IS). llc and ppp therefore peek at the first 8 payload bits (Binding::peek) to pick the next layer. The dedicated definitions are registered in that peek table: CLNP (0x81) and ES-IS (0x82), see CLNP / ES-IS, and IS-IS (0x83), see IS-IS. Other NLPIDs (for example 0x00, the inactive subset of ISO 8473), and PDUs too short for their definition, decode as the generic osi PDU (the NLPID plus the rest as opaque octets).

When building, stack osi or a dedicated PDU (clnp, esis_ish, isis_l1_lan_hello, …) on top of llc; DSAP / SSAP become 0xfe automatically. The PPP protocol likewise becomes 0x0023 automatically.

The NSAP type

  • An nsap value is the address itself (1..=20 octets). On the wire it is preceded by a 1-octet length indicator, as is usual in OSI; the builder writes it and the parser reads it.
  • Notation: hex such as 49.0001.1921.6800.1001.00 (. and spaces are ignored, a 0x prefix is allowed).
  • The GUI field editor splits the NSAP being typed into AFI / area / system ID (6 octets) / NSEL (addresses shorter than 8 octets are not split).
  • A range generator steps the system ID (for example 49.0001.1921.6800.1001.00-49.0001.1921.6800.1004.00).

Limits

  • The osi NLPID is not Auto.
  • A PDU with NLPID 0x81 / 0x82 / 0x83 always decodes as CLNP / ES-IS / IS-IS (when long enough), so a generic osi layer carrying one of them reads back as the dedicated protocol.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

llc · ppp · osi · clnp · esis_ish · isis_l1_lan_hello

CLNP / ES-IS (P2)

Status: draft

Notes on CLNP (ISO 8473-1) and ES-IS (ISO 9542) (M7). The definitions are in crates/wpg-protocols/src/clnp.rs, the samples in templates/protocols/l3/clnp-*.wpg.yaml and templates/protocols/routing/esis-*.wpg.yaml. Both run directly over the OSI encapsulation.

PDUs, how they are reached, and samples

idPDUSamples
clnpCLNP, every PDU type: DT (0x1c), MD (0x1d), ER (0x01), ERQ / ERP (0x1e / 0x1f)clnp-dt (segmentation part), clnp-er (reason for discard), clnp-erq (priority, source routing)
esis_eshES-IS End System Hello (2)esis-esh
esis_ishES-IS Intermediate System Hello (4)esis-ish (ES configuration timer)
esis_rdES-IS Redirect (6)esis-rd
esisAny ES-IS PDU: fixed part + opaque octetsesis-generic
dot3 / llc / clnp / payload        # DT carrying a transport PDU
dot3 / llc / clnp / raw            # ER carrying the discarded header
dot3 / llc / esis_esh              # to 09:00:2b:00:00:05 (AllIntermediateSystems)
dot3 / llc / esis_ish              # to 09:00:2b:00:00:04 (AllEndSystems)
ppp / clnp / payload               # PPP protocol 0x0023

The LLC DSAP / SSAP (0xfe) and the PPP protocol (0x0023) are Auto. When parsing, the NLPID 0x81 selects clnp and 0x82 the generic esis, whose pdu_type then re-decodes the layer as the dedicated PDU; unknown ES-IS types stay esis. PDUs shorter than the fixed part (CLNP 11 octets, ES-IS 9) decode as the generic osi.

The clnp layer is the header only. Its data (DT: the transport PDU; ER: the header of the discarded PDU; ERQ / ERP: the echoed PDU) is the next layer, typically payload or raw.

Auto fields

FieldRule
length_indicatorHeader length in octets (CLNP: up to the end of the options; ES-IS: the whole PDU)
segment_length (CLNP)Length of the whole PDU (header + data)
checksumISO 8473 Fletcher checksum of the header (CLNP) / of the PDU (ES-IS). A Manual 0 means “checksum not used”; it is sent as is and reported as differing from Auto (a computed checksum is never 0)
sp (CLNP)1 when the segmentation part has an element, else 0
number_of_source_addresses (ESH)Number of source_addresses
bsnpa_length (RD)Size of bsnpa

The CLNP segmentation part is a list of at most one {data_unit_identifier, segment_offset, total_length}; total_length (the length of the unsegmented PDU) is not computed:

- protocol: clnp
  fields:
    segmentation:
      - { data_unit_identifier: 1, segment_offset: 0, total_length: 69 }

Options

Options are {code, length, value} items after the addresses (and the segmentation part); they end at the length_indicator (Length::UntilOffset), so whatever follows the header is the next layer even though the addresses have variable size.

CodeName (name)Value fieldsIn
0xc5securityvalue (octets)CLNP, ES-IS
0xc3qos_maintenancevalue (octets)CLNP, ES-IS
0xcdpriorityvalueCLNP, ES-IS
0xc8 / 0xcbsource_routing / recording_of_routeroute_type (partial / complete), next_address, addresses: list of {address}CLNP
0xccpaddingdataCLNP
0xc1reason_for_discardreason (destination_unknown, lifetime_expired_in_transit, …), pointerCLNP (ER)
0xe1 / 0xe2address_mask / snpa_maskmaskES-IS
0xc6es_configuration_timersecondsES-IS (ISH)

Other options are kept as { type: N, data: "..." }.

Limits

  • The segmentation total_length is not computed, and no segmentation / reassembly of a large PDU into several frames is done.
  • Security and quality of service maintenance values are octets; the globally unique / source address specific formats are not split.
  • A Redirect’s subnetwork address (bsnpa) is octets (a MAC address is 6 octets: "02 00 00 00 00 02"). An empty net ("") redirects to an end system.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

osi · clnp · esis · esis_esh · esis_ish · esis_rd · payload · raw

IS-IS (P2)

Status: draft

Notes on IS-IS (ISO/IEC 10589, RFC 1195 and the TLV RFCs below) (M7). The definitions are in crates/wpg-protocols/src/isis.rs, the samples in templates/protocols/routing/isis-*.wpg.yaml. IS-IS runs directly over the OSI encapsulation.

PDUs, how they are reached, and samples

idPDU (type)Samples
isis_l1_lan_hello / isis_l2_lan_helloLAN Hello L1 (15) / L2 (16)isis-l1-lan-hello (padded), isis-l2-lan-hello
isis_p2p_helloPoint-to-point Hello (17)isis-p2p-hello (three-way adjacency, padded)
isis_l1_lsp / isis_l2_lspLSP L1 (18) / L2 (20)isis-l1-lsp (narrow metrics), isis-l2-lsp (wide metrics, TE, SR)
isis_l1_csnp / isis_l2_csnpCSNP L1 (24) / L2 (25)isis-l1-csnp, isis-l2-csnp
isis_l1_psnp / isis_l2_psnpPSNP L1 (26) / L2 (27)isis-l1-psnp, isis-l2-psnp
isisAny PDU: common header + opaque octetsisis-generic

Each PDU is a single layer: the 8-octet common header, the PDU’s fixed fields and the TLVs.

dot3 / llc / isis_l1_lan_hello      # to 01:80:c2:00:00:14 (AllL1ISs); L2: ...:15
dot3 / llc / isis_p2p_hello         # to 09:00:2b:00:00:05 (AllISs) on Ethernet
ppp / isis_l2_lsp                   # PPP protocol 0x0023

The LLC DSAP / SSAP (0xfe) and the PPP protocol (0x0023) are Auto. When parsing, the NLPID 0x83 selects the generic isis, whose pdu_type then re-decodes the layer as the dedicated PDU; unknown PDU types stay isis.

Auto fields

FieldRule
pdu_lengthLength of the whole PDU
LSP checksumISO 8473 Fletcher checksum from the LSP ID to the end of the PDU. The fields before the LSP ID (common header, PDU length, remaining lifetime) are excluded, so it stays correct for any lifetime
Hello paddingWhen pdu_length of a Hello is Manual, Padding TLVs (type 8, up to 255 octets each) are appended until the PDU is exactly that long, e.g. pdu_length: 1497 for an Ethernet MTU of 1500 (minus the 3-octet LLC header). On Auto no padding is added. If the missing size cannot be made of TLVs (one octet), a warning is shown
sub_tlvs_length (extended IS / IP / IPv6 reachability)Size of the sub_tlvs that follow
sub_tlvs_present (S bit, TLV 135 / 236)1 when the entry has a sub_tlv_block, else 0

header_length is a constant per PDU type (27 / 20 / 33 / 17) and has a default, not an Auto rule; a warning appears when it is changed.

TLVs

CodeName (name)Value fields
1area_addressesaddresses: list of {address} (NSAP, e.g. 49.0001)
2is_reachabilityvirtual_flag, neighbors: {default_metric, delay_metric, expense_metric, error_metric, neighbor_id}
6is_neighborsneighbors: MAC list
8paddingdata
9lsp_entriesentries: {remaining_lifetime, lsp_id, sequence_number, checksum}
10authenticationauth_type (cleartext / hmac_md5), value
22extended_is_reachabilityneighbors: {neighbor_id, metric, sub_tlvs_length, sub_tlvs}
128 / 130ip_internal_reachability / ip_external_reachabilityprefixes: {4 metrics, ip_address, subnet_mask}
129protocols_supportednlpids (ipv4, ipv6, clnp)
132ip_interface_addressesaddresses
134te_router_idrouter_id
135extended_ip_reachabilityprefixes: {metric, up_down, sub_tlvs_present, prefix_length, prefix, sub_tlv_block}
137dynamic_hostnamehostname
232ipv6_interface_addressesaddresses
236ipv6_reachabilityprefixes: {metric, up_down, external, sub_tlvs_present, prefix_length, prefix, sub_tlv_block}
240p2p_adjacency_stateadjacency_state, extended_local_circuit_id, neighbor_system_id, neighbor_extended_local_circuit_id
242router_capabilityrouter_id, flags (S / D), sub_tlvs

Sub-TLVs:

  • Extended IS reachability (22): administrative group (3), link local / remote IDs (4), IPv4 interface / neighbor address (6 / 8), maximum / reservable / unreserved bandwidth (9 / 10 / 11), TE default metric (18), Adj-SID / LAN-Adj-SID (31 / 32).
  • Extended IP / IPv6 reachability (135 / 236): 32 / 64-bit administrative tags (1 / 2), Prefix-SID (3), prefix attribute flags (4).
  • Router capability (242): SR capabilities (2), SR algorithms (19).

prefix holds ceil(prefix_length / 8) octets; give the significant octets only (192.0.2.0/24 is prefix_length: 24, prefix: "c00002"). The optional sub-TLVs of a prefix are written as a one-element sub_tlv_block list:

- extended_ip_reachability:
    prefixes:
      - metric: 0
        prefix_length: 32
        prefix: "c0000201"
        sub_tlv_block:
          - sub_tlvs:
              - { prefix_sid: { flags: 0x40, algorithm: 0, sid: "00000001" } }

Other TLVs are kept as { type: N, data: "..." }.

Limits

  • System IDs are 6 octets (id_length 0); other ID lengths are not modelled.
  • TE bandwidths are the raw 32-bit IEEE floating point values. SIDs / labels and the SR capability ranges are octets (a 3-octet label or a 4-octet index).
  • The HMAC-MD5 authentication value (and the cryptographic authentication of RFC 5310) is not computed.
  • TLV 240 is modelled in its 15-octet form; the shorter forms (1 and 5 octets) read back as data.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ipv4 · ipv6 · clnp · isis · isis_l1_lan_hello · isis_l2_lan_hello · isis_p2p_hello · isis_l1_lsp · isis_l2_lsp · isis_l1_csnp · isis_l2_csnp · isis_l1_psnp · isis_l2_psnp

SCTP (P2)

Status: draft

Notes on SCTP (RFC 9260) (M7). The definition is in crates/wpg-protocols/src/sctp.rs, the samples in templates/protocols/l4/sctp-*.wpg.yaml.

How it is reached, and samples

ethernet2 / ipv4 / sctp            # IPv4 protocol 132 (Auto)
ethernet2 / ipv6 / sctp            # IPv6 next header 132 (Auto)
ethernet2 / ipv4 / udp / sctp      # SCTP over UDP, port 9899 (RFC 6951)
SampleContents
sctp-initINIT with IPv4 address, supported address types, ECN, FORWARD TSN supported and supported extensions parameters
sctp-init-ackINIT ACK with a state cookie
sctp-dataDATA with 16 octets of user data
sctp-sackSACK with two gap ack blocks and a duplicate TSN
sctp-heartbeatHEARTBEAT with heartbeat info
sctp-abortABORT (T bit) with a user initiated abort cause
sctp-shutdownSHUTDOWN over IPv6
sctp-over-udpCOOKIE ECHO bundled with DATA over UDP 9899

The UDP destination port is not Auto: set it to 9899 for SCTP over UDP (the parser also accepts 9899 as the source port).

One layer, chunks as items

The sctp layer is the common header (src_port, dst_port, verification_tag, checksum) and every chunk of the packet in chunks. Several chunks can be bundled; there is no layer after sctp. The user data of DATA / I-DATA is the user_data octets of the chunk; it is not demultiplexed on the payload protocol identifier.

Chunks are items of 8-bit type, 8-bit flags and 16-bit length; the length counts the 4-octet chunk header but not the zero padding to a multiple of 4 octets, which is always added. Every chunk has a flags field (written between the type and the length):

- protocol: sctp
  fields:
    verification_tag: 0x3a5c7e91
    chunks:
      - sack:
          cumulative_tsn_ack: 100
          gap_ack_blocks: [{ start: 2, end: 3 }]
      - name: data # `data` is a reserved item key: use {name, fields}
        fields:
          flags: b|e
          tsn: 101
          user_data: "68 65 6c 6c 6f"
      - abort: { flags: t }
TypeName (name)Value fields (after flags)
0dataflags i/u/b/e, tsn, stream_identifier, stream_sequence_number, payload_protocol_identifier, user_data
1 / 2init / init_ackinitiate_tag, a_rwnd, outbound_streams, inbound_streams, initial_tsn, parameters
3sackcumulative_tsn_ack, a_rwnd, number_of_gap_ack_blocks / number_of_duplicate_tsns (Auto), gap_ack_blocks ({start, end}), duplicate_tsns
4 / 5heartbeat / heartbeat_ackparameters (heartbeat_info)
6abortflag t, causes
7shutdowncumulative_tsn_ack
8 / 11shutdown_ack / cookie_ack(flags only)
9errorcauses
10cookie_echocookie
14shutdown_completeflag t
15auth (RFC 4895)shared_key_identifier, hmac_identifier, hmac
0x40i_data (RFC 8260)flags i/u/b/e, tsn, stream_identifier, message_identifier, ppid_or_fsn, user_data
0x80 / 0xc1asconf_ack / asconf (RFC 5061)serial_number, parameters
0x82re_config (RFC 6525)parameters
0x84pad (RFC 4820)padding
0xc0forward_tsn (RFC 3758)new_cumulative_tsn, streams ({stream, stream_sequence})

Other chunk types are kept as { type: N, data: "..." }; the first data octet is the flags.

Parameters and error causes

Parameters (INIT, INIT ACK, HEARTBEAT, ASCONF, RE-CONFIG) and error causes (ABORT, ERROR) are items of 16-bit type and 16-bit length, padded to 4 octets. As RFC 9260 §3.2 requires, the padding of the last parameter / cause is not counted in the chunk length: the chunk padding covers it.

ParametersError causes
ipv4_address, ipv6_address, heartbeat_info, state_cookie, unrecognized_parameter, cookie_preservative, host_name_address, supported_address_types ([ipv4, ipv6]), ecn_capable, random, chunk_list, requested_hmac_algorithm, padding, supported_extensions (chunk types), forward_tsn_supported, add_ip_address / delete_ip_address / set_primary_address (correlation_id, address: an address parameter), error_cause_indication, success_indication, adaptation_layer_indication, the RE-CONFIG requests / responseinvalid_stream_identifier, missing_mandatory_parameter (count Auto), stale_cookie, out_of_resource, unresolvable_address, unrecognized_chunk_type, invalid_mandatory_parameter, unrecognized_parameters, no_user_data, cookie_received_while_shutting_down, restart_with_new_addresses, user_initiated_abort, protocol_violation, the ASCONF causes (0x00a0-0x00a4), unsupported_hmac_identifier

Auto fields

FieldRule
checksumCRC32c of the whole SCTP packet with the field zeroed (RFC 9260 appendix A), sent least significant octet first
chunk / parameter / cause lengthSize without the padding; the zero padding itself
number_of_gap_ack_blocks, number_of_duplicate_tsns (SACK)Size of the lists
number_of_missing_parametersSize of missing_parameters

Limits

  • A received chunk whose length also counts the padding of its last parameter (some implementations do) decodes the same, with an empty item after that parameter that keeps the padding where it was.
  • No association state: TSNs, stream sequence numbers and tags are values (use generators to vary them).
  • Unknown chunk types decode with their flags as the first data octet; the “action” bits of the type are not interpreted.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

sctp

OSPF Opaque / SR, BGP MP / VPN / EVPN (P2)

Status: draft

Notes on the routing protocol extensions of M7: OSPFv2 Opaque LSAs (RFC 5250) with Traffic Engineering (RFC 3630), Router Information (RFC 7770), Extended Prefix / Extended Link (RFC 7684) and Segment Routing (RFC 8665), and the BGP multiprotocol NLRI (RFC 4760) for IPv4 / IPv6 unicast, VPN-IPv4 / VPN-IPv6 (RFC 4364 / RFC 4659) and EVPN (RFC 7432 / RFC 9136). The definitions are in crates/wpg-protocols/src/ospf_opaque.rs and crates/wpg-protocols/src/bgp_mp.rs; the basics of OSPF and BGP are on the routing protocols page.

OSPFv2 Opaque LSAs

ipv4 / ospfv2 / ospfv2_lsu / ospfv2_opaque_lsa / ospfv2_te_lsa
ipv4 / ospfv2 / ospfv2_lsu / ospfv2_opaque_lsa / ospfv2_ri_lsa
ipv4 / ospfv2 / ospfv2_lsu / ospfv2_opaque_lsa / ospfv2_ext_prefix_lsa
ipv4 / ospfv2 / ospfv2_lsu / ospfv2_opaque_lsa / ospfv2_ext_link_lsa

ospfv2_opaque_lsa is the LSA header with the Link State ID split into opaque_type (8 bits, Auto from the body layer) and opaque_id (24 bits). ls_type gives the flooding scope: 9 link-local, 10 area (default), 11 AS. The LSA length and the Fletcher ls_checksum are Auto as for the other LSAs. When parsing, an LSA of type 9 / 10 / 11 is first read as ospfv2_lsa and then re-decoded as ospfv2_opaque_lsa; an unknown opaque type is followed by a raw layer.

SampleContents
ospfv2-lsu-te-lsaTE LSA: Link TLV with link type / ID, interface addresses, TE metric, bandwidths, admin group
ospfv2-lsu-ri-srRouter Information LSA: capabilities, hostname, SR-Algorithm, SRGB (SID/Label Range), SRLB
ospfv2-lsu-ext-prefix-srExtended Prefix LSA: 192.0.2.1/32 with a node Prefix SID (index 1)
ospfv2-lsu-ext-link-srExtended Link LSA: a point-to-point link with an Adj-SID (label 24000)

TLVs

Each body has one field, tlvs. TLVs and sub-TLVs have a 16-bit type and a 16-bit length counting the value only; the value is padded with zeros to a multiple of 4 octets (not counted in the length). Lengths and padding are Auto.

BodyTLVsSub-TLVs
ospfv2_te_lsa (opaque type 1)router_address (1), link (2)link_type, link_id, local_address, remote_address, te_metric, max_bandwidth, max_reservable_bandwidth, unreserved_bandwidth, admin_group
ospfv2_ri_lsa (4)informational_capabilities (1), functional_capabilities (2), hostname (7), sr_algorithm (8), sid_label_range (9), sr_local_block (14), srms_preference (15)sid_label / sid_label_index
ospfv2_ext_prefix_lsa (7)extended_prefix (1), extended_prefix_range (2)prefix_sid / prefix_sid_label
ospfv2_ext_link_lsa (8)extended_link (1)adj_sid / adj_sid_index, lan_adj_sid / lan_adj_sid_index

A SID is 3 octets (a label in the low 20 bits, V and L flags set) or 4 octets (an index, V and L clear). Every sub-TLV that carries one exists in both forms; pick the item by name (label or index field) and the parser tells them apart by the value length:

- protocol: ospfv2_ext_prefix_lsa
  fields:
    tlvs:
      - extended_prefix:
          route_type: intra_area
          prefix_length: 32
          flags: n
          prefix: 192.0.2.1
          sub_tlvs:
            - prefix_sid: { algorithm: 0, index: 1 }          # 4 octets
            # - prefix_sid_label: { flags: v|l, label: 16001 } # 3 octets

TE bandwidths are the raw 32-bit IEEE floating point values in octets per second (0x4b3ebc20 = 12.5e6 = 100 Mbit/s).

BGP multiprotocol NLRI

MP_REACH_NLRI (code 14) and MP_UNREACH_NLRI (code 15) have a layout that depends on the AFI / SAFI after them. Each modelled family is its own path attribute item; the parser picks it from the first three value octets (AFI, SAFI):

FamilyAFI / SAFIItemsNext hopNLRI element
IPv4 unicast1 / 1mp_reach_ipv4_unicast, mp_unreach_ipv4_unicastlist of IPv4 addresses{length, prefix}
IPv6 unicast2 / 1mp_reach_ipv6_unicast, mp_unreach_ipv6_unicastlist of IPv6 addresses (global, link-local){length, prefix}
VPN-IPv41 / 128mp_reach_vpnv4, mp_unreach_vpnv4list of {rd, address}{length, label, exp, bos, rd, prefix}
VPN-IPv62 / 128mp_reach_vpnv6, mp_unreach_vpnv6list of {rd, address}same
EVPN25 / 70mp_reach_evpn, mp_unreach_evpnoctets (IPv4 or IPv6 address)EVPN route items

Other families use the generic mp_reach_nlri / mp_unreach_nlri with the next hop and NLRI as octets. afi / safi default to the family; next_hop_length is Auto.

  • Prefixes: length is in bits and prefix has ceil(length / 8) octets. The UPDATE withdrawn_routes and nlri are prefix lists too, and both UPDATE length fields are Auto.
  • VPN prefixes: length counts the label (24 bits), the route distinguisher (64 bits) and the prefix bits, so a /24 is 112. One label is modelled (bos: 1); a withdrawal usually carries label: 0x80000, bos: 0 (the 0x800000 compatibility value).
  • Route distinguishers are 8 octets: 0000 fde9 00000064 is 65001:100 (type 0), 0001 c0000201 0001 is 192.0.2.1:1 (type 1).
  • EVPN routes (8-bit type, 8-bit length): ethernet_ad (1), mac_ip (2), inclusive_multicast (3), ethernet_segment (4), ip_prefix (5, IPv4, 34 octets) and ipv6_prefix (5, IPv6, 58 octets). ESIs are 10 octets. Label fields are the 3-octet wire value: label << 4 | bos for MPLS, the VNI for VXLAN (RFC 8365). IP addresses with a length field (ip_length in bits) are octets.
  • The PMSI Tunnel attribute (pmsi_tunnel, code 22) is typed; route targets are extended_communities values (0x0002fde900000064 = RT 65001:100).
- protocol: bgp_update
  fields:
    path_attributes:
      - { origin: 0 }
      - { as_path: { segments: [] } }
      - mp_reach_vpnv4:
          next_hop: [{ rd: "0000000000000000", address: 192.0.2.1 }]
          nlri:
            - { length: 112, label: 16, bos: 1, rd: "0000 fde9 00000064", prefix: "c6 33 64" }
    nlri: []
SampleContents
bgp-update-mp-ipv6IPv6 unicast announcement (global + link-local next hop) and withdrawal
bgp-update-vpnv4VPN-IPv4 route with label 16, RD and route target 65001:100
bgp-update-evpnEVPN MAC/IP and Inclusive Multicast routes for VNI 10010, route target, VXLAN encapsulation, PMSI Tunnel

Extended Length

A path attribute whose value exceeds 255 octets gets the Extended Length flag (0x10) and a 16-bit length automatically. To send the long form for a short attribute (as FRR and GoBGP do for MP_REACH_NLRI), give the item an explicit type:

- { name: mp_reach_ipv4_unicast, type: 0x900e, fields: { next_hop: [192.0.2.1], nlri: [{ length: 24, prefix: "c63364" }] } }

Received attributes keep their form: a parsed Extended Length attribute is exported with its type.

Limits

  • OSPFv3 Extended LSAs (RFC 8362) and OSPFv3 Segment Routing (RFC 8666) are not modelled.
  • The OSPF TE GMPLS sub-TLVs (RFC 4203) and the RI TLVs other than those listed stay raw items.
  • BGP ADD-PATH path identifiers (RFC 7911), label stacks of more than one label (RFC 8277) and the BGP Prefix-SID attribute (RFC 8669) are not modelled. Write such NLRI as octets with the generic mp_reach_nlri / mp_unreach_nlri items; when parsing such NLRI, the octets still rebuild identically but the decoded fields do not line up with them.
  • Several BGP messages in one segment, and several typed LSAs in one LSU, are not supported (see the routing protocols page).

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ospfv2_lsa · ospfv2_opaque_lsa · ospfv2_te_lsa · ospfv2_ri_lsa · ospfv2_ext_prefix_lsa · ospfv2_ext_link_lsa · raw

LDP / RSVP-TE / BFD (P2)

Status: draft

Notes on LDP (RFC 5036), RSVP-TE (RFC 2205 / RFC 3209) and BFD (RFC 5880 / 5881 / 5883, Micro-BFD RFC 7130) (M7). The definitions live in crates/wpg-protocols/src/{ldp,rsvp,bfd}.rs, the samples in templates/protocols/mpls/ and templates/protocols/oam/.

Stacks and samples

ethernet2 / ipv4 / udp / ldp       # UDP 646: Hello (basic discovery to 224.0.0.2, extended to a unicast address)
ethernet2 / ipv4 / tcp / ldp       # TCP 646: the session (Initialization onwards)
ethernet2 / ipv4 / rsvp            # IPv4 protocol 46 (Auto)
ethernet2 / ipv6 / rsvp            # IPv6 next header 46 (Auto)
ethernet2 / ipv4 / udp / bfd       # UDP 3784 (single hop), 4784 (multihop), 6784 (Micro-BFD)

LDP over IPv6 (RFC 7552) is ipv6 / udp|tcp / ldp. UDP / TCP destination ports are not Auto: set 646, 3784, … (decoding also recognises the source port). The BFD echo port 3785 is not decoded: its contents only mean something to the sender.

SampleContents
ldp-helloLink Hello to 224.0.0.2 (GTSM bit, IPv4 transport address)
ldp-targeted-helloTargeted Hello for extended discovery (T / R bits, configuration sequence number)
ldp-initializationInitialization (Common Session Parameters) and KeepAlive in one PDU
ldp-label-mappingAddress and two Label Mappings (prefix FECs, generic labels including implicit null 3)
ldp-label-withdrawLabel Withdraw with the wildcard FEC and a Notification (Shutdown)
rsvp-te-pathPath with Router Alert (strict / loose ERO, SESSION_ATTRIBUTE, SENDER_TSPEC, RRO)
rsvp-te-resvResv with the SE style (FLOWSPEC, FILTER_SPEC, LABEL, RRO with a label)
rsvp-path-errPathErr with an ERROR_SPEC (Routing Problem)
rsvp-path-tearPathTear
rsvp-helloHello with a HELLO REQUEST
bfd-single-hopControl packets in state Up with 300 ms intervals (10 packets, 4 pps)
bfd-authPoll with meticulous keyed SHA1 authentication
bfd-multihop-ipv6Multihop over IPv6 (UDP 4784, state Init)
micro-bfdMicro-BFD on a LAG member link (UDP 6784, destination MAC 01:00:5e:90:00:01)

LDP: one layer is one PDU

The ldp layer is the PDU header (version, pdu_length, lsr_id, label_space) and every message of the PDU (messages). Messages end at the PDU length, so a further PDU in the same TCP segment becomes the next layer (raw).

Messages and TLVs are items of the same shape: a 16-bit type (the U bit, and for TLVs the F bit, are its top bits), a 16-bit length of the value only, and the value. Every message starts with message_id, followed by tlvs.

- protocol: ldp
  fields:
    lsr_id: 192.0.2.1
    messages:
      - label_mapping:
          message_id: 11
          tlvs:
            - fec:
                elements: [{ prefix_length: 24, prefix: "c6 33 64" }]
            - generic_label: { label: 299776 }
      - label_withdraw:
          message_id: 12
          tlvs:
            - fec_wildcard
TypeMessage (name)TypeTLV (name) and value fields
0x0001notification0x0100fec (elements: {element_type (2), address_family, prefix_length, prefix}), fec_wildcard (element type 1)
0x0100hello0x0101address_list (IPv4) / address_list_ipv6 (address_family, addresses)
0x0200initialization0x0103 / 0x0104hop_count, path_vector (lsr_ids)
0x0201keepalive0x0200generic_label (label: 20 bits)
0x0300 / 0x0301address / address_withdraw0x0300status (e, f, status_code, message_id, message_type)
0x0400label_mapping0x0400common_hello_parameters (hold_time, t, r, g (GTSM, RFC 6720))
0x0401label_request0x0401 / 0x0403ipv4_transport_address / ipv6_transport_address
0x0402label_withdraw0x0402configuration_sequence_number
0x0403label_release0x0500common_session_parameters (protocol_version, keepalive_time, a, d, pv_lim, max_pdu_length, receiver_lsr_id, receiver_label_space)
0x0404label_abort_request0x0600label_request_message_id

The FEC TLV is decoded as fec_wildcard or fec from the first value octet (the element type), the Address List as IPv4 or IPv6 from the first two (the address family). Other types (ATM / Frame Relay labels and session parameters, vendor TLVs, …) are kept as { type: N, data: "..." }.

RSVP-TE: objects are “length, then type”

The rsvp layer is the common header (version, flags, msg_type, checksum, send_ttl, length) and every object of the message (objects). An object is a 16-bit length (counting the 4-octet header) followed by the Class-Num and C-Type, read together as one 16-bit type (class_num << 8 | c_type; wpg-core TlvDef::len_first). Item names combine the class and the C-Type.

TypeName (name)TypeName (name)
0x0101 / 0x0102session_ipv4 / session_ipv60x0b01sender_template_ipv4
0x0107 / 0x0108session_lsp_tunnel_ipv4 / _ipv60x0b07 / 0x0b08sender_template_lsp_tunnel_ipv4 / _ipv6
0x0301 / 0x0302rsvp_hop_ipv4 / rsvp_hop_ipv60x0c02sender_tspec (IntServ)
0x0501time_values0x0f01resv_confirm_ipv4
0x0601 / 0x0602error_spec_ipv4 / error_spec_ipv60x1001label
0x0701scope_ipv40x1301label_request (l3pid)
0x0801style (sharing, sender_selection; default SE)0x1401 / 0x1501explicit_route / record_route (subobjects)
0x0902flowspec (IntServ, controlled load)0x1601 / 0x1602hello_request / hello_ack
0x0a01filter_spec_ipv40x1701 / 0x1801 / 0x1802message_id / message_id_ack / message_id_nack (RFC 2961)
0x0a07 / 0x0a08filter_spec_lsp_tunnel_ipv4 / _ipv60xcf07 / 0xcf01session_attribute / session_attribute_ra (with resource affinities)

EXPLICIT_ROUTE subobjects are ipv4_prefix, ipv6_prefix, unnumbered_interface and as_number; the names ending in _loose have the L bit (loose hop). RECORD_ROUTE subobjects are ipv4_address, ipv6_address, label and unnumbered_interface (each with flags). ADSPEC, POLICY_DATA, INTEGRITY and other objects keep their value octets.

The token bucket of SENDER_TSPEC / FLOWSPEC (token_bucket_rate, token_bucket_size, peak_data_rate) is given as IEEE 754 single-precision bit patterns in 32-bit integers (1,000,000 octets/s = 0x49742400, infinity = 0x7f800000). The default is 125,000 octets/s (1 Mbit/s).

Path, PathTear and ResvConf are normally sent with the IP Router Alert option (ipv4 options: [router_alert: 0]).

BFD

The bfd layer is the mandatory section and the optional authentication section (authentication). The flags are the 1-bit fields p, f, c, a, d and m. Authentication types are simple password (simple_password: key_id, password), keyed_md5 / meticulous_keyed_md5 (key_id, sequence_number, a 16-octet digest) and keyed_sha1 / meticulous_keyed_sha1 (a 20-octet hash).

- protocol: bfd
  fields:
    state: up
    my_discriminator: 0x101
    your_discriminator: 0x201
    desired_min_tx_interval: 300000 # microseconds
    required_min_rx_interval: 300000
    authentication:
      - simple_password: { key_id: 1, password: '"secret"' }

Auto fields

FieldRule
ldp.pdu_lengthPDU length after the version and PDU length fields
LDP message / TLV lengthsValue length (without the type and length)
rsvp.checksumInternet checksum of the whole message with the field zeroed
rsvp.length, object / subobject lengthsLength including the header
SESSION_ATTRIBUTE name_length and paddingOctets of the name, zero padding to 4 octets (counted in the length)
bfd.lengthControl packet length including the authentication section
bfd.a1 when there is an authentication section

Limitations

  • No state: no LDP session setup, RSVP refresh, or BFD state machine and timers. Values are sent as given; use generators to vary them.
  • BFD MD5 digests / SHA1 hashes and the RSVP INTEGRITY object are Manual (nothing is computed from a key).
  • One LDP layer is one PDU; further PDUs in the same segment decode as raw.
  • RSVP does not type the GMPLS objects (RFC 3473), ADSPEC or POLICY_DATA; RSVP over UDP (RFC 2205 appendix C) is out of scope.
  • Only the first IntServ parameter (the token bucket) is typed; later ones (the guaranteed service rate / slack term, …) are parameters octets.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ipv4 · ldp · rsvp · bfd · raw

SRv6 SRH / SR-MPLS (P2)

Status: draft

Building blocks for the SRv6 Segment Routing Header (RFC 8754) and SR-MPLS (RFC 8660) (M7). The definitions are in crates/wpg-protocols/src/ipv6.rs (ipv6_srh) and encap.rs (mpls); samples are in templates/protocols/srv6/, templates/protocols/mpls/sr-mpls-entropy and templates/scenarios/sr-mpls-prefix-sid-sweep.

Layer stacks and samples

ethernet2 / ipv6 / ipv6_srh / udp|tcp|icmpv6   # a plain packet with an SRH
ethernet2 / ipv6 / ipv6_srh / ipv4 / ...       # H.Encaps → End.DT4 / End.DX4 (next header 4)
ethernet2 / ipv6 / ipv6_srh / ipv6 / ...       # H.Encaps → End.DT6 / End.DX6 (next header 41)
ethernet2 / ipv6 / ipv6_srh / ethernet2 / ...  # H.Encaps.L2 → End.DX2 (next header 143, RFC 8986)
ethernet2 / mpls / mpls / ... / ipv4|ipv6      # SR-MPLS label stack

An IPv6 Routing header (next header 43) decodes as ipv6_srh when its routing type (third octet of the header) is 4 and as the generic ipv6_route otherwise. IPv6 next header 143 (Ethernet) maps to ethernet2.

SampleContents
srv6-srh-udpIPv6/UDP with a three-segment SRH (two left); the UDP checksum is computed toward the last segment
srv6-h-encaps-ipv4IPv4/UDP encapsulated in outer IPv6 + SRH (End then End.DT4) for an L3VPN
srv6-end-dx2-hmacAn Ethernet frame (ARP) over an SRH with an HMAC TLV toward End.DX2 (L2VPN)
sr-mpls-entropyPrefix SID (SRGB + index as variables), adjacency SID, ELI + entropy label
sr-mpls-prefix-sid-sweep (scenario)Sweeps the prefix SID index over 1-100 with a per-packet entropy label

SRH fields

FieldAuto / ManualNotes
next_headerAutoFrom the next layer
hdr_ext_lenAutoLength in 8-octet units, not counting the first 8 octets
routing_typedefault 4
segments_leftManual (default 1)Index of the next segment to visit
last_entryAutoNumber of segments - 1
flags / tagManual
segment_listManualList of IPv6 addresses in reverse path order: element 0 is the last segment
tlvsManualPad1 / PadN / HMAC TLVs; the trailing Pad1 padding is Auto

Write segment_list in reverse path order. The IPv6 destination of a packet leaving the source is segment_list[segments_left] (the active segment); set ipv6.dst to it by hand (the IPv6 destination is not Auto).

Destination of upper-layer checksums

While segments_left is non-zero, the pseudo header of UDP / TCP / ICMPv6 checksums uses the final destination segment_list[0] instead of ipv6.dst (RFC 8200 §8.1). wpg handles this automatically, including when a generator changes segments_left (fast patch path). With segments_left = 0 it uses ipv6.dst. The generic ipv6_route (types 0 / 2 / 3) keeps its addresses as data octets and does not do this replacement.

TLVs

TLVTypeValue
pad10none (one octet)
padn4padding (any length)
hmac5d (1 bit), reserved (15 bits), hmac_key_id (32 bits), hmac (octets, Manual)

After the TLVs, the header is filled with zero octets (= Pad1) up to an 8-octet boundary automatically. The HMAC is not computed (compute it externally for your key and coverage and paste it in).

SR-MPLS helpers

SR-MPLS SIDs are ordinary MPLS labels, so a stack is built from mpls layers.

  • Reserved label names: label accepts names for the reserved labels 0-15: ipv4_explicit_null (0), router_alert (1), ipv6_explicit_null (2), implicit_null (3), entropy_label_indicator (7), gal (13), oam_alert (14), extension (15). Other labels are numbers.
  • Prefix SIDs: label = SRGB base + SID index. With the expr generator and variables, "${srgb_base} + ${sid_index}" follows the routers’ SRGB by changing only the variables (see sr-mpls-entropy). Add idx to reach many egress nodes in turn (see sr-mpls-prefix-sid-sweep).
  • Entropy labels (RFC 6790): put the entropy label right after an entropy_label_indicator (7) label, with TTL 0.
  • s (bottom of stack) is Auto.

Limitations / out of scope

  • The consistency of segments_left and last_entry (segments_left <= last_entry) is not checked.
  • ipv6.dst is not set to the active segment automatically.
  • No HMAC computation and no simulation of SRv6 behaviors (End / End.X / End.DT4 …): a SID’s behavior is only its address value.
  • No dedicated representation of compressed SIDs (uSID / CSID, RFC 9800); write them as 128-bit addresses.
  • SRGB / SRLB ranges are not checked.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ethernet2 · ipv6_route · ipv6_srh · mpls

PTP / ESMC / CFM / R-APS / 802.3ah OAM (P2)

Status: draft

Notes on PTP (IEEE 1588-2008), SyncE ESMC (ITU-T G.8264), Ethernet CFM / OAM (IEEE 802.1Q clause 21 = 802.1ag, ITU-T Y.1731) with the ERPS R-APS messages (ITU-T G.8032) and EFM OAM (IEEE 802.3 clause 57 = 802.3ah) (M7). The definitions live in crates/wpg-protocols/src/{ptp,esmc,cfm,efm_oam}.rs, the samples in templates/protocols/timing/ and templates/protocols/oam/.

Stacks and samples

ethernet2 / ptp_*                         # EtherType 0x88f7 (IEEE 1588 annex F)
ethernet2 / ipv4|ipv6 / udp / ptp_*       # UDP 319 (event messages), 320 (general messages)
ethernet2 / esmc                          # Slow Protocols 0x8809, subtype 0x0a
ethernet2 [/ dot1q] / cfm_*               # EtherType 0x8902, also behind 802.1Q / 802.1ad tags
ethernet2 / efm_oam_*                     # Slow Protocols 0x8809, subtype 0x03

The Slow Protocols EtherType 0x8809 is demultiplexed by its first octet, the subtype: 1 LACP, 2 Marker, 3 OAM, 0x0a ESMC (l2control::slow_protocols_peek; other subtypes decode as raw). Marker PDUs now decode as marker instead of lacp. UDP destination ports are not Auto: set 319 for Sync / Delay_Req / Pdelay_Req / Pdelay_Resp and 320 for the other messages.

SampleContents
ptp-sync-two-step-l2Two-step Sync over Ethernet, 8 per second, incrementing sequence ID
ptp-follow-up-l2Follow_Up with the precise origin timestamp and a correction
ptp-pdelay-req-l2 / ptp-pdelay-resp-l2 / ptp-pdelay-resp-follow-up-l2Peer delay exchange of IEEE 802.1AS (majorSdoId 1) to 01:80:c2:00:00:0e
ptp-delay-req-udp / ptp-delay-resp-udpDelay request / response over UDP/IPv4 (224.0.1.129)
ptp-announce-udpAnnounce of a GPS-locked grandmaster (clock class 6)
ptp-signaling-unicastUnicast negotiation: Request Unicast Transmission TLVs for Announce and Sync
ptp-management-getManagement GET of the default data set
ptp-genericA Sync written in the generic layout
esmc-ql-prc / esmc-event-dnuESMC information PDU (QL-PRC, Extended QL TLV) / event PDU (QL-DNU)
cfm-ccmCCM on VLAN 100 (MD level 5, MEP 10, ICC-based MEG ID, Port / Interface Status TLVs)
cfm-lbm / cfm-lbrLoopback message / reply with a Data TLV
cfm-ltm / cfm-ltrLinktrace message / reply with their egress identifier and Reply Ingress TLVs
cfm-genericA G.8031 Linear APS (OpCode 39) in the generic layout
y1731-ais / y1731-lck / y1731-csfAIS, LCK and CSF signals
y1731-tstTest signal with a Test TLV
y1731-lmm / y1731-lmr / y1731-slm / y1731-slr / y1731-1slLoss measurement (frame counters, synthetic loss)
y1731-dmm / y1731-dmr / y1731-1dmDelay measurement (IEEE 1588 timestamps)
erps-raps-nr-rb / erps-raps-sfR-APS(NR, RB) of the RPL owner / R-APS(SF) after a failure
efm-oam-information / efm-oam-genericInformation OAMPDU (Local / Remote Information TLVs)
efm-oam-eventEvent Notification (Errored Frame and Errored Symbol Period events)
efm-oam-variable-request / efm-oam-variable-responseVariable retrieval
efm-oam-loopbackLoopback Control (enable remote loopback)
efm-oam-organization-specificOrganization Specific OAMPDU

Generic layer and dedicated messages

PTP, CFM and 802.3ah OAM follow the IS-IS pattern: one protocol per message (PTP), OpCode (CFM) or code (OAM), plus a generic layer (ptp, cfm, efm_oam: the common header and the rest as data octets). The parser decodes the generic layer first and re-decodes it as the dedicated one from message_type / opcode / code; values without a dedicated definition (CFM Linear APS, MCC, EXM / VSM, …) stay generic. When building, every dedicated protocol sets the EtherType / subtype by itself.

Protocolmessage_typeBody
ptp_sync / ptp_delay_req0 / 1origin_timestamp_{seconds,nanoseconds}
ptp_pdelay_req2origin timestamp, 10 reserved octets
ptp_pdelay_resp3request_receipt_timestamp_*, requesting_port_{clock_identity,port_number}
ptp_follow_up8precise_origin_timestamp_*
ptp_delay_resp9receive_timestamp_*, requesting_port_*
ptp_pdelay_resp_follow_up10response_origin_timestamp_*, requesting_port_*
ptp_announce11origin timestamp, current_utc_offset, grandmaster_priority1/2, grandmaster_clock_{class,accuracy}, grandmaster_offset_scaled_log_variance, grandmaster_identity, steps_removed, time_source
ptp_signaling12target_port_*
ptp_management13target_port_*, starting_boundary_hops, boundary_hops, action

PTP

The 34-octet common header has major_sdo_id (transportSpecific), message_type, minor_version, version, message_length (Auto), domain_number, minor_sdo_id, flags (16 bits: two_step is bit 9, unicast bit 10, ptp_timescale bit 3, …), correction_field (signed, nanoseconds × 2^16), message_type_specific, the source port identity (clock_identity, port_number), sequence_id, control_field and log_message_interval (signed). The defaults of control_field and log_message_interval follow the message (0x7f where not applicable).

Every message ends with tlvs (16-bit type, 16-bit length of the value, Auto). They end at message_length, so the zero padding of a short Ethernet frame is not read as TLVs.

- protocol: ptp_signaling
  fields:
    flags: 0x0400 # unicast
    tlvs:
      - request_unicast_transmission: { message_type: announce, log_inter_message_period: 1, duration_field: 300 }
      - grant_unicast_transmission: { message_type: sync, log_inter_message_period: -4, duration_field: 300, renewal_invited: 1 }
TypeTLV (name)Value fields
0x0001managementmanagement_id, data_field (octets)
0x0002management_error_statusmanagement_error_id, management_id, reserved, display_data
0x0003organization_extensionorganization_id, organization_sub_type, data_field
0x0004 / 0x0005request_unicast_transmission / grant_unicast_transmissionmessage_type, log_inter_message_period, duration_field (grant: renewal_invited)
0x0006 / 0x0007cancel_unicast_transmission / acknowledge_cancel_unicast_transmissionmessage_type
0x0008path_tracepath_sequence (list of clock identities)
0x0009alternate_time_offset_indicatorkey_field, current_offset, jump_seconds, time_of_next_jump, display_name (length Auto)

ESMC

esmc is the OSSP header (subtype 0x0a, itu_oui 00-19-a7, itu_subtype 1), version (1), event_flag and the TLVs (8-bit type, 16-bit length including the 3-octet header, Auto): ql (ssm_code: prc, ssu_a, ssu_b, sec, dnu, and the option 2 codes) and extended_ql (enhanced_ssm_code, synce_clock_identity, flags (mixed EEC / eEEC, partial chain), cascaded_eeecs, cascaded_eecs). The padding after the TLVs decodes as one raw item.

CFM / Y.1731 / R-APS

The common header is md_level, version, opcode, the flags and first_tlv_offset; the flags are split per OpCode (CCM: rdi, period; LTM / LTR: use_fdb_only, fwd_yes, terminal_mep; AIS / LCK / CSF: period, CSF type; others: flags). first_tlv_offset is constant per OpCode (a warning when changed). The TLVs end with the End TLV (end, type 0); the Ethernet padding after it is padding, not more End TLVs (wpg-core Length::UntilTlv).

OpCodeProtocolFields
1cfm_ccmsequence_number, mep_id, maid (48 octets), tx_fcf, rx_fcb, tx_fcb
2 / 3cfm_lbr / cfm_lbmtransaction_id
4cfm_ltrtransaction_id, reply_ttl, relay_action
5cfm_ltmtransaction_id, ttl, original_mac, target_mac
33 / 35cfm_ais / cfm_lck(period only)
37cfm_tstsequence_number
40cfm_rapsrequest_state, sub_code, rb, dnf, bpr, node_id
42 / 43cfm_lmr / cfm_lmmtx_fcf, rx_fcf, tx_fcb
45cfm_1dmtx_timestamp_f_*, rx_timestamp_f_*
46 / 47cfm_dmr / cfm_dmmtx_timestamp_f_*, rx_timestamp_f_*, tx_timestamp_b_*, rx_timestamp_b_*
52cfm_csf(type and period)
53cfm_1slsource_mep_id, test_id, tx_fcf
54 / 55cfm_slr / cfm_slmsource_mep_id, responder_mep_id, test_id, tx_fcf, tx_fcb

TLVs (8-bit type, 16-bit length of the value, Auto): end (0), sender_id (1: chassis_id_length Auto, chassis_id_subtype, chassis_id, management_address octets), port_status (2), data_tlv (3: value), interface_status (4), reply_ingress / reply_egress (5 / 6: action, MAC, port ID octets), ltm_egress_identifier (7), ltr_egress_identifier (8), organization_specific (31), test (32: pattern_type, test_pattern).

R-APS (cfm_raps, OpCode 40) defaults to version 1 (G.8032v2), first_tlv_offset 32 and R-APS(NR, RB). Send it to 01:19:a7:00:00:<ring ID>, usually on the R-APS VLAN at MEL 7.

802.3ah OAM

Every OAMPDU starts with subtype (3), flags (link fault, dying gasp, critical event, local / remote evaluating and stable; default 0x0050) and code.

CodeProtocolFields
0x00efm_oam_informationtlvs: local_information / remote_information (oam_version, revision, multiplexer_action, parser_action, oam_configuration, max_oampdu_size, oui, vendor_specific_information), organization_specific, end
0x01efm_oam_event_notificationsequence_number, tlvs: errored_symbol_period, errored_frame, errored_frame_period, errored_frame_seconds_summary (timestamp, window, threshold, errors, error_running_total, event_running_total), organization_specific, end
0x02efm_oam_variable_requestvariable_descriptors (octets: branch, leaf, …, zero branch)
0x03efm_oam_variable_responsevariable_containers (octets: branch, leaf, width, value, …, zero branch)
0x04efm_oam_loopback_controlremote_loopback_command (1 enable, 2 disable)
0xfeefm_oam_organization_specificoui, data

Information / Event TLV lengths include the 2-octet header (Auto) and the list ends with end.

Not covered

  • PTP: the authentication / security TLVs (IEEE 1588-2019 annex P), the data fields of the Management TLVs per management ID, PTP over other transports (annexes C, E-G except IPv6 / Ethernet), state machines and timestamping on transmit.
  • CFM: the MAID / MEG ID is the 48 octets as sent (not split into name formats), the CRC-32 of the Test TLV is not computed; Linear APS, MCC, EXM / EXR and VSM / VSR have no dedicated definition (generic cfm).
  • 802.3ah OAM: variable descriptors / containers are octets; the OAM discovery state machine.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

lacp · marker · ptp · ptp_sync · ptp_delay_req · ptp_pdelay_req · ptp_pdelay_resp · ptp_follow_up · ptp_delay_resp · ptp_pdelay_resp_follow_up · ptp_announce · ptp_signaling · ptp_management · esmc · cfm · cfm_ccm · cfm_lbm · cfm_lbr · cfm_ltm · cfm_ltr · cfm_ais · cfm_lck · cfm_tst · cfm_raps · cfm_lmm · cfm_lmr · cfm_1dm · cfm_dmm · cfm_dmr · cfm_csf · cfm_slm · cfm_slr · cfm_1sl · efm_oam · efm_oam_information · efm_oam_event_notification · efm_oam_variable_request · efm_oam_variable_response · efm_oam_loopback_control · efm_oam_organization_specific · raw

MACsec / GTPv2-C / Diameter / SIP / RTP (P2)

Status: draft

Notes on MACsec (IEEE 802.1AE, structure only), GTPv2-C (3GPP TS 29.274), Diameter (RFC 6733, Credit-Control RFC 4006), SIP (RFC 3261) and RTP / RTCP (RFC 3550) (M7). The definitions live in crates/wpg-protocols/src/{macsec,gtpv2,diameter,sip,rtp}.rs, the samples in templates/protocols/l2/macsec.wpg.yaml, templates/protocols/mobile/ and templates/protocols/voip/.

Stacks and samples

ethernet2 / macsec                          # EtherType 0x88e5 (Auto); also after dot1q
ethernet2 / ipv4 / udp / gtpv2 [/ gtpv2]    # UDP 2123; a piggybacked message is a second gtpv2 layer
ethernet2 / ipv4 / tcp / diameter           # TCP 3868
ethernet2 / ipv4 / udp|tcp / sip            # UDP / TCP 5060
ethernet2 / ipv4 / udp / rtp / payload      # any port (explicit layer); UDP 5004 is decoded
ethernet2 / ipv4 / udp / rtcp_sr / rtcp_sdes ...  # compound RTCP; UDP 5005 is decoded

UDP / TCP destination ports are not Auto: set 2123, 3868, 5060, … (decoding also recognises the source port).

SampleContents
macsecEncrypted frame with an explicit SCI (association number 1, 48 octets of secure data, opaque ICV)
gtpv2-create-session-requestS11 Create Session Request: IMSI, MSISDN, Serving Network, RAT type, two F-TEIDs, APN, Selection Mode, PDN type, PAA, AMBR, Bearer Context
gtpv2-create-session-responseCreate Session Response: Cause, F-TEIDs, PAA, APN Restriction, Bearer Context with an S1-U F-TEID and a Charging ID
gtpv2-echo-requestEcho Request without TEID, Recovery IE
diameter-cerCapabilities-Exchange-Request with a Vendor-Specific-Application-Id (S6a)
diameter-ccr-initialInitial Credit-Control-Request with a Subscription-Id
sip-inviteINVITE over UDP with an SDP offer
sip-registerREGISTER over TCP without a body
rtp-pcmu50 packets of G.711 PCMU (sequence number and timestamp generators, 160-octet payload)
rtcp-sr-sdesSender Report with one report block and an SDES CNAME
rtcp-rr-byeReceiver Report, SDES CNAME and BYE with a reason
rtcp-feedback-appReceiver Report, a Picture Loss Indication (generic rtcp layer) and an APP packet

MACsec: structure only

The macsec layer is the SecTAG and the protected part of the frame:

FieldContents
v, es, sc, scb, e, cTCI bits. sc is Auto: set when sci holds an element
anAssociation number (2 bits)
slShort length (6 bits): the secure data length when it is below 48 octets, otherwise 0. Manual
pnPacket number (32 bits)
sci[] or [{ system_identifier, port_identifier }]
secure_dataOpaque octets: what you write is sent, nothing is encrypted
icv16 opaque octets: not computed

When parsing, the last 16 octets of the frame are the ICV and everything between the SecTAG and the ICV is the secure data. A frame shorter than the Ethernet minimum is padded after the ICV (as on the wire); parsing it back keeps the padding inside the secure data / ICV. Integrity-only frames (E = C = 0) are not decoded further: the user data stays in secure_data.

GTPv2-C: one layer is one message

The gtpv2 layer is the header (version 2, p, t, mp, message_type, message_length, teid, sequence_number, message_priority) and the IEs (ies).

  • t is Auto from teid: teid: [0x1001] sends a TEID, teid: [] (Echo) leaves it out.
  • message_length is Auto (the octets after the first four). The IEs end at that length, so a piggybacked message (p: 1) is the next gtpv2 layer.
  • An IE is an 8-bit type, a 16-bit length of the IE data, and a spare / instance octet that the length does not count (wpg-core TlvDef::uncounted_octets). Every typed IE has the spare and instance fields first.
- protocol: gtpv2
  fields:
    message_type: create_session_request
    teid: [0]
    ies:
      - imsi: { digits: "00 01 01 21 43 65 87 f9" }   # TBCD
      - fteid: { interface_type: s11_mme_gtp_c, teid: 0x1001, ipv4: 192.0.2.1 }
      - apn: { apn: "08 69 6e 74 65 72 6e 65 74" }    # DNS labels
      - bearer_context:
          ies:
            - ebi: { ebi: 5 }
            - bearer_qos: { pl: 9, qci: 9 }
TypeIE (name) and data fields
1 / 75 / 76imsi / mei / msisdn (digits, TBCD octets)
2cause (cause, pce, bce, cs, offending_ie)
3recovery (restart_counter)
71apn (apn, DNS label octets)
72ambr (uplink, downlink in kbps)
73ebi (ebi)
74ip_address / ip_address_ipv6 (address), by the IE length
77 / 78 / 84 / 86indication (flags), pco, bearer_tft, uli (data / tft octets)
79paa / paa_ipv6 / paa_ipv4v6 (pdn_type, ipv6_prefix_length, ipv6, ipv4), by the IE length
80bearer_qos (pci, pl, pvi, qci, mbr_uplink, mbr_downlink, gbr_uplink, gbr_downlink)
82rat_type
83serving_network (MCC / MNC digits)
87fteid / fteid_ipv6 / fteid_ipv4v6 (v4, v6, interface_type, teid, ipv4, ipv6), by the IE length
93bearer_context (ies: the IEs above, one level deep)
94 / 95charging_id, charging_characteristics
99pdn_type
114 / 127 / 128ue_time_zone, apn_restriction, selection_mode
255private_extension (enterprise_id, value)

Other IEs are kept as { type: N, data: "..." } (the data starts with the instance octet). GTPv1-C (version 1, also on UDP 2123) is not modelled: such a message decodes as gtpv2 with a version warning.

Diameter: header and AVPs

The diameter layer is the header (version, message_length (Auto), the r / p / e / t flags, command_code, application_id, hop_by_hop, end_to_end) and the AVPs (avps). The AVPs end at the message length, so a second message in the same TCP segment is the next layer (raw).

An AVP is a 32-bit code, the flags octet (between the code and the length: wpg-core TlvDef::head_octets), a 24-bit length counting the header and data but not the padding (Auto), the Vendor-ID when the V flag is set, and the data padded to 4 octets (Auto). Every typed AVP has the fields v (Auto from vendor_id), m, p, reserved, vendor_id ([] or [10415]), then its data:

Data typeAVPs (name)Data field
OctetString / UTF8String / DiameterIdentity / DiameterURIsession_id, origin_host, origin_realm, destination_host, destination_realm, product_name, user_name, error_message, route_record, proxy_host, proxy_state, class, redirect_host, service_context_id, subscription_id_data, …value (octets; write text as '"..."')
Unsigned32 / Timevendor_id, supported_vendor_id, auth_application_id, acct_application_id, origin_state_id, firmware_revision, session_timeout, experimental_result_code, cc_request_number, event_timestamp, …value
Unsigned64accounting_sub_session_idvalue
Enumeratedresult_code, disconnect_cause, auth_session_state, auth_request_type, re_auth_request_type, termination_cause, accounting_record_type, cc_request_type, subscription_id_type, multiple_services_indicatorvalue (names)
Addresshost_ip_address / host_ip_address_ipv6, by the AVP lengthaddress_family, address
Groupedvendor_specific_application_id, failed_avp, proxy_info, experimental_result, subscription_idavps (the AVPs above, one level deep)

Vendor-specific AVPs (3GPP and others) whose code is not listed are kept as { type: N, data: "..." } with the flags octet, the Vendor-ID and the value in data. Diameter over SCTP is built by putting the message octets into the user data of an SCTP DATA chunk; SCTP does not decode its user data (see SCTP).

SIP: text lines

The sip layer is text. start_line and every element of headers are CRLF-terminated lines (wpg-core Length::Until): write them without the CRLF, the builder adds it, and the empty line after the headers. body is the rest of the message (an SDP offer / answer, …).

- protocol: sip
  fields:
    start_line: '"INVITE sip:bob@example.com SIP/2.0"'
    headers:
      - '"Via: SIP/2.0/UDP 192.0.2.1:5060;branch=z9hG4bK74bf9"'
      - '"Content-Type: application/sdp"'
      - '"Content-Length: 132"'
    body: '"v=0\r\no=alice ...\r\n"'

Content-Length is an ordinary header line and stays Manual: keep it in step with the body (the samples do). A message without the empty line does not decode as sip.

RTP and RTCP

There is no well-known RTP port: the session ports come from SDP. Put the rtp / rtcp_* layer after udp explicitly; when parsing, only the IANA rtp-avp / rtcp-avp ports 5004 / 5005 select RTP / RTCP (tshark needs -d udp.port==N,rtp as well).

rtp is the fixed header, csrc (count cc Auto) and header_extension ([] or [{ profile, data }]: X bit and the length in words Auto, data is a list of 32-bit words; profile 0xBEDE is RFC 8285 one-byte elements). The media payload is the next layer (payload / raw). The padding bit and the padding octets are Manual.

RTCP is one layer per packet, so a compound packet is a stack of RTCP layers. The count (report_count / source_count) and length (32-bit words minus one) are Auto; every packet ends at its length.

LayerPacket typeBody fields
rtcp_sr200ssrc, ntp_timestamp_msw / lsw, rtp_timestamp, packet_count, octet_count, report_blocks, extension
rtcp_rr201ssrc, report_blocks, extension
rtcp_sdes202chunks: [{ ssrc, items: [{ type, text }] }] (item length Auto, null octet and padding Auto)
rtcp_bye203ssrcs, reason ([] or [{ text }])
rtcp_app204subtype (the count field), ssrc, name (4 octets), data
rtcpanycount, body (octets); parsing re-decodes it as the typed packet for 200-204

Not covered

  • MACsec encryption / ICV computation, XPN (64-bit packet numbers), decoding of integrity-only user data
  • GTPv1-C, GTPv2-C IEs not listed above as typed (ULI, Indication flags, PCO contents are octets), nested Bearer Contexts
  • Diameter vendor-specific AVP dictionaries (3GPP S6a / Gx / Gy …), grouped AVPs deeper than one level, demultiplexing Diameter from SCTP DATA chunks
  • SIP Content-Length Auto, header parsing into name / value, SIP over TLS (5061), multipart bodies
  • RTP payload formats, SRTP, RTCP feedback (RTPFB / PSFB) and XR bodies (kept as octets in rtcp)

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ipv4 · udp · ipv6 · macsec · gtpv2 · diameter · sip · rtp · rtcp · rtcp_sr · rtcp_rr · rtcp_sdes · rtcp_bye · rtcp_app · payload · raw

User-defined protocols (protocols.d)

Proprietary or in-house protocols that are not built in can be added as YAML files, without writing Rust. They become the same definition IR as the built-ins (wpg_core::ProtocolDef), so building (including Auto lengths and checksums), parsing (wpg import, the tree of the capture page), generators and the GUI builder and preview all work with them.

Loading them

WhereHow
wpg serve[protocols] dirs = ["/etc/wpg/protocols.d"] in wpg.toml plus --protocols-dir <DIR> (both are used)
Other subcommands (send / render / import / template lint / capture …)--protocols-dir <DIR> (repeatable) or the WPG_PROTOCOLS_DIR environment variable
Web UIAfter login it fetches the server’s definitions from GET /api/protocols/extensions and adds them to the in-browser catalog (again after a reload)

The *.yaml / *.yml files directly in each directory are loaded in file name order (subdirectories are not read). On an invalid definition the command stops with exit status 2 and prints the file and the reason. wpg config validate checks protocols.dirs too.

wpg render examples/acme-telemetry.wpg.yaml -o acme.pcapng --protocols-dir examples/protocols.d
wpg import acme.pcapng -o acme.wpg.yaml --protocols-dir examples/protocols.d

Reloading a running server

wpg serve reads the directories at startup. After adding, changing or removing files, reload them without a restart:

  • Web UI: Settings → User-defined protocols → Reload.
  • API: POST /api/protocols/reload (admin session and X-CSRF-Token, like other changes). The answer lists the directories and the files now in use; connected browsers get a protocols_changed event and fetch the definitions again.

The same directories are read again (a changed [protocols] dirs in wpg.toml needs a restart). If a file does not load, the answer is 422 invalid_protocols with details.file / details.reason, and the protocols in use stay as they were. Jobs that are already running keep the definitions they started with.

Every distinct set of definitions that is loaded stays in memory until the server exits (running jobs may still use it); loading a set that was loaded before reuses it. This is small, but restart now and then if you reload very often during development.

Tools: wpg protocols

CommandWhat it does
wpg protocols list [--json]Lists the protocols: id, name, layer and source (built-in, or the file of a user-defined one from --protocols-dir)
wpg protocols show <id> [--json]Prints a definition as an extension file (YAML), a starting point for a new protocol; --json prints the definition IR
wpg protocols check <file|dir>...Checks extension files without loading them anywhere; exit status 1 on errors

check reads each file, then merges them with the built-in protocols and the other files of --protocols-dir (so files may refer to each other). Errors name the file and the place in it, for example:

my.yaml: protocols[0].fields[2]: missing field `bits` at line 12 column 9
acme.yaml: bind[0]: `udp.dst_port` value 4789 is already bound to `vxlan`

To start from an existing protocol:

wpg protocols show udp > protocols.d/my-proto.yaml
# change `id` (and `name`), remove the `description_key` lines, edit the fields
wpg protocols check protocols.d/my-proto.yaml

File format

A file has protocols (new protocol definitions) and bind (entries added to the next-layer tables of existing protocols); either may be omitted. The repository has an example in examples/protocols.d/acme-telemetry.yaml.

protocols:
  - id: acme_tlm            # unique id (the name used as `protocol:` in templates)
    name: ACME Telemetry    # display name
    layer: l7               # palette class: l2 / l3 / l4 / l7 / payload
    fields:                 # in wire order
      - name: version
        type: { kind: uint, bits: 4 }
        default: { uint: 1 }
      - name: msg_type
        type:
          kind: enum
          bits: 4
          variants:
            - { value: 1, name: report }
            - { value: 2, name: alarm }
        default: { uint: 1 }
      - name: length
        type: { kind: uint, bits: 16 }
        auto: { kind: length, of: total }   # octets of the header and what follows
      - name: readings
        type: { kind: bytes, len: { kind: to_end } }

bind:
  - under: udp          # lower protocol
    value: 47000        # value of its selector field (UDP: dst_port, and src_port when parsing)
    protocol: acme_tlm

Protocol definitions

Each definition has the shape of the JSON returned by GET /api/protocols/{id}; wpg protocols show <id> prints an existing protocol in this format as a starting point.

  • Field types (type.kind): uint / int (bits), enum (bits, variants), flags (bits, flags), bytes (len), mac, ipv4, ipv6, nsap, cstring, tlv, list, padding, raw.
  • Defaults (default) are single-key maps naming the value type: { uint: 1 }, { bytes: [0, 1] }.
  • Auto computations (auto): lengths (kind: length, of: header | payload | total), checksums (kind: checksum, algorithm: internet | internet_pseudo_header | fletcher | crc32 | crc32c ...), next header (kind: next_protocol) and more.
  • Next-layer selection (next): to carry other protocols on top of this one, give field and a table (value → protocol).

Definitions go through the same checks as the built-ins when loaded (bit widths, octet alignment, Auto targets …), and unknown keys are errors.

Bindings (bind)

KeyMeaning
underLower protocol id (udp, tcp, ethernet2, dot1q, ipv4 …)
value / maxSelector field value (with max: the range value..=max)
protocolProtocol selected by the value (built-in or from an extension)
fieldSelector field name, only needed when the lower protocol has no next-layer table yet; otherwise it must match the existing selector

To bind by EtherType, add one entry per lower layer you need, e.g. ethernet2 and dot1q (after a VLAN tag).

Limitations

  • Built-in protocol ids can not be reused and built-in definitions can not be changed (a second file reusing an id is an error as well).
  • A value the lower protocol already maps to another protocol (UDP 4789 = VXLAN, for example) can not be bound.
  • UDP / TCP ports are not Auto: set dst_port in templates (bind is used for parsing and for the GUI’s suggestions).
  • Field descriptions (the Fluent description_key) are for built-ins; leave them out in user-defined protocols.
  • The protocol reference (wpg docs gen) covers the built-in protocols only.

Generated reference

Field reference of the protocols on this page (generated from the definitions):

ethernet2 · dot1q · ipv4 · tcp · udp · ipv6 · raw

Template schema

A template is a YAML file (.wpg.yaml; JSON with .wpg.json is equivalent) that describes one stream: a layer stack, optional generators that vary fields, and a transmit profile. The machine-readable definition is docs/schema/template.schema.json; print it with wpg template schema. Unknown keys are errors, so typos are caught. Check a file with wpg template lint FILE.

schema: 1                  # required
meta: { ... }              # required
variables: [ ... ]         # optional
layers: [ ... ]            # required, outermost first
packet: { ... }            # optional
stream: { ... }            # optional
tx: { ... }                # optional

meta

KeyMeaning
namerequired display name; unique within a library (the bundled library is tested for this)
descriptionfree text
descriptionsper-language text: ja: and en:
tagssearch tags. The bundled library uses protocol:<id>, layer:l2|l3|l4, scenario, malformed and topic words
author, createdfree text; created is a date or RFC 3339 timestamp

variables

Template arguments. Each entry has name, optional default (string, number or bool) and description. Use ${name} anywhere inside a field value or generator. Override at run time with --var name=value (wpg send, wpg render), or in the GUI. A variable with no default and no override is an error, and so is a ${…} that is not declared. Declared but unused variables give a warning.

Optional keys constrain the value. Without them any text is accepted:

KeyMeaning
typeuint, int, bool, string, ipv4, ipv6, mac or bytes; values use the same notation as fields (0x0800, 0200.0000.0001)
choicesthe allowed values
min, maxinclusive range, for uint and int
requireda value must be given at run time; the variable has no default
variables:
  - { name: vlan_id, type: uint, min: 1, max: 4094, default: 100 }
  - { name: target, type: ipv4, required: true }
  - { name: proto, type: uint, choices: [6, 17], default: 17 }

wpg template lint checks the default and the choices. A run-time value that does not fit (--var, or vars in the job and render API) is a template error that names the variable and what was expected: the CLI exits with status 3 and the server answers 422 invalid_template. A bool accepts true, false, 1 and 0 and is substituted as 1 or 0. The job form in the GUI shows a matching input for each variable.

layers

Each entry is protocol (an id from the catalog, see the Protocol reference), fields and generators.

fields

Fields you write are Manual; fields you omit (or set to auto) keep their default or are computed (lengths, checksums, next-protocol numbers). Values use human notation:

TypeExamples
integer64, 0x0800, 0b101
MAC / IPv4 / IPv602:00:00:00:00:01, 192.0.2.1, 2001:db8::1 (quote MACs made only of digits, such as "00:11:22:33:44:55", because YAML can read them as numbers)
bytes"00 01 02 03" (always quoted); text as '"text"' with \r, \n, \t escapes
text line (SIP lines, CRLF-terminated)start_line: '"INVITE sip:bob@example.com SIP/2.0"' (the terminator is added automatically)
enuma number or a variant name: ethertype: arp, oper: request, type: echo_request
flagsbit names joined by |: flags: syn|ack, flags: df
TLV list (TCP/IPv4 options)- mss: 1460, - sack_permitted, - nop, - timestamps: { tsval: 1, tsecr: 0 }, - { type: 99, data: "01 02" }
list / TLV list as verbatim octetsnlri: "18 c6 33 64" (a quoted hex string instead of the list; written by the import for content it cannot decode)

Deliberately wrong values are accepted: a Manual length or checksum is used as written, and wpg template lint reports the mismatch as a warning (diag-*). That is how the samples in templates/malformed/ are made.

generators

A map from field name to a generator, either the full form or the shorthand used by the GUI:

kindParametersShorthandMeaning
rangestart, end, step (default 1)192.168.1.1-192.168.5.254, 1-1024inclusive sweep; wraps around when the count is larger
range (CIDR)10.0.0.0/22host addresses of a block
listvalues1,5,9cycle through values
randommin, max, seeduniform random (integers, IPv4, IPv6)
random_macoui, seed00:11:22:*random MAC, optionally with a fixed prefix
counterstart, step, wrapincrementing value; unbounded unless wrap is set
filepathvalues read from a file
exprexprcomputed value

A generator and a fixed value on the same field produce a lint warning.

Expressions (expr)

An expr generator computes an integer for every packet. The result is written into the field like any other value, so it can fill numbers, IPv4 / IPv6 addresses and MAC addresses.

ElementMeaning
12, 0x1f, 0b101literals (decimal, hexadecimal, binary)
idxthe packet index in the stream (0, 1, 2, …)
$field, $<layer>.fieldthis packet’s value of another generated field; <layer> is written as in stream.order ($0.src and $ethernet2.src both name the src generator of the first layer; $ipv4[1].src is the second ipv4)
+ - * / %, << >>, & ^ |, unary - ~C-like operators and precedence; integer arithmetic (128-bit, wrapping)
hash(x), crc(x)FNV-1a 64 / CRC-32 of x (as 8 big-endian octets): spreads sequential values
rand(min, max)a random value between min and max, fixed per packet index and stream.seed
min(a, ...), max(a, ...)smallest / largest argument

A reference can only name a field that has a generator in the same template; fixed field values are not visible (put them in a variable and write ${name} instead, which is substituted before the expression is parsed). An expr can read another expr only if that one comes earlier in the template. Examples from the bundled library:

generators:
  chaddr: { kind: expr, expr: "$0.src" }                          # copy the Ethernet source MAC (dhcp-discover-flood)
  xid: { kind: expr, expr: "rand(0, 0xffffffff)" }               # a reproducible random transaction ID
  label: { kind: expr, expr: "${srgb_base} + ${first_index} + idx" } # SR-MPLS prefix SIDs (sr-mpls-prefix-sid-sweep)

packet

KeyDefaultMeaning
pad_to_mintruezero-pad to the 60-octet Ethernet minimum (FCS excluded)
fcsnoneauto appends a correct CRC-32, bad a wrong one, none nothing

stream

How generators combine and how long the stream is.

KeyMeaning
modezip (default, lockstep), product (last varies fastest) or nested
orderfor nested: fields from slowest to fastest as <layer>.<field>, where <layer> is a 0-based index, a protocol id unique in the stack (dot1q.vid, arp.tpa), or <protocol>[<n>] for the n-th (0-based) occurrence of a protocol that appears more than once (ipv4[1].src is the inner IPv4 of a tunnel)
countnumber of packets; default is tx.count, else the natural length of the generators
seedseed for random generators; makes the stream reproducible

Unbounded generators (a counter without wrap) need a count and cannot be in the inner position of product or nested.

tx

KeyMeaning
countpackets to send (no count and no duration_secs means run until stopped)
duration_secstime limit in seconds
rate1000pps, 1Mpps, 10Gbps, 50%, ifg=10us
burstframes sent back to back

Command-line options of wpg send override these.

Overriding values from the command line

wpg send, wpg render, wpg template show and wpg bench --template change a template for one run without editing the file:

OptionEffect
--vars-file FILEVariable values from a YAML or JSON map (dst_ip: 10.1.2.3).
--var NAME=VALUEOne variable value (repeatable). Wins over --vars-file, which wins over the template’s default.
--set LAYER.FIELD=VALUEFixes a field to a value, written as in fields:. The field becomes Manual and loses any generator.
--gen LAYER.FIELD=GENGives a field a generator and drops its fixed value.

LAYER is a protocol id (its first layer: ipv4), the n-th layer of a protocol counting from 0 (ipv4[1] is the inner header of IP-in-IP) or a 0-based layer index (2). FIELD is a field name from the protocol reference. An unknown layer or field stops with exit status 3 and lists the template’s layers or the closest field names. Every variable in --vars-file must be declared in the template, as with --var.

GEN is one of:

ShorthandGenerator
range:A..B, range:A..B/STEPrange from A to B inclusive
list:a,b,clist
random, random:MIN..MAXrandom
counter, counter:START, counter:START/STEPcounter
expr:EXPRexpr
anything elsethe shorthand of generators:: 10.0.0.1-10.0.0.9, 10.0.0.0/24, 1,5,9, 00:11:22:*
$ wpg render templates/examples/eth-ipv4-udp-range.wpg.yaml -o out.pcapng --count 100 \
    --vars-file lab.yaml --set ipv4.ttl=1 --gen udp.src_port=range:1024..1123

Payload layers

payload is not a wire protocol; its fields control generation: mode (fixed, pattern, random, counter), data, length, seed, and for counter the counter_offset, counter_width (u32 or u64) and counter_value (usually fed by a counter generator). raw places bytes as given.

Lint checks

KeySeverityMeaning
lint-schema-versionerrorunsupported schema
lint-missing-namewarningempty meta.name
lint-no-layerserrorno layers
lint-unknown-protocol, lint-unknown-fielderrornot in the catalog
lint-invalid-value, lint-invalid-generatorerrorvalue or generator does not fit the field type
lint-unknown-variable, lint-missing-variableerrorundeclared variable / variable without a value
lint-unused-variablewarningdeclared but unused
lint-next-protocol-manualwarningthe next layer is not in the previous layer’s binding table, so its next-protocol field cannot be Auto
lint-field-and-generatorwarninga field has both a fixed value and a generator
diag-*error / warningdiagnostics of the built packet, for example a checksum or length that differs from the computed value

The bundled library

templates/ is loaded as a library by default and is checked by crates/wpg-template/tests/samples.rs:

FolderContents
examples/five small starting points
protocols/l2, l3, l4, payload, frameone or more samples for every protocol in the catalog, plus jumbo, minimum-size, runt and FCS cases
scenarios/ready-made tests: ARP sweeps, SYN flood and port scan, QinQ, NDP and RA, ping and TTL sweeps, QoS matrix, MTU probe, frame-size sweep, MAC flood, SR-MPLS prefix SID sweep, DHCP DISCOVER load
interop/interop checks against real devices and FRR: OSPFv2 2-Way, RIPv2 routes, IS-IS adjacency Up, VRRPv3 preemption, PIM neighbor, LDP discovery, BFD session Up (interop tag; procedure in the operations guide, “Interop checks”)
malformed/deliberately broken packets (bad checksums, wrong lengths, truncation, bad FCS); they lint with warnings by design and are tagged malformed

List them with wpg template list templates.

Key reference (generated)

Generated from the JSON Schema of the template format (wpg template schema); the descriptions are the doc comments of the code (English). Template is the document root.

Template

A .wpg.yaml template: one packet (+ generators) = one stream.

KeyTypeRequiredDescription
layersTemplateLayer[]Layer stack, outermost first.
metaMetayesMetadata.
packetPacketOptionsFrame-level options (padding, FCS).
schemaintegeryesSchema version, see [SCHEMA_VERSION].
streamStreamOptionsStream expansion options.
txTxProfileTransmit profile.
variablesVariable[]Template variables.

FcsChoice

Frame check sequence choice.

ValueDescription
"auto"Append the correct CRC-32.
"bad"Append a deliberately wrong CRC-32.
"none"No FCS (what capture / TX backends usually expect).

FieldInput

A field value as written in YAML / JSON: a scalar in human notation or a structured value for TLV (options) and list fields.

  • scalars: 64, "192.168.1.1", 0x0800, syn|ack (flag names), ipv4 (enum variant names), auto. Hex byte strings must be quoted ("00 01 02");
  • TLV: a list of items, each a bare variant name (nop), a one-key map ({ mss: 1460 }, { timestamps: { tsval: 1, tsecr: 0 } }) or the explicit form { type: 99, data: "01 02" } / { name: mss, length: 4, fields: { value: 1 } };
  • list: a list of scalars, or of maps for lists of field groups.
ValueDescription
nullEmpty (~): e.g. an option without value.
booleantrue / false (1 / 0).
integerUnsigned integer.
integerNegative integer.
stringText in human notation.
FieldInput[]Sequence (TLV items, list elements).
map<string, FieldInput>Mapping (TLV item, field group).

Generator

Field value generator, tagged by kind.

kind: "range"

KeyTypeRequiredDescription
endstring | integeryes
kind"range"yes
startstring | integeryes
stepinteger

kind: "list"

KeyTypeRequiredDescription
kind"list"yes
values(string | integer)[]yes

kind: "random"

KeyTypeRequiredDescription
kind"random"yes
maxstring | integer
minstring | integer
seedinteger

kind: "random_mac"

KeyTypeRequiredDescription
kind"random_mac"yes
ouistring
seedinteger

kind: "counter"

KeyTypeRequiredDescription
kind"counter"yes
startinteger
stepinteger
wrapinteger

kind: "file"

KeyTypeRequiredDescription
kind"file"yes
pathstringyes

kind: "expr"

KeyTypeRequiredDescription
exprstringyes
kind"expr"yes

GeneratorSpec

A generator of a layer field: either a full [Generator] or the human shorthand of the GUI (192.168.1.1-192.168.5.254, 10.0.0.0/24, 1,5,9, 00:11:22:*).

ValueDescription
GeneratorFull form, e.g. { kind: range, start: 192.168.1.1, end: 192.168.1.254 }.
stringShorthand parsed with wpg_core::notation::parse_generator.

Meta

Template metadata.

KeyTypeRequiredDescription
authorstring | nullAuthor.
createdstring | nullCreation timestamp (RFC 3339 or a plain date).
descriptionstring | nullFree-form description.
descriptionsmap<string, ``string``>Localised descriptions keyed by language tag (ja, en).
namestringyesDisplay name.
tagsstring``[]Tags for search / grouping.

PacketOptions

Frame-level packet options.

KeyTypeRequiredDescription
fcsFcsChoiceFrame check sequence.
pad_to_minbooleanZero-pad to the minimum frame length (Ethernet: 60 octets).

Scalar

A YAML scalar; variable defaults may be written as numbers.

ValueDescription
string
integer
integer
boolean

StreamMode

How generators of several fields are combined (see wpg_core::stream::Mode).

ValueDescription
"zip"Advance all generators in lockstep.
"product"Cartesian product, the last generator varies fastest.
"nested"Product with an explicit priority given by [StreamOptions::order].

StreamOptions

Stream expansion options.

KeyTypeRequiredDescription
countinteger | nullNumber of packets; defaults to tx.count, then to the natural length.
modeStreamModeCombination mode of the generators.
orderstring``[]For nested: fields from the slowest to the fastest, as <layer>.<field> where <layer> is a 0-based index, a protocol id (ipv4.src) or the n-th occurrence of a protocol (ipv4[1].src).
seedinteger | nullSeed for random generators.

TemplateLayer

One layer of the template’s packet.

KeyTypeRequiredDescription
fieldsmap<string, FieldInput>Manually set fields in human notation (192.168.1.1, 0x0800, syn|ack, ${src_ip}). Unlisted fields use their default or Auto value; the literal auto also leaves a field Auto. TLV / list fields take structured values.
generatorsmap<string, GeneratorSpec>Generators varying fields across the stream.
protocolstringyesProtocol id from the catalog (e.g. ethernet2).

TxProfile

How the stream is transmitted.

KeyTypeRequiredDescription
burstinteger | nullBurst size in packets.
countinteger | nullNumber of packets (None together with duration_secs: None = infinite).
duration_secsnumber | nullDuration limit in seconds.
ratestring | nullRate in human notation: 1000pps, 1Mpps, 10Gbps, 50%.

VarType

Value type of a template variable (the field-type names of the protocol catalog).

ValueDescription
"uint"Unsigned integer: 64, 0x0800, 0b101.
"int"Signed integer: -1, +5, 0x10.
"bool"true / false (or 1 / 0); substituted as 1 / 0.
"string"Any text.
"ipv4"IPv4 address.
"ipv6"IPv6 address.
"mac"MAC address.
"bytes"Octets in hex: "00 01 02".

Variable

A template argument (${name} placeholder) overridable at run time.

KeyTypeRequiredDescription
choicesScalar[]Allowed values; any other value is rejected.
defaultScalar | nullDefault value (human notation; numbers and booleans are accepted too).
descriptionstring | nullDescription shown in the GUI / CLI.
maxinteger | nullLargest allowed value (type: uint / int only).
mininteger | nullSmallest allowed value (type: uint / int only).
namestringyesPlaceholder name.
requiredbooleanA value must be given at run time; the variable has no default.
typeVarType | nullValue type; values (default, --var, job vars) are checked against it. Without a type any text is accepted.

API reference

wpg-server serves a REST (JSON) API under /api and pushes live statistics, job state changes and logs over a WebSocket (GET /api/ws). This page is generated from the OpenAPI document of the server (utoipa). A running server serves the same document at /api/openapi.json with Swagger UI at /api/docs/, and a copy is kept in docs/schema/openapi.json. Log in with POST /api/auth/login (or POST /api/auth/setup on first run); the wpg_session cookie then authenticates every request, and POST / PUT / DELETE must also send the CSRF token of GET /api/auth/status in the X-CSRF-Token header. Errors are a JSON object error with code, message (in the language of Accept-Language) and details. The endpoint and schema descriptions below come from the code.

Endpoints

TagEndpointSummary
authPOST /api/auth/loginLogs in (rate limited per client address: 5 failures a minute, then an exponentially growing lock-out up to 15 minutes). Requires Content-Type: application/json.
authPOST /api/auth/logoutLogs out (needs X-CSRF-Token when the session is live) and clears the cookies.
authPOST /api/auth/setupFirst-run setup: sets the admin password and logs in. Only while no password is configured, and only from a loopback client unless the server runs with --allow-insecure. Requires Content-Type: application/json.
authGET /api/auth/statusAuthentication state of the caller (never requires a session).
authGET /api/tokensAPI tokens (admins: all; others: their own), oldest first.
authPOST /api/tokensCreates a token for the logged-in user, with that user’s role. The response is the only place the secret appears.
authDELETE /api/tokens/{id}Revokes (deletes) a token; requests with it fail from now on.
systemGET /api/healthLiveness probe.
systemGET /api/system/backendsTransmit backends of this build.
systemGET /api/system/doctorSelf-diagnosis (wpg doctor --json), with localised summary / fix.
systemGET /api/system/ifacesNetwork interfaces with usable (up, running, not loopback) and allowed (by tx.allowed_ifaces).
systemGET /api/versionBuild information.
protocolsGET /api/protocolsThe catalog in palette order.
protocolsGET /api/protocols/extensionsThe user-defined protocol files in use ([protocols] dirs, --protocols-dir; loaded at startup or by POST /api/protocols/reload): their definitions and bindings, so that the web UI can add them to its in-browser catalog. Empty without extensions.
protocolsPOST /api/protocols/reloadReads the user-defined protocol directories of the server again ([protocols] dirs, --protocols-dir) and switches the catalog to what they hold now; WebSocket clients get a protocols_changed event. Jobs that are already running keep the catalog they started with. On an error nothing changes. Admin only.
protocolsGET /api/protocols/{id}The full definition (wpg_core::ProtocolDef): fields with types, defaults, auto computations and bindings. Every description_key gets a localised description next to it.
packetsPOST /api/lintChecks a template (wpg template lint). A template that does not even parse is reported as a single error at path "".
packetsPOST /api/parseDecodes raw bytes into layers (Hex paste import).
packetsPOST /api/renderRenders packets of a template (preview).
templatesGET /api/templatesLists / searches templates.
templatesPOST /api/templatesCreates a template in the user directory (file name from meta.name).
templatesPOST /api/templates/importImports a .wpg.yaml (or JSON) document into the user directory.
templatesGET /api/templates/{id}One template (also marks it as recently used).
templatesPUT /api/templates/{id}Replaces a user template.
templatesDELETE /api/templates/{id}Deletes a user template.
templatesPOST /api/templates/{id}/duplicateCopies a template (library or user) into the user directory.
templatesGET /api/templates/{id}/exportDownloads a template as .wpg.yaml (the file itself, comments included).
templatesPOST /api/templates/{id}/favoriteSets (or, without a body, toggles) the favourite flag.
jobsGET /api/jobsAll live jobs (created, running and recently finished), newest first.
jobsPOST /api/jobsCreates (and by default starts) a job.
jobsGET /api/jobs/historyFinished jobs (last 100), newest first.
jobsGET /api/jobs/{id}One job (live or from the history).
jobsDELETE /api/jobs/{id}Removes a job (a running one is stopped first and recorded in the history).
jobsPOST /api/jobs/{id}/pausePauses a running job.
jobsPOST /api/jobs/{id}/resumeResumes a paused job.
jobsPOST /api/jobs/{id}/startStarts a job created with start: false.
jobsGET /api/jobs/{id}/statsLatest statistics snapshot of a job.
jobsPOST /api/jobs/{id}/stopStops a job (asynchronously; watch job_state or poll the job).
jobsGET /api/stats/overviewDashboard summary.
capturesGET /api/capturesAll captures (running and the last finished ones), newest first.
capturesPOST /api/capturesStarts a capture.
capturesGET /api/captures/backendsReceive backend availability on this build / OS.
capturesPOST /api/captures/filterChecks a capture filter without starting a capture.
capturesGET /api/captures/{id}One capture.
capturesDELETE /api/captures/{id}Removes a capture (a running one is stopped first; a saved pcapng file stays on disk).
capturesGET /api/captures/{id}/packetsThe first N matching frames of a capture (live while it runs).
capturesGET /api/captures/{id}/pcapngThe pcapng file of a finished capture started with save.
capturesPOST /api/captures/{id}/stopStops a running capture (asynchronously; watch capture_state).
eventsGET /api/wsWebSocket upgrade.
terminalGET /api/terminal/known-hostsTrusted SSH host keys (<data_dir>/terminal/known_hosts).
terminalDELETE /api/terminal/known-hosts/{host}/{port}Forgets the host key(s) of host:port (after a legitimate key change).
terminalGET /api/terminal/logsSession logs, newest first.
terminalGET /api/terminal/logs/{name}Downloads a session log (text/plain, also while it is being written).
terminalDELETE /api/terminal/logs/{name}Deletes a session log (not one that is being written).
terminalGET /api/terminal/statusConfiguration and running sessions (also when the terminal is disabled, so the UI can explain how to enable it).
terminalGET /api/terminal/wsOpens a terminal session (WebSocket). Send connect first; see TerminalClientMessage / TerminalServerMessage. Remote output arrives as binary frames, keystrokes may be sent as binary frames or input messages.
snmpGET /api/snmp/captureRecording state.
snmpPOST /api/snmp/captureStarts / stops the recording of every SNMP datagram this server sends or receives (requests, responses, traps), or clears it.
snmpGET /api/snmp/capture/downloadThe recorded frames as a pcap / pcapng file (Ethernet / IP / UDP synthesised around the real datagrams; placeholder MAC addresses).
snmpPOST /api/snmp/getGetRequest.
snmpPOST /api/snmp/getbulkGetBulkRequest (v2c / v3).
snmpPOST /api/snmp/getnextGetNextRequest.
snmpPOST /api/snmp/informSends an InformRequest (v2c / v3) and waits for the acknowledgement.
snmpGET /api/snmp/mibsLoaded MIB modules with their load state.
snmpPOST /api/snmp/mibsUploads MIB files (stored under <data_dir>/mibs, loaded at once).
snmpGET /api/snmp/mibs/nodeDetails of a MIB node (longest-prefix match for instances).
snmpGET /api/snmp/mibs/searchFinds MIB objects by name (for OID autocompletion).
snmpGET /api/snmp/mibs/treeOne level of the MIB tree.
snmpDELETE /api/snmp/mibs/{module}Deletes an uploaded module (its whole file). Bundled modules cannot be deleted.
snmpGET /api/snmp/receiverReceiver state.
snmpPOST /api/snmp/receiver/startStarts (or restarts) the trap / inform receiver.
snmpPOST /api/snmp/receiver/stopStops the receiver.
snmpPOST /api/snmp/setSetRequest.
snmpGET /api/snmp/statusWhether the SNMP tool is enabled, with MIB / receiver / recording summaries.
snmpPOST /api/snmp/trapSends a trap (v1 Trap-PDU, SNMPv2-Trap, or a v3 trap with this server as the authoritative engine). The result lists the bindings sent.
snmpGET /api/snmp/trapsReceived notifications, newest first (also pushed as snmp_trap events on the WebSocket).
snmpDELETE /api/snmp/trapsForgets the received notifications.
snmpPOST /api/snmp/walkWalks one or more subtrees (GetBulk on v2c / v3, GetNext on v1); conceptual tables in the result are also returned as rows × columns.
dhcpGET /api/dhcpState, settings and counters.
dhcpPUT /api/dhcpSaves the settings; a running server restarts with them.
dhcpGET /api/dhcp/activityRecent requests and replies, newest first (wpg_dhcp::Activity).
dhcpDELETE /api/dhcp/activityClears the activity log.
dhcpGET /api/dhcp/leasesLeases (wpg_dhcp::Lease: kind v4 / na / pd, addr, plen, client, iaid, mac, hostname, state, expires, updated).
dhcpDELETE /api/dhcp/leasesDeletes one lease (key) or all of them. The client keeps using the address until it renews.
dhcpPOST /api/dhcp/startStarts (or restarts) the server; it also starts at boot until stopped.
dhcpPOST /api/dhcp/stopStops the server (and its start at boot).

auth

Login, logout and first-run setup.

POST /api/auth/login

Logs in (rate limited per client address: 5 failures a minute, then an exponentially growing lock-out up to 15 minutes). Requires Content-Type: application/json.

Request body: application/json LoginRequest

Responses

StatusDescriptionBody
204Logged in; Set-Cookie: wpg_session, wpg_csrf
401unauthorized / setup_requiredapplication/json ErrorBody
415Not JSONapplication/json ErrorBody
429rate_limited: details.retry_after_secs, Retry-Afterapplication/json ErrorBody

POST /api/auth/logout

Logs out (needs X-CSRF-Token when the session is live) and clears the cookies.

Responses

StatusDescriptionBody
204Logged out
403csrf_failedapplication/json ErrorBody

POST /api/auth/setup

First-run setup: sets the admin password and logs in. Only while no password is configured, and only from a loopback client unless the server runs with --allow-insecure. Requires Content-Type: application/json.

Request body: application/json SetupRequest

Responses

StatusDescriptionBody
204Password set; Set-Cookie: wpg_session, wpg_csrf
400Passwords differ / too shortapplication/json ErrorBody
403forbidden: remote clientapplication/json ErrorBody
409already_configuredapplication/json ErrorBody
415Not JSONapplication/json ErrorBody

GET /api/auth/status

Authentication state of the caller (never requires a session).

Responses

StatusDescriptionBody
200Stateapplication/json AuthStatus

GET /api/tokens

API tokens (admins: all; others: their own), oldest first.

Responses

StatusDescriptionBody
200Tokens (without secrets)application/json TokenInfo[]
403forbidden: bearer requests cannot manage tokensapplication/json ErrorBody

POST /api/tokens

Creates a token for the logged-in user, with that user’s role. The response is the only place the secret appears.

Request body: application/json CreateToken

Responses

StatusDescriptionBody
201Createdapplication/json CreatedToken
400Invalid name or expiryapplication/json ErrorBody
403forbidden: bearer requests cannot manage tokensapplication/json ErrorBody

DELETE /api/tokens/{id}

Revokes (deletes) a token; requests with it fail from now on.

Parameters

NameInTypeRequiredDescription
idpathintegeryesToken id

Responses

StatusDescriptionBody
204Revoked
403forbidden: bearer requests cannot manage tokensapplication/json ErrorBody
404Unknown idapplication/json ErrorBody

system

Health, version, interfaces, self-diagnosis and transmit backends.

GET /api/health

Liveness probe.

Responses

StatusDescriptionBody
200The server is upapplication/json Health

GET /api/system/backends

Transmit backends of this build.

Responses

StatusDescriptionBody
200Backendsapplication/json Backends

GET /api/system/doctor

Self-diagnosis (wpg doctor --json), with localised summary / fix.

Responses

StatusDescriptionBody
200{ ok, locale, checks: [...] }application/json object

GET /api/system/ifaces

Network interfaces with usable (up, running, not loopback) and allowed (by tx.allowed_ifaces).

Parameters

NameInTypeRequiredDescription
refreshquerybooleanRe-read the interfaces instead of using the few-seconds cache.

Responses

StatusDescriptionBody
200Interfaces (wpg ifaces --json plus usable / allowed)application/json object``[]
500Enumeration failedapplication/json ErrorBody

GET /api/version

Build information.

Responses

StatusDescriptionBody
200Version and build infoapplication/json VersionInfo

protocols

The protocol catalog (see the protocol reference).

GET /api/protocols

The catalog in palette order.

Responses

StatusDescriptionBody
200Catalog summaryapplication/json ProtocolSummary[]

GET /api/protocols/extensions

The user-defined protocol files in use ([protocols] dirs, --protocols-dir; loaded at startup or by POST /api/protocols/reload): their definitions and bindings, so that the web UI can add them to its in-browser catalog. Empty without extensions.

Responses

StatusDescriptionBody
200Extension files (protocols, bind, source)application/json object``[]

POST /api/protocols/reload

Reads the user-defined protocol directories of the server again ([protocols] dirs, --protocols-dir) and switches the catalog to what they hold now; WebSocket clients get a protocols_changed event. Jobs that are already running keep the catalog they started with. On an error nothing changes. Admin only.

Responses

StatusDescriptionBody
200Loaded filesapplication/json ReloadResult
403forbidden: not an adminapplication/json ErrorBody
422invalid_protocols: a file does not load (details.file, details.reason)application/json ErrorBody

GET /api/protocols/{id}

The full definition (wpg_core::ProtocolDef): fields with types, defaults, auto computations and bindings. Every description_key gets a localised description next to it.

Parameters

NameInTypeRequiredDescription
idpathstringyesProtocol id

Responses

StatusDescriptionBody
200Protocol definition IRapplication/json object
404Unknown protocolapplication/json ErrorBody

packets

Rendering, decoding and linting packets.

POST /api/lint

Checks a template (wpg template lint). A template that does not even parse is reported as a single error at path "".

Request body: application/json LintRequest

Responses

StatusDescriptionBody
200Lint resultapplication/json LintResponse
400Bad requestapplication/json ErrorBody

POST /api/parse

Decodes raw bytes into layers (Hex paste import).

Request body: application/json ParseRequest

Responses

StatusDescriptionBody
200Decoded packetapplication/json ParseResponse
400Invalid hexapplication/json ErrorBody
422Cannot be decodedapplication/json ErrorBody

POST /api/render

Renders packets of a template (preview).

Request body: application/json RenderRequest

Responses

StatusDescriptionBody
200Rendered packetsapplication/json RenderResponse
400Bad requestapplication/json ErrorBody
422Invalid template (details: lint issues)application/json ErrorBody

templates

The template library.

GET /api/templates

Lists / searches templates.

Parameters

NameInTypeRequiredDescription
qquerystringCase-insensitive search in id, name, descriptions, tags and protocols.
tagquerystringRequired tag(s), comma separated.
favoritequerybooleanOnly favourites (true) / non-favourites (false).
sourcequeryTemplateSourceOnly user or library templates.

Responses

StatusDescriptionBody
200Templatesapplication/json TemplateList

POST /api/templates

Creates a template in the user directory (file name from meta.name).

Request body: application/json object — Template (JSON form of .wpg.yaml)

Responses

StatusDescriptionBody
201Createdapplication/json TemplateDetail
422Invalid templateapplication/json ErrorBody

POST /api/templates/import

Imports a .wpg.yaml (or JSON) document into the user directory.

Request body: text/yaml string — Template YAML

Responses

StatusDescriptionBody
201Importedapplication/json TemplateDetail
422Invalid templateapplication/json ErrorBody

GET /api/templates/{id}

One template (also marks it as recently used).

Parameters

NameInTypeRequiredDescription
idpathstringyesTemplate id

Responses

StatusDescriptionBody
200Templateapplication/json TemplateDetail
404Unknown idapplication/json ErrorBody
422The file does not parseapplication/json ErrorBody

PUT /api/templates/{id}

Replaces a user template.

Parameters

NameInTypeRequiredDescription
idpathstringyesTemplate id

Request body: application/json object — Template (JSON form of .wpg.yaml)

Responses

StatusDescriptionBody
200Updatedapplication/json TemplateDetail
403Read-only library templateapplication/json ErrorBody
404Unknown idapplication/json ErrorBody
422Invalid templateapplication/json ErrorBody

DELETE /api/templates/{id}

Deletes a user template.

Parameters

NameInTypeRequiredDescription
idpathstringyesTemplate id

Responses

StatusDescriptionBody
204Deleted
403Read-only library templateapplication/json ErrorBody
404Unknown idapplication/json ErrorBody

POST /api/templates/{id}/duplicate

Copies a template (library or user) into the user directory.

Parameters

NameInTypeRequiredDescription
idpathstringyesTemplate id

Responses

StatusDescriptionBody
201The copyapplication/json TemplateDetail
404Unknown idapplication/json ErrorBody

GET /api/templates/{id}/export

Downloads a template as .wpg.yaml (the file itself, comments included).

Parameters

NameInTypeRequiredDescription
idpathstringyesTemplate id

Responses

StatusDescriptionBody
200YAMLtext/yaml string
404Unknown idapplication/json ErrorBody

POST /api/templates/{id}/favorite

Sets (or, without a body, toggles) the favourite flag.

Parameters

NameInTypeRequiredDescription
idpathstringyesTemplate id

Request body: application/json Favorite | null — {"favorite": bool}; empty or null = toggle

Responses

StatusDescriptionBody
200New stateapplication/json FavoriteState
404Unknown idapplication/json ErrorBody

jobs

Transmit jobs and statistics.

GET /api/jobs

All live jobs (created, running and recently finished), newest first.

Responses

StatusDescriptionBody
200Jobsapplication/json JobInfo[]

POST /api/jobs

Creates (and by default starts) a job.

Request body: application/json CreateJob

Responses

StatusDescriptionBody
201Createdapplication/json JobInfo
400Invalid jobapplication/json ErrorBody
403policy_violation: interface or rate not allowedapplication/json ErrorBody
404Unknown template idapplication/json ErrorBody
422Invalid templateapplication/json ErrorBody
502backend_error: the backend could not be openedapplication/json ErrorBody

GET /api/jobs/history

Finished jobs (last 100), newest first.

Responses

StatusDescriptionBody
200Finished jobsapplication/json JobInfo[]

GET /api/jobs/{id}

One job (live or from the history).

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
200Jobapplication/json JobInfo
404Unknown idapplication/json ErrorBody

DELETE /api/jobs/{id}

Removes a job (a running one is stopped first and recorded in the history).

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
204Deleted
404Unknown idapplication/json ErrorBody

POST /api/jobs/{id}/pause

Pauses a running job.

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
200Pausingapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Not runningapplication/json ErrorBody

POST /api/jobs/{id}/resume

Resumes a paused job.

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
200Resumingapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Not runningapplication/json ErrorBody

POST /api/jobs/{id}/start

Starts a job created with start: false.

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
200Startedapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Not in state createdapplication/json ErrorBody
502Backend errorapplication/json ErrorBody

GET /api/jobs/{id}/stats

Latest statistics snapshot of a job.

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
200wpg_tx::job::StatsSnapshotapplication/json object
404Unknown idapplication/json ErrorBody
409Never startedapplication/json ErrorBody

POST /api/jobs/{id}/stop

Stops a job (asynchronously; watch job_state or poll the job).

Parameters

NameInTypeRequiredDescription
idpathstringyesJob id

Responses

StatusDescriptionBody
200Stoppingapplication/json JobInfo
404Unknown idapplication/json ErrorBody
409Already endedapplication/json ErrorBody

GET /api/stats/overview

Dashboard summary.

Responses

StatusDescriptionBody
200Dashboard dataapplication/json Overview

captures

Receive counters, captured frames and signature verification

GET /api/captures

All captures (running and the last finished ones), newest first.

Responses

StatusDescriptionBody
200Capturesapplication/json CaptureInfo[]

POST /api/captures

Starts a capture.

Request body: application/json CaptureSpec

Responses

StatusDescriptionBody
201Startedapplication/json CaptureInfo
400Invalid spec or filterapplication/json ErrorBody
404Unknown interface / input fileapplication/json ErrorBody
502backend_error: the backend could not be openedapplication/json ErrorBody

GET /api/captures/backends

Receive backend availability on this build / OS.

Responses

StatusDescriptionBody
200Backends (name, available, reason)application/json object``[]

POST /api/captures/filter

Checks a capture filter without starting a capture.

Request body: application/json FilterCheck

Responses

StatusDescriptionBody
200Resultapplication/json FilterCheckResult

GET /api/captures/{id}

One capture.

Parameters

NameInTypeRequiredDescription
idpathstringyesCapture id

Responses

StatusDescriptionBody
200Captureapplication/json CaptureInfo
404Unknown idapplication/json ErrorBody

DELETE /api/captures/{id}

Removes a capture (a running one is stopped first; a saved pcapng file stays on disk).

Parameters

NameInTypeRequiredDescription
idpathstringyesCapture id

Responses

StatusDescriptionBody
204Deleted
404Unknown idapplication/json ErrorBody

GET /api/captures/{id}/packets

The first N matching frames of a capture (live while it runs).

Parameters

NameInTypeRequiredDescription
idpathstringyesCapture id

Responses

StatusDescriptionBody
200Kept framesapplication/json CapturedFrame[]
404Unknown idapplication/json ErrorBody

GET /api/captures/{id}/pcapng

The pcapng file of a finished capture started with save.

Parameters

NameInTypeRequiredDescription
idpathstringyesCapture id

Responses

StatusDescriptionBody
200pcapng fileapplication/octet-stream
404Unknown id or nothing savedapplication/json ErrorBody
409Still runningapplication/json ErrorBody

POST /api/captures/{id}/stop

Stops a running capture (asynchronously; watch capture_state).

Parameters

NameInTypeRequiredDescription
idpathstringyesCapture id

Responses

StatusDescriptionBody
200Stoppingapplication/json CaptureInfo
404Unknown idapplication/json ErrorBody
409Already endedapplication/json ErrorBody

events

The WebSocket event stream.

GET /api/ws

WebSocket upgrade.

Responses

StatusDescriptionBody
101WebSocket: JSON ServerEvent messagesapplication/json ServerEvent

terminal

Web terminal: SSH / Telnet sessions, session logs, host keys

GET /api/terminal/known-hosts

Trusted SSH host keys (<data_dir>/terminal/known_hosts).

Responses

StatusDescriptionBody
200Host keysapplication/json KnownHost[]

DELETE /api/terminal/known-hosts/{host}/{port}

Forgets the host key(s) of host:port (after a legitimate key change).

Parameters

NameInTypeRequiredDescription
hostpathstringyesHost as stored
portpathintegeryesPort

Responses

StatusDescriptionBody
204Removed
404No key storedapplication/json ErrorBody

GET /api/terminal/logs

Session logs, newest first.

Responses

StatusDescriptionBody
200Logsapplication/json LogInfo[]

GET /api/terminal/logs/{name}

Downloads a session log (text/plain, also while it is being written).

Parameters

NameInTypeRequiredDescription
namepathstringyesLog file name

Responses

StatusDescriptionBody
200The logtext/plain
404Unknown logapplication/json ErrorBody

DELETE /api/terminal/logs/{name}

Deletes a session log (not one that is being written).

Parameters

NameInTypeRequiredDescription
namepathstringyesLog file name

Responses

StatusDescriptionBody
204Deleted
404Unknown logapplication/json ErrorBody
409invalid_state: the session is still recordingapplication/json ErrorBody

GET /api/terminal/status

Configuration and running sessions (also when the terminal is disabled, so the UI can explain how to enable it).

Responses

StatusDescriptionBody
200Terminal statusapplication/json TerminalStatus

GET /api/terminal/ws

Opens a terminal session (WebSocket). Send connect first; see TerminalClientMessage / TerminalServerMessage. Remote output arrives as binary frames, keystrokes may be sent as binary frames or input messages.

Responses

StatusDescriptionBody
101WebSocket: TerminalServerMessage JSON + binary outputapplication/json TerminalServerMessage
403terminal_disabled (terminal.enabled = false) or forbidden (viewer role)application/json ErrorBody

snmp

SNMP manager tool: Get / Walk / Set / traps, MIBs, trap receiver, pcap recording

GET /api/snmp/capture

Recording state.

Responses

StatusDescriptionBody
200Stateapplication/json CaptureStatus

POST /api/snmp/capture

Starts / stops the recording of every SNMP datagram this server sends or receives (requests, responses, traps), or clears it.

Request body: application/json CaptureControl

Responses

StatusDescriptionBody
200Stateapplication/json CaptureStatus

GET /api/snmp/capture/download

The recorded frames as a pcap / pcapng file (Ethernet / IP / UDP synthesised around the real datagrams; placeholder MAC addresses).

Parameters

NameInTypeRequiredDescription
formatpathstring | nullyespcap (default) or pcapng.

Responses

StatusDescriptionBody
200pcap / pcapng fileapplication/octet-stream
400Unknown formatapplication/json ErrorBody

POST /api/snmp/get

GetRequest.

Request body: application/json SnmpOidsRequest

Responses

StatusDescriptionBody
200Response (check error_status)application/json SnmpResult
400Bad target / OID / v3 settingsapplication/json ErrorBody
502snmp_error: Report PDU, authentication or decoding failureapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

POST /api/snmp/getbulk

GetBulkRequest (v2c / v3).

Request body: application/json SnmpBulkRequest

Responses

StatusDescriptionBody
200Responseapplication/json SnmpResult
400Bad request (also: GetBulk on v1)application/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

POST /api/snmp/getnext

GetNextRequest.

Request body: application/json SnmpOidsRequest

Responses

StatusDescriptionBody
200Responseapplication/json SnmpResult
400Bad requestapplication/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

POST /api/snmp/inform

Sends an InformRequest (v2c / v3) and waits for the acknowledgement.

Request body: application/json SnmpNotifyRequest

Responses

StatusDescriptionBody
200Acknowledged (the Response’s bindings)application/json SnmpResult
400Bad request (also: inform on v1)application/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: not acknowledgedapplication/json ErrorBody

GET /api/snmp/mibs

Loaded MIB modules with their load state.

Responses

StatusDescriptionBody
200Modulesapplication/json MibModuleOut[]

POST /api/snmp/mibs

Uploads MIB files (stored under <data_dir>/mibs, loaded at once).

Request body: application/json MibUpload

Responses

StatusDescriptionBody
200Per-file result and module stateapplication/json MibUploadResult
400Bad file name / too largeapplication/json ErrorBody

GET /api/snmp/mibs/node

Details of a MIB node (longest-prefix match for instances).

Parameters

NameInTypeRequiredDescription
idpathstringyesName (ifOperStatus, IF-MIB::ifOperStatus, ifOperStatus.3) or dotted OID.

Responses

StatusDescriptionBody
200Nodeapplication/json NodeOut
400Unparsable idapplication/json ErrorBody
404No MIB defines itapplication/json ErrorBody

GET /api/snmp/mibs/search

Finds MIB objects by name (for OID autocompletion).

Parameters

NameInTypeRequiredDescription
qpathstringyesPart of a descriptor (ifOper, IF-MIB::ifH).
limitpathinteger | nullyesMost hits (default 20, at most 200).

Responses

StatusDescriptionBody
200Hits, prefix matches firstapplication/json SearchHit[]

GET /api/snmp/mibs/tree

One level of the MIB tree.

Parameters

NameInTypeRequiredDescription
oidpathstring | nullyesParent (name or dotted OID; empty = the roots).
modulepathstring | nullyesOnly the branches leading to definitions of this module; without oid, the module’s top nodes.

Responses

StatusDescriptionBody
200Childrenapplication/json TreeChildOut[]
400Unknown name or moduleapplication/json ErrorBody

DELETE /api/snmp/mibs/{module}

Deletes an uploaded module (its whole file). Bundled modules cannot be deleted.

Parameters

NameInTypeRequiredDescription
modulepathstringyesModule name

Responses

StatusDescriptionBody
200Deletedapplication/json MibDeleted
404Unknown moduleapplication/json ErrorBody
409read_only: bundled moduleapplication/json ErrorBody

GET /api/snmp/receiver

Receiver state.

Responses

StatusDescriptionBody
200Stateapplication/json ReceiverStatus

POST /api/snmp/receiver/start

Starts (or restarts) the trap / inform receiver.

Request body: application/json ReceiverStart

Responses

StatusDescriptionBody
200Listeningapplication/json ReceiverStatus
400Bad address / usersapplication/json ErrorBody
502backend_error: cannot bind (privileged port, in use)application/json ErrorBody

POST /api/snmp/receiver/stop

Stops the receiver.

Responses

StatusDescriptionBody
200Stoppedapplication/json ReceiverStatus

POST /api/snmp/set

SetRequest.

Request body: application/json SnmpSetRequest

Responses

StatusDescriptionBody
200Response (check error_status: notWritable, wrongType, …)application/json SnmpResult
400Bad target / OID / valueapplication/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

GET /api/snmp/status

Whether the SNMP tool is enabled, with MIB / receiver / recording summaries.

Responses

StatusDescriptionBody
200Statusapplication/json SnmpStatus

POST /api/snmp/trap

Sends a trap (v1 Trap-PDU, SNMPv2-Trap, or a v3 trap with this server as the authoritative engine). The result lists the bindings sent.

Request body: application/json SnmpNotifyRequest

Responses

StatusDescriptionBody
200Sentapplication/json SnmpResult
400Bad requestapplication/json ErrorBody

GET /api/snmp/traps

Received notifications, newest first (also pushed as snmp_trap events on the WebSocket).

Parameters

NameInTypeRequiredDescription
limitpathinteger | nullyesMost notifications (default 200, at most 1000).

Responses

StatusDescriptionBody
200Notificationsapplication/json TrapOut[]

DELETE /api/snmp/traps

Forgets the received notifications.

Responses

StatusDescriptionBody
204Cleared

POST /api/snmp/walk

Walks one or more subtrees (GetBulk on v2c / v3, GetNext on v1); conceptual tables in the result are also returned as rows × columns.

Request body: application/json SnmpWalkRequest

Responses

StatusDescriptionBody
200Bindings and tablesapplication/json SnmpResult
400Bad requestapplication/json ErrorBody
502snmp_errorapplication/json ErrorBody
504snmp_error: no responseapplication/json ErrorBody

dhcp

DHCP server tool: DHCPv4 / DHCPv6 (IA_NA, IA_PD) pools and options, router advertisements, leases, activity

GET /api/dhcp

State, settings and counters.

Responses

StatusDescriptionBody
200Stateapplication/json DhcpStatus
404dhcp.enabled = falseapplication/json ErrorBody

PUT /api/dhcp

Saves the settings; a running server restarts with them.

Request body: application/json DhcpUpdate

Responses

StatusDescriptionBody
200Savedapplication/json DhcpStatus
400Invalid settings (details: [{ field, message }])application/json ErrorBody
403policy_violation: interface not in tx.allowed_ifacesapplication/json ErrorBody
502backend_error: the restart failedapplication/json ErrorBody

GET /api/dhcp/activity

Recent requests and replies, newest first (wpg_dhcp::Activity).

Parameters

NameInTypeRequiredDescription
limitpathinteger | nullyesMost entries returned (newest first; default 200).

Responses

StatusDescriptionBody
200Activityapplication/json object``[]

DELETE /api/dhcp/activity

Clears the activity log.

Responses

StatusDescriptionBody
204Cleared

GET /api/dhcp/leases

Leases (wpg_dhcp::Lease: kind v4 / na / pd, addr, plen, client, iaid, mac, hostname, state, expires, updated).

Responses

StatusDescriptionBody
200Leasesapplication/json object``[]

DELETE /api/dhcp/leases

Deletes one lease (key) or all of them. The client keeps using the address until it renews.

Parameters

NameInTypeRequiredDescription
keypathstring | nullyesThe lease (192.168.100.10, 2001:db8::10, 2001:db8:100::/56); absent: every lease.

Responses

StatusDescriptionBody
204Deleted
404No such leaseapplication/json ErrorBody

POST /api/dhcp/start

Starts (or restarts) the server; it also starts at boot until stopped.

Responses

StatusDescriptionBody
200Runningapplication/json DhcpStatus
400No / unknown interface, invalid settingsapplication/json ErrorBody
502backend_error: sockets (ports 67 / 547 need CAP_NET_BIND_SERVICE, RA CAP_NET_RAW; Linux only)application/json ErrorBody

POST /api/dhcp/stop

Stops the server (and its start at boot).

Responses

StatusDescriptionBody
200Stoppedapplication/json DhcpStatus

Schemas

Request and response bodies referenced above.

ActiveSession

A running session (GET /api/terminal/status).

KeyTypeRequiredDescription
hoststringyesTarget host as entered.
idstringyesSession id.
logstring | nullLog file being written, if recording.
portintegeryesTarget port.
protocolProtocolyesProtocol.
startedintegeryesStart (Unix seconds).
userstringyeswpg user who opened it.
viastring``[]SSH jump hosts in order (user@host:port), empty for a direct session.

AuthStatus

GET /api/auth/status.

KeyTypeRequiredDescription
authenticatedbooleanyesThe request carries a valid session.
configuredbooleanyesA password exists (configured or set on the setup screen).
csrf_tokenstring | nullCSRF token to send as X-CSRF-Token on POST / PUT / DELETE (also in the wpg_csrf cookie); null when not logged in.
setup_requiredbooleanyesNo password yet: show the setup screen (POST /api/auth/setup).
userUserInfo | null

BackendItem

One transmit backend.

KeyTypeRequiredDescription
availablebooleanyesCompiled in and supported on this OS (privileges not checked).
multi_workerbooleanyesSeveral TX workers per job.
namestringyesName (null, pcapfile, afpacket, pcap, afxdp, dpdk).
reasonstring | nullWhy it is unavailable / requirements.

Backends

GET /api/system/backends response body.

KeyTypeRequiredDescription
backendsBackendItem[]yesAll backends.
defaultstringyesBackend used when a job names none.

CaptureControl

POST /api/snmp/capture body.

KeyTypeRequiredDescription
clearbooleanDiscard the recorded frames first.
enabledboolean | nullStart (true) / stop (false) recording.

CaptureInfo

A capture as returned by the API.

KeyTypeRequiredDescription
backendstringyesResolved backend.
filterstringyesNormalised filter text (empty = every frame).
finishedinteger | nullEnd time, Unix milliseconds.
idstringyesCapture id.
ifacestringyesResolved interface (input path for pcapfile).
namestringyesDisplay name (spec.name, else <backend>:<iface>).
savedbooleanyesWhether a pcapng file was written (download with GET /api/captures/{id}/pcapng).
specCaptureSpecyesThe request.
startedintegeryesStart time, Unix milliseconds.
statsobject | nullLatest statistics (wpg_rx::RxSnapshot).
statusobjectyes{ "state": "running" }, { "state": "finished", "detail": "count_reached" | "duration_elapsed" | "end_of_input" | "stopped" }, { "state": "failed", "detail": "<error>" }.

CaptureSpec

What to capture (all fields are optional).

KeyTypeRequiredDescription
backendstring | nullBackend: afpacket, pcap, pcapfile, null (default: afpacket on Linux, else pcap).
countinteger | nullStop after this many matching frames.
durationstring | nullStop after this long, e.g. 10s, 2m.
filterstring | nulltcpdump-style filter (udp port 5001 and wpg); empty = every frame.
ifacestring | nullInterface (any = every interface with afpacket); for pcapfile the name of a capture file under <data_dir>/captures (e.g. a dry-run output).
include_outgoingbooleanAlso count frames this host transmits.
keepintegerMatching frames kept for display (default 100, at most 10000).
namestring | nullDisplay name.
promiscbooleanPromiscuous mode.
savestring | nullSave the matching frames as a pcapng file of this name under <data_dir>/captures.
verifybooleanCheck the signatures of matching frames (loss / order / latency).

CaptureStatus

pcap recording state.

KeyTypeRequiredDescription
droppedintegeryesFrames dropped because the buffer was full.
enabledbooleanyesRecording.
framesintegeryesKept frames.

CapturedFrame

One kept frame.

KeyTypeRequiredDescription
hexstringyesCaptured octets as lower-case hex (decode with POST /api/parse).
indexintegeryesPosition among the matching frames (0-based).
lenintegeryesOriginal length.
signatureobject | nullThe frame’s signature (stream_id, seq, ts_ns), if any.
ts_nsintegeryesCapture time, nanoseconds since the Unix epoch.

ClientMessage

Client → server message.

type: "subscribe"

Selects the jobs whose stats / job_state events are sent.

KeyTypeRequiredDescription
jobsobject"all" or a list of job ids.
logsboolean | nullReceive log events (default true).
type"subscribe"yes

CreateJob

POST /api/jobs body: a [JobSpec] plus start.

KeyTypeRequiredDescription
startbooleanStart immediately (default true); false leaves it in state created.

CreateToken

POST /api/tokens body.

KeyTypeRequiredDescription
expires_in_daysinteger | nullExpiry in days (1 to 3650); omitted or null: never expires.
namestringyesName, to recognise the token later (1 to 100 characters).

CreatedToken

POST /api/tokens response.

KeyTypeRequiredDescription
secretstringyesThe secret to send as Authorization: Bearer <secret>. Only this response contains it.
tokenTokenInfoyesThe stored token.

DhcpStatus

GET /api/dhcp.

KeyTypeRequiredDescription
added_addressesstring``[]Addresses this server put on the interface (removed when it stops).
enabledbooleanyesdhcp.enabled.
errorstring | nullWhy the last start (at boot) failed.
ifacestringyesInterface used (pinned or chosen; empty: none chosen yet).
leasesintegeryesLeases in the table.
pinned_ifacestring | nulldhcp.iface (fixed at deploy time); the screen cannot change it.
runningbooleanyesAnswering.
server_duidstring | nullDHCPv6 server DUID in use.
server_ipstring | nullDHCPv4 server identifier in use.
settingsobjectyesPools and options (wpg_dhcp::Settings).
started_msinteger | nullStart time (milliseconds since the Unix epoch).
statsobjectyesPacket counters of the running server.
supportedbooleanyesBuilt for Linux (elsewhere the server cannot start).

DhcpUpdate

PUT /api/dhcp body.

KeyTypeRequiredDescription
ifacestring | nullInterface to answer on (ignored when dhcp.iface pins one; must be allowed by tx.allowed_ifaces).
settingsobjectyesPools and options (wpg_dhcp::Settings: v4, v6).

EndReason

Why a job ended normally (mirrors wpg_tx::job::FinishReason).

Type: "count_reached" | "duration_elapsed" | "source_exhausted" | "stopped"

ErrorBody

{ "error": ... } body (OpenAPI schema of every error response).

KeyTypeRequiredDescription
errorErrorInfoyesThe error.

ErrorInfo

Error object.

KeyTypeRequiredDescription
codestringyesStable machine code: not_found, bad_request, invalid_template, policy_violation, read_only, invalid_state, backend_error, unauthorized, setup_required, rate_limited, csrf_failed, forbidden, already_configured, terminal_disabled, snmp_error, internal.
detailsanyExtra data, e.g. the lint issues of an invalid template.
messagestringyesHuman readable message in the language of Accept-Language.

ExtensionFile

One loaded extension file.

KeyTypeRequiredDescription
bindingsintegeryesNumber of its bind entries.
protocolsstring``[]yesIds of the protocols it defines.
sourcestringyesThe file.

Favorite

Body of POST /api/templates/{id}/favorite (empty body = toggle).

KeyTypeRequiredDescription
favoritebooleanyesNew value.

FavoriteState

POST /api/templates/{id}/favorite response.

KeyTypeRequiredDescription
favoritebooleanyesCurrent value.
idstringyesTemplate id.

FilterCheck

POST /api/captures/filter request.

KeyTypeRequiredDescription
filterstringyesFilter text.

FilterCheckResult

POST /api/captures/filter response.

KeyTypeRequiredDescription
errorstring | nullWhat is wrong (when invalid).
normalizedstring | nullNormalised filter text (when valid).
okbooleanyesThe filter is valid.
posinteger | nullByte offset of the error (when invalid).

Health

GET /api/health response body.

KeyTypeRequiredDescription
localestringyesNegotiated locale.
messagestringyesLocalised human-readable status.
statusstringyesAlways "ok" when the server answers.
uptime_secsintegeryesSeconds since the server started.
versionstringyesServer version.

IfaceBrief

An interface on the dashboard.

KeyTypeRequiredDescription
allowedbooleanyesAllowed by the transmit policy.
loopbackbooleanyesLoopback.
namestringyesName.
runningbooleanyesCarrier / running.
speed_mbpsinteger | nullLink speed.
upbooleanyesAdministratively up.

JobBrief

A running job on the dashboard.

KeyTypeRequiredDescription
backendstringyesBackend.
bpsnumberyesL2 bits per second.
idstringyesJob id.
ifacestringyesInterface.
namestringyesName.
packetsintegeryesPackets sent.
ppsnumberyesPackets per second.
statusJobStatusyesState.

JobInfo

A job as returned by the API (also the persisted history record).

KeyTypeRequiredDescription
backendstringyesResolved backend.
createdintegeryesCreation time, Unix milliseconds.
finishedinteger | nullEnd time, Unix milliseconds.
idstringyesJob id.
ifacestringyesResolved interface (output path for pcapfile).
namestringyesDisplay name (spec.name, else the first template’s name).
plansobject``[]yesExpansion plan of each stream.
ratestringyesResolved rate.
reportobject | nullFinal report (after the job ended).
specJobSpecyesThe request.
startedinteger | nullStart time, Unix milliseconds.
statsobject | nullLatest statistics.
statusJobStatusyesCurrent state.
workersintegeryesTX workers.

JobSpec

What to send, where and how (all fields but streams are optional).

KeyTypeRequiredDescription
backendstring | nullBackend: null, pcapfile, afpacket, pcap, … (default: tx.default_backend).
batchinteger | nullFrames per send_batch call.
burstinteger | nullFrames per rate-control grant.
countinteger | nullTotal packets (default: the template’s tx.count for a single stream).
dry_runstring | nullDry run: write a pcapng file of this name under <data_dir>/captures instead of sending (forces the pcapfile backend).
durationstring | nullDuration limit, e.g. 10s, 2m.
ifacestring | nullInterface (not needed for null; the output file name for pcapfile).
mixMixInterleaving of several streams.
namestring | nullDisplay name.
pin_coresinteger``[]Core per worker (Linux).
planstring | nullExpansion strategy: auto, prerender, onthefly.
ramp_upstring | nullLinear rate ramp-up time, e.g. 5s.
ratestring | nullRate: 1000pps, 1Mpps, 10Gbps, 50%, ifg=10us, unlimited (default: the first template’s tx.rate, then tx.max_rate, else unlimited).
signaturebooleanStamp every frame with a receive-verification signature (magic + stream id + sequence number + TX time over the last 24 payload octets; see /api/captures with verify).
start_atstring | nullScheduled start: RFC 3339 or +10s.
stream_idinteger | nullSignature stream id of the first stream (stream i gets stream_id + i; default 0).
streamsJobStream[]Streams (at least one). Several streams are mixed into one TX worker.
workersinteger | nullTX worker threads (single stream only).

JobStatus

Job lifecycle state: { "state": "running" }, { "state": "finished", "detail": "count_reached" }, { "state": "failed", "detail": "<error>" }.

state: "created"

Created with start: false, not started yet.

KeyTypeRequiredDescription
state"created"yes

state: "scheduled"

Waiting for start_at.

KeyTypeRequiredDescription
state"scheduled"yes

state: "running"

Sending.

KeyTypeRequiredDescription
state"running"yes

state: "paused"

Paused.

KeyTypeRequiredDescription
state"paused"yes

state: "finished"

Ended normally (count_reached, duration_elapsed, source_exhausted, stopped).

KeyTypeRequiredDescription
detailEndReasonyesEnded normally (count_reached, duration_elapsed, source_exhausted, stopped).
state"finished"yes

state: "failed"

Ended with an error.

KeyTypeRequiredDescription
detailstringyesEnded with an error.
state"failed"yes

JobStream

One stream of a job: a stored template (template_id) or an inline one.

KeyTypeRequiredDescription
templateobject | nullInline template (takes precedence over template_id).
template_idstring | nullId of a stored template.
varsmap<string, ``string``>Template variable values (name → human notation).
weightintegerWeight for mix: weighted (0 counts as 1).

JobTotals

Dashboard aggregate of the running jobs.

KeyTypeRequiredDescription
activeintegeryesJobs that are scheduled, running or paused.
bpsnumberyesSum of the jobs’ L2 bits per second.
l1_bpsnumberyesSum of the jobs’ L1 bits per second.
ppsnumberyesSum of the jobs’ packets per second.
runningintegeryesJobs currently sending.

JumpHost

One SSH jump host of a [ConnectRequest].

KeyTypeRequiredDescription
hoststringyesHost name or address (resolved by the previous hop, or by the server for the first one).
passphrasestring | nullPassphrase of private_key.
passwordstring | nullPassword (also answers a single keyboard-interactive password prompt); empty: the server’s prompts are shown.
portinteger | nullSSH port (default 22).
private_keystring | nullPrivate key (OpenSSH / PEM / PuTTY .ppk text).
usernamestringyesUser name on the jump host.

KnownHost

A stored host key (GET /api/terminal/known-hosts).

KeyTypeRequiredDescription
algorithmstringyesKey algorithm (ssh-ed25519, rsa-sha2-512, …).
commentstringyesThe entry’s comment (who accepted it and when).
fingerprintstringyesSHA256:... fingerprint.
hoststringyesHost as typed by the user who accepted the key (lower case).
portintegeryesTCP port.

LintRequest

POST /api/lint request.

KeyTypeRequiredDescription
templateobjectyesTemplate: object or YAML text.

LintResponse

POST /api/lint response.

KeyTypeRequiredDescription
errorsintegeryesNumber of errors.
issuesobject``[]yesFindings (level, path, key, args, localised message).
okbooleanyesNo errors (warnings allowed).
warningsintegeryesNumber of warnings.

LogInfo

A past or running session log (GET /api/terminal/logs).

KeyTypeRequiredDescription
activebooleanyesStill being written by a live session.
modifiedintegeryesLast modification (Unix seconds).
namestringyesFile name (the id in /api/terminal/logs/{name}).
sizeintegeryesSize in bytes.

LoginRequest

POST /api/auth/login body.

KeyTypeRequiredDescription
passwordstringyesPassword.
usernamestring | nullUser name (default admin).

MibDeleted

Removed modules.

KeyTypeRequiredDescription
removedstring``[]yesModules removed with the file.

MibFileIn

One file of an upload.

KeyTypeRequiredDescription
contentstringyesFile content (text).
namestringyesFile name (CISCO-SMI.my; .mib, .txt, .my, .smi, .asn, .asn1 or none).

MibModuleOut

A loaded MIB module.

KeyTypeRequiredDescription
bundledbooleanyesBundled with wpg (cannot be deleted).
errorsstring``[]yesProblems: parse warnings, unresolved definitions.
filestring | nullUploaded file it came from.
missing_importsstring``[]yesModules named in IMPORTS that are not loaded (upload them).
namestringyesModule name.
nodesintegeryesResolved definitions.
statusstringyesok, partial (loaded with problems) or error.

MibUpload

POST /api/snmp/mibs body.

KeyTypeRequiredDescription
filesMibFileIn[]yesFiles.

MibUploadResult

POST /api/snmp/mibs result.

KeyTypeRequiredDescription
filesUploadedFile[]yesPer file.
modulesMibModuleOut[]yesThe state of the uploaded modules after loading (missing imports are named here).

Mix

How several streams are interleaved.

Type: "weighted" | "sequential" | "round_robin"

NamedNumber

An enumeration value / BITS position.

KeyTypeRequiredDescription
labelstringyesLabel.
valueintegeryesNumber.

NodeOut

MIB node details.

KeyTypeRequiredDescription
accessstring | nullMAX-ACCESS.
augmentsstring | nullAUGMENTS.
base_typestring | nullBase type.
defvalstring | nullDEFVAL.
descriptionstring | nullDESCRIPTION.
display_hintstring | nullDISPLAY-HINT.
enumsNamedNumber[]yesEnumeration / BITS names.
indexstring``[]yesINDEX (of a row; AUGMENTS followed).
instancestringyesInstance part of the requested id (3 of ifDescr.3).
kindstringyesobject_type, object_identifier, …
modulestringyesModule.
namestringyesDescriptor.
objectsstring``[]yesOBJECTS / VARIABLES (notifications).
oidstringyesOID of the definition.
pathPathElem[]yesPath from the root.
referencestring | nullREFERENCE.
rolestring | nullTable / row / column / scalar.
statusstring | nullSTATUS.
syntaxstring | nullSYNTAX text.
type_namestring | nullTextual convention.
unitsstring | nullUNITS.

Overview

GET /api/stats/overview response.

KeyTypeRequiredDescription
historyintegeryesJobs in the history.
ifacesIfaceBrief[]yesInterfaces.
jobsJobBrief[]yesActive jobs.
templatesintegeryesTemplates in the library.
totalsJobTotalsyesTotals over the active jobs.
uptime_secsintegeryesSeconds since the server started.

ParseRequest

POST /api/parse request.

KeyTypeRequiredDescription
bytes_hexstringyesFrame bytes as hex (whitespace, : / - separators and 0x allowed).
fcsbooleanThe frame ends with a 4-octet FCS.
first_protocolstring | nullProtocol of the first octet (default ethernet2).

ParseResponse

POST /api/parse response.

KeyTypeRequiredDescription
bytes_hexstringyesNormalised hex of the input.
diagnosticsobject``[]yesParse and build findings with localised message.
layoutobject``[]yesLayer / field positions.
lenintegeryesFrame length in octets.
packetobjectyesDecoded packet (wpg_core::Packet: layers with Manual field values).
trailersobject``[]yesPadding / FCS.

PathElem

Breadcrumb element.

KeyTypeRequiredDescription
namestringyesName (or the number).
oidstringyesOID.

PromptItem

One keyboard-interactive prompt.

KeyTypeRequiredDescription
echobooleanyesWhether the answer may be shown while typed.
promptstringyesPrompt text from the server.

Protocol

Remote protocol.

Type: "ssh" | "telnet"

ProtocolSummary

Catalog entry.

KeyTypeRequiredDescription
fieldsstring``[]yesField names in wire order.
idstringyesStable id (ethernet2, ipv4, …).
layerobjectyesPalette classification (l2, l3, l4, payload, …).
namestringyesDisplay name.
nextstring``[]yesProtocols this one can carry (its next-layer binding table).
synthbooleanyesContent generator instead of wire fields (payload).

ReceiverStart

POST /api/snmp/receiver/start body.

KeyTypeRequiredDescription
communitiesstring``[]Accepted communities (empty = any; others are listed with an error).
listenstringyesListen address (0.0.0.0:162, [::]:1162).
usersReceiverUserIn[]v3 users (kept in memory while the receiver runs).

ReceiverStatus

Trap receiver state.

KeyTypeRequiredDescription
communitiesstring``[]yesAccepted communities (empty = any).
engine_idstringyesThis receiver’s engine id (hex), for v3 informs.
from_configbooleanyesStarted at boot from snmp.trap_listen.
listenstring | nullBound address.
receivedintegeryesNotifications received since the start.
runningbooleanyesListening.
usersstring``[]yesConfigured v3 user names.

ReceiverUserIn

A v3 user of the receiver.

KeyTypeRequiredDescription
auth_passwordstring | nullAuthentication pass phrase.
auth_protocolstring | nullAuthentication protocol (default SHA).
priv_passwordstring | nullPrivacy pass phrase.
priv_protocolstring | nullPrivacy protocol (default AES).
userstringyesUser name.

ReloadResult

Result of POST /api/protocols/reload.

KeyTypeRequiredDescription
dirsstring``[]yesDirectories that were read.
filesExtensionFile[]yesThe files now in use, in load order.

RenderRequest

POST /api/render request.

KeyTypeRequiredDescription
countinteger | nullPackets to render (1..=server.preview_max, default 1; 256 unless configured).
indexinteger | nullStream index of the first packet (default 0).
templateobjectyesTemplate: object (JSON form of .wpg.yaml) or YAML text.
varsmap<string, ``string``>Variable values.

RenderResponse

POST /api/render response.

KeyTypeRequiredDescription
cardinalityinteger | nullPackets in the whole stream (null = unbounded).
packetsRenderedPacket[]yesThe packets.
planobjectyesHow a job would expand the stream (pre-render vs on-the-fly).

RenderedPacket

One rendered packet.

KeyTypeRequiredDescription
bytes_hexstringyesFrame bytes as lower-case hex (without FCS unless the template asks for one).
diagnosticsobject``[]yesBuilder findings with localised message.
indexintegeryesStream index.
layoutobject``[]yesLayer / field positions (wpg_core::LayerLayout).
lenintegeryesLength in octets.
trailersobject``[]yesPadding / FCS after the layers.

Role

A user role (only admin is created for now; operator / viewer are P1).

Type: "admin" | "operator" | "viewer"

SearchHit

A search hit.

KeyTypeRequiredDescription
kindstringyesKind.
modulestringyesModule.
namestringyesDescriptor.
oidstringyesOID.
rolestring | nullTable / row / column / scalar.
syntaxstring | nullSYNTAX text.

ServerEvent

One message from the server to WebSocket clients.

type: "stats"

Latest statistics of a running job (every 100 ms, one per job).

KeyTypeRequiredDescription
job_idstringyesJob id.
snapshotobjectyesCounters and rates (wpg_tx::job::StatsSnapshot).
type"stats"yes

type: "job_state"

A job changed state.

KeyTypeRequiredDescription
job_idstringyesJob id.
stateJobStatusyesNew state.
type"job_state"yes

type: "log"

A log line (ts, level, target, message, fields).

KeyTypeRequiredDescription
type"log"yes

type: "templates_changed"

The template index changed (file watcher or API write).

KeyTypeRequiredDescription
type"templates_changed"yes

type: "rx_stats"

Latest statistics of a capture (every 100 ms while it runs, once more at the end).

KeyTypeRequiredDescription
capture_idstringyesCapture id.
snapshotobjectyesCounters, rates and verification (wpg_rx::RxSnapshot).
type"rx_stats"yes

type: "capture_state"

A capture started or ended.

KeyTypeRequiredDescription
capture_idstringyesCapture id.
stateobjectyesNew state ({ "state": "running" | "finished" | "failed", "detail" }).
type"capture_state"yes

type: "snmp_trap"

The SNMP trap receiver got a notification (also listed by GET /api/snmp/traps).

KeyTypeRequiredDescription
trapTrapOutyesThe rendered notification.
type"snmp_trap"yes

type: "dhcp_activity"

The DHCP server handled a request or sent a router advertisement (also listed by GET /api/dhcp/activity).

KeyTypeRequiredDescription
activityobjectyesThe exchange (wpg_dhcp::Activity).
type"dhcp_activity"yes

type: "dhcp_state"

The DHCP server started / stopped, its settings changed or leases expired / were deleted: reload GET /api/dhcp.

KeyTypeRequiredDescription
type"dhcp_state"yes

type: "protocols_changed"

The user-defined protocols were reloaded (POST /api/protocols/reload): fetch GET /api/protocols and GET /api/protocols/extensions again.

KeyTypeRequiredDescription
type"protocols_changed"yes

SetupRequest

POST /api/auth/setup body.

KeyTypeRequiredDescription
confirmstringyesThe same password again.
passwordstringyesThe new admin password (at least 8 characters).

SnmpBulkRequest

GetBulk request body.

KeyTypeRequiredDescription
max_repetitionsinteger | nullmax-repetitions (default 10).
non_repeatersinteger | nullnon-repeaters (default 0).
oidsstring``[]yesObjects (the first non_repeaters are fetched once).
targetSnmpTargetyesThe agent.

SnmpNotifyRequest

Trap / Inform request body.

KeyTypeRequiredDescription
targetSnmpTargetyesThe receiver (port default 162).
trap_oidstringyessnmpTrapOID (linkDown, IF-MIB::linkUp, 1.3.6.1.6.3.1.1.5.1). v1 traps are converted per RFC 3584.
uptimeinteger | nullsysUpTime in hundredths of a second (default: the server’s uptime).
varbindsVarBindIn[]Extra bindings.

SnmpOidsRequest

Get / GetNext request body.

KeyTypeRequiredDescription
oidsstring``[]yesObjects: names (sysDescr.0, IF-MIB::ifDescr.1) or dotted OIDs.
targetSnmpTargetyesThe agent.

SnmpResult

Result of an operation.

KeyTypeRequiredDescription
elapsed_msnumberyesRound trip(s) in milliseconds.
engine_idstring | nullThe agent’s engine id (v3, hex).
error_indexintegeryeserror-index (1-based binding, 0 = none).
error_statusintegeryeserror-status of the response (0 = noError).
error_status_namestring | nullIts name (noSuchName, notWritable, …), when not 0.
opstringyesget, getnext, getbulk, walk, set, trap, inform.
requestsintegeryesRequests sent.
tablesTableOut[]Conceptual tables found among the bindings (walks).
targetstringyesThe agent / receiver address.
truncatedbooleanThe walk stopped at its limit.
varbindsVarBindOut[]yesThe bindings (response, walk results, or the notification sent).
versionstringyesv1, v2c, v3.

SnmpSetRequest

Set request body.

KeyTypeRequiredDescription
targetSnmpTargetyesThe agent.
varbindsVarBindIn[]yesBindings to set.

SnmpStatus

GET /api/snmp/status.

KeyTypeRequiredDescription
captureCaptureStatus | null
enabledbooleanyessnmp.enabled.
mib_dirstringyesDirectory of uploaded MIBs.
modulesintegeryesLoaded modules.
nodesintegeryesResolved MIB nodes.
receiverReceiverStatus | null

SnmpTarget

Where to send a request.

KeyTypeRequiredDescription
communitystring | nullCommunity for v1 / v2c (default public).
hoststringyesHost name or address.
portinteger | nullUDP port (default 161 for requests, 162 for notifications).
retriesinteger | nullExtra attempts (default 1, at most 10).
timeout_msinteger | nullWait per attempt in milliseconds (default 2000, at most 60000).
v3V3In | null
versionSnmpVersionVersion (default v2c).

SnmpVersion

SNMP protocol version.

Type: "v1" | "v2c" | "v3"

SnmpWalkRequest

Walk request body.

KeyTypeRequiredDescription
limitinteger | nullMost bindings returned in all (default 10000, at most 100000).
max_repetitionsinteger | nullmax-repetitions per GetBulk (default 20; v1 walks with GetNext).
oidstringSubtree root: name (ifTable, system) or dotted OID.
oidsstring``[]More subtree roots, walked one after another after oid (either may be empty, not both).
targetSnmpTargetyesThe agent.

TableColumnOut

A table column.

KeyTypeRequiredDescription
counterbooleanyesCounter column (rates make sense).
namestringyesDescriptor.
oidstringyesColumn OID.
syntaxstringyesSyntax text.

TableOut

A conceptual table assembled from walk results.

KeyTypeRequiredDescription
columnsTableColumnOut[]yesColumns present, in OID order.
entrystringyesIF-MIB::ifEntry.
index_namesstring``[]yesINDEX objects.
rowsTableRowOut[]yesRows in instance order.
tablestring | nullIF-MIB::ifTable.

TableRowOut

A table row.

KeyTypeRequiredDescription
cells(string | null)[]yesReadable cells (one per column; null = absent).
indexstring``[]yesDecoded INDEX values (empty when not decodable).
instancestringyesInstance sub-identifiers.
numeric(integer | null)[]yesNumeric cells (integer types).

TemplateDetail

A template with its index entry and lint findings.

KeyTypeRequiredDescription
issuesobject``[]yesLint findings with localised message.
summaryTemplateSummaryyesIndex entry.
templateobjectyesThe template (JSON form of .wpg.yaml).

TemplateList

GET /api/templates response.

KeyTypeRequiredDescription
recentstring``[]yesRecently used template ids, most recent first.
templatesTemplateSummary[]yesMatching templates, sorted by name.

TemplateSource

Where a template comes from.

Type: "user" | "library"

TemplateSummary

Index entry of a template.

KeyTypeRequiredDescription
authorstring | nullAuthor.
descriptionstring | nullDescription in the requested language (meta.descriptions[lang], else meta.description, else meta.descriptions.en).
descriptionsmap<string, ``string``>All localised descriptions (language tag → text, e.g. ja, en).
errorstring | nullLoad error when the file does not parse.
favoritebooleanyesMarked as favourite.
idstringyesStable id (slug of the relative path).
last_usedinteger | nullLast use (open in the GUI, job start), Unix milliseconds.
modifiedinteger | nullFile modification time, Unix milliseconds.
namestringyesmeta.name (the file stem when the file does not parse).
pathstringyesPath relative to its root directory.
protocolsstring``[]yesProtocol stack, outermost first.
rootstringyesThe root directory.
sourceTemplateSourceyesLibrary or user template.
tagsstring``[]yesTags.
writablebooleanyesWhether it can be updated / deleted through the API.

TerminalClientMessage

Client → server message on /api/terminal/ws. Keystrokes may also arrive as binary frames (raw bytes).

type: "connect"

First message: opens the session.

KeyTypeRequiredDescription
type"connect"yes

type: "input"

Keystrokes / pasted text (UTF-8).

KeyTypeRequiredDescription
datastringyesThe text.
type"input"yes

type: "resize"

The terminal was resized.

KeyTypeRequiredDescription
colsintegeryesColumns.
rowsintegeryesRows.
type"resize"yes

type: "host_key"

Answer to a host_key prompt.

KeyTypeRequiredDescription
acceptbooleanyesTrust the key.
savebooleanStore it in the known hosts (otherwise trust it for this session).
type"host_key"yes

type: "auth_response"

Answers to an auth_prompt (one per prompt).

KeyTypeRequiredDescription
responsesstring``[]yesThe answers.
type"auth_response"yes

type: "record"

Starts / stops the session log.

KeyTypeRequiredDescription
enabledbooleanyesRecord from now on.
strip_ansiboolean | nullRemove escape sequences (default true).
type"record"yes

type: "disconnect"

Ends the session.

KeyTypeRequiredDescription
type"disconnect"yes

TerminalConnectRequest

connect: where to and how to log in.

KeyTypeRequiredDescription
colsintegerTerminal width.
hoststringyesHost name or address.
jumpJumpHost[]SSH jump hosts (ProxyJump), nearest first: the server logs in to each in turn and reaches the next one (and finally host) through a direct-tcpip channel. Works for SSH and Telnet targets.
passphrasestring | nullPassphrase of private_key.
passwordstring | nullSSH password (also answers a single keyboard-interactive password prompt).
portinteger | nullPort (default 22 / 23).
private_keystring | nullSSH private key (OpenSSH / PEM / PuTTY .ppk text).
protocolProtocolyesssh or telnet.
recordboolean | nullRecord a session log (default: terminal.record_sessions).
rowsintegerTerminal height.
strip_ansiboolean | nullRemove escape sequences from the log (default true).
usernamestring | nullSSH user name.

TerminalServerMessage

Server → client message on /api/terminal/ws. Remote output travels as binary frames.

type: "state"

Progress: resolving, connecting, authenticating; with jump hosts, jumping (opening the tunnel from host onwards) and the other phases carry the host they concern.

KeyTypeRequiredDescription
hoststring | nullThe host of this phase (sessions with jump hosts).
statestringyesThe phase.
type"state"yes

type: "host_key"

An unknown SSH host key: confirm the fingerprint (host_key message).

KeyTypeRequiredDescription
algorithmstringyesKey algorithm.
fingerprintstringyesSHA256:....
hoststringyesHost.
portintegeryesPort.
type"host_key"yes

type: "auth_prompt"

The server asks questions (keyboard-interactive, or the password when none was given): answer with auth_response.

KeyTypeRequiredDescription
hoststringyesThe host asking (the target or a jump host).
instructionsstringyesInstructions from the server.
namestringyesRequest name from the server.
promptsPromptItem[]yesThe prompts.
type"auth_prompt"yes

type: "connected"

The session is up.

KeyTypeRequiredDescription
addressstringyesAddress actually connected to.
fingerprintstring | nullSSH host key fingerprint.
hoststringyesHost.
portintegeryesPort.
protocolProtocolyesProtocol.
session_idstringyesSession id.
type"connected"yes
viastring``[]Jump hosts the session goes through (user@host:port).

type: "record"

Log state after connected / record.

KeyTypeRequiredDescription
enabledbooleanyesRecording.
filestring | nullThe log file (GET /api/terminal/logs/{name}).
type"record"yes

type: "error"

A failure; fatal ones are followed by closed.

KeyTypeRequiredDescription
codestringyestarget_not_allowed, too_many_sessions, resolve_failed, connect_failed, host_key_changed, host_key_rejected, auth_failed, key_invalid, ssh_error, timeout, bad_request, recording_disabled, log_failed.
detailstring | nullUntranslated detail (an OS / protocol error).
fatalbooleanyesThe session ends.
infoobject | nullhost_key_changed: {algorithm, fingerprint, known_algorithm, known_fingerprint}; a failure at a jump host adds {hop: "host:port"}.
type"error"yes

type: "closed"

The session ended.

KeyTypeRequiredDescription
bytes_inintegeryesBytes received from the host.
bytes_outintegeryesBytes sent to the host.
duration_secsintegeryesSession length in seconds.
reasonstringyesremote (the host closed it), client, idle, shutdown, error.
type"closed"yes

TerminalStatus

GET /api/terminal/status.

KeyTypeRequiredDescription
allowed_targetsstring``[]yesterminal.allowed_targets (empty = any target).
enabledbooleanyesterminal.enabled.
idle_timeout_secsintegeryesterminal.idle_timeout_secs.
max_sessionsintegeryesterminal.max_sessions.
record_sessionsbooleanyesterminal.record_sessions.
sessionsActiveSession[]yesRunning sessions (all users).

TokenInfo

An API token as listed (never the secret).

KeyTypeRequiredDescription
createdintegeryesCreation time (Unix seconds).
expiresinteger | nullExpiry (Unix seconds); null: never expires.
idintegeryesToken id (for revoking).
last_usedinteger | nullLast use (Unix seconds, updated at most once a minute).
namestringyesName given at creation.
prefixstringyesThe first characters of the secret (wpg_ + 8 hex digits), to recognise it.
userstringyesOwner: requests with the token act as this user, with its role.

TrapOut

A received notification.

KeyTypeRequiredDescription
acknowledgedbooleanyesAn inform that was acknowledged.
communitystring | nullCommunity (v1 / v2c).
errorstring | nullWhy the message was not accepted (wrong community, digest, …).
idintegeryesSequence number (increasing).
levelstring | nullv3 security level.
pdu_typestring | nulltrap_v1, trap_v2, inform (absent when undecodable).
received_msintegeryesArrival, milliseconds since the Unix epoch.
sourcestringyesSender address:port.
trap_namestring | nullThe trap OID’s name (IF-MIB::linkDown).
trap_oidstring | nullsnmpTrapOID.0 (dotted).
uptimeinteger | nullsysUpTime.0 / v1 time-stamp (hundredths of a second).
uptime_textstring | nullUptime as 1d 02:03:04.56.
userstring | nullUser (v3).
v1V1Out | null
varbindsVarBindOut[]yesBindings (without sysUpTime.0 / snmpTrapOID.0).
versionstringyesv1, v2c, v3.

TreeChildOut

A tree entry.

KeyTypeRequiredDescription
arcintegeryesLast sub-identifier.
has_childrenbooleanyesSomething is defined below.
kindstring | nullobject_type, object_identifier, notification_type, …
modulestring | nullModule.
namestring | nullDescriptor (absent for an undefined intermediate OID).
oidstringyesOID.
rolestring | nullTable / row / column / scalar for OBJECT-TYPEs.

UploadedFile

Result of one uploaded file.

KeyTypeRequiredDescription
errorsstring``[]yesProblems (no module found: the file was not stored).
filestringyesStored file name.
modulesstring``[]yesModules found in it.
storedbooleanyesWhether the file was stored.

UserInfo

user of [AuthStatus].

KeyTypeRequiredDescription
namestringyesUser name.
roleRoleyesadmin, operator or viewer.

V1Out

SNMPv1 trap header.

KeyTypeRequiredDescription
agent_addrstringyesagent-addr.
enterprisestringyesenterprise (name or dotted).
genericintegeryesgeneric-trap.
specificintegeryesspecific-trap.

V3In

SNMPv3 parameters. The level follows from the pass phrases given: none = noAuthNoPriv, auth_password = authNoPriv, both = authPriv.

KeyTypeRequiredDescription
auth_passwordstring | nullAuthentication pass phrase (at least 8 characters).
auth_protocolstring | nullMD5, SHA (SHA-1), SHA-224, SHA-256, SHA-384, SHA-512 (default SHA).
context_engine_idstring | nullcontextEngineID (hex; default: the agent’s engine id).
context_namestring | nullcontextName.
priv_passwordstring | nullPrivacy pass phrase (at least 8 characters).
priv_protocolstring | nullDES, AES (AES-128), AES-192, AES-256 (default AES).
userstringyesUser name.

VarBindIn

A variable binding to send (Set, notifications).

KeyTypeRequiredDescription
oidstringyesObject instance: name (sysName.0, IF-MIB::ifAdminStatus.2) or dotted OID.
typestring | nullauto (default: from the MIB), or i / integer, u / unsigned, c / counter32, C / counter64, t / timeticks, a / ipaddress, o / oid, s / string, x / hex, d / decimal, n / null, opaque.
valuestringValue text (enum labels such as down and object names are accepted).

VarBindOut

A rendered variable binding.

KeyTypeRequiredDescription
instancestringyesInstance sub-identifiers (3).
modulestring | nullDefining module.
namestringyesIF-MIB::ifDescr.3 (numeric when no MIB knows it).
numericinteger | nullNumeric value of integer types (rates, charts).
objectstring | nullObject descriptor (ifDescr).
oidstringyesOID (dotted decimal).
rawstringyesThe value without MIB knowledge.
syntaxstring | nullTextual convention of the object (DisplayString, InterfaceIndex).
typestringyesWire type (Counter32, OCTET STRING, noSuchInstance, …).
unitsstring | nullUNITS of the object.
valuestringyesReadable value (enum labels, display hints, units, names).

VersionInfo

GET /api/version response body.

KeyTypeRequiredDescription
api_versionintegeryesREST API version (bumped on incompatible changes).
archstringyesTarget CPU architecture.
featuresstring``[]yesOptional features compiled in (pcap, …).
localesstring``[]yesSupported UI / message languages.
osstringyesTarget OS.
versionstringyesServer version.

CLI reference

The wpg binary runs both the server (wpg serve) and the headless tools, so it suits CI and ssh sessions too. For example, wpg send tpl.wpg.yaml -i eth0 --rate 1Mpps transmits a template. This page is generated from the command definitions: each block is the verbatim --help output of the current build. Run-time messages follow LANG / LC_ALL; the --help text itself is English.

Commands

wpg

Web Packet Generator

Usage: wpg [OPTIONS] <COMMAND>

Commands:
  serve      Start the web UI / API server
  send       Send a template headlessly
  render     Render a template to a pcapng file without transmitting
  import     Convert a pcap/pcapng capture into a template
  template   Template tools (lint, list, migrate, export, import)
  ifaces     List network interfaces usable for transmission
  doctor     Diagnose privileges, drivers, hugepages and Npcap
  bench      Measure transmit performance
  capture    Receive: counters, the first frames, pcapng output, signature verification
  config     Configuration file tools (init, show, validate) and API tokens
  remote     Drive a running server with an API token (jobs, templates)
  protocols  Protocol tools (list, show, check user-defined protocol files)
  help       Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg serve

Start the web UI / API server

Usage: wpg serve [OPTIONS]

Options:
      --bind <BIND>
          Address to listen on (default from the config: 127.0.0.1:8080). Without a password only loopback addresses are accepted (see --allow-insecure)

          [env: WPG_BIND]

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --password <PASSWORD>
          Admin password (plain text or argon2 hash). Visible in the process list: prefer --password-file, `WPG_PASSWORD` or `wpg config set-password`

      --password-file <FILE>
          File holding the admin password (plain text or argon2 hash)

      --tls
          Serve HTTPS; without `[server.tls]` a self-signed certificate is generated into `<data_dir>/tls/`

      --allow-insecure
          Listen on a non-loopback address even though no password is configured (anyone reaching the server can then set it on the setup screen)

      --dev
          Development mode: allow CORS from the Trunk dev server (:8081)

      --library-path <DIR>
          Template library directory (repeatable; replaces `templates.library_paths`)

      --data-dir <DIR>
          Data directory (user templates, history)

  -h, --help
          Print help

  -V, --version
          Print version

wpg send

Sends a template. --plan chooses between expanding all frames up front (prerender) and building them while sending (onthefly). --json prints the final report on stdout.

Send a template headlessly

Usage: wpg send [OPTIONS] <TEMPLATE>

Arguments:
  <TEMPLATE>
          Template file (`.wpg.yaml`)

Options:
  -i, --iface <IFACE>
          Interface to transmit on

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --backend <BACKEND>
          Transmit backend (null, pcapfile, pcap, afpacket, afxdp, dpdk)

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --count <COUNT>
          Number of packets

      --duration <DURATION>
          Duration limit, e.g. `10s`, `2m`

      --rate <RATE>
          Rate, e.g. `1Mpps`, `10Gbps`, `50%`, `ifg=10us`, `unlimited`

      --burst <BURST>
          Frames sent back to back per rate-control grant

      --wait <MODE>
          How the rate control waits: hybrid (sleep, then spin), sleep, spin or busy-poll (spin and service the backend)

      --clock <CLOCK>
          Rate-control clock: auto (TSC when invariant), tsc or monotonic

          [default: auto]

      --ramp-up <DURATION>
          Ramp the rate up linearly from 0 over this time, e.g. `5s`

      --start-at <TIME>
          Start at this time: RFC 3339 (`2026-09-29T12:00:00Z`) or a delay (`+10s`)

      --plan <PLAN>
          Expansion strategy: auto, prerender or onthefly

          [default: auto]

      --prerender-max-bytes <BYTES>
          `auto` pre-renders only streams up to this many bytes (default: `tx.prerender_max_bytes`, 256 MiB)

      --prerender-max-packets <N>
          `auto` pre-renders only streams up to this many packets (default: `tx.prerender_max_packets`, 100M)

      --json
          Print the final report as JSON on stdout

      --var <NAME=VALUE>
          Template variable override (`name=value`), repeatable; wins over --vars-file

      --vars-file <FILE>
          YAML or JSON map of template variable values

      --set <LAYER.FIELD=VALUE>
          Set a field to a fixed value, repeatable. LAYER is a protocol id, `proto[n]` or a layer index, e.g. `ipv4.ttl=1`

      --gen <LAYER.FIELD=GEN>
          Vary a field with a generator, repeatable, e.g. `udp.src_port=range:1000..1999`, `ipv4.dst=list:10.0.0.1,10.0.0.2`, `ipv4.id=random`

      --signature
          Stamp every frame with a receive-verification signature (magic, stream id, sequence number, TX time over the last 24 payload octets; see `wpg capture --verify`)

      --stream-id <ID>
          Signature stream id (with `--signature`)

          [default: 0]

      --batch <N>
          Frames per `send_batch` call

      --ring-depth <N>
          TX ring depth in frames (`afpacket`)

      --ring-bytes <BYTES>
          Memory of one TX ring / UMEM per worker in bytes (`afpacket`, `afxdp`; default: `tx.ring_bytes`, 16 MiB)

      --pin-core <CORE>
          Pin the TX thread to this CPU core (Linux; the first worker)

      --pin-cores <CORES>
          Pin worker i to the i-th core of this list, e.g. `1,2` (Linux)

      --workers <N>
          TX worker threads, each with its own backend instance (afpacket: socket and ring) and share of the stream and rate

          [default: 1]

      --qdisc-bypass
          Bypass the qdisc layer (`afpacket`, `PACKET_QDISC_BYPASS`)

      --no-tx-ring
          Use `sendmmsg` instead of the TPACKET_V3 TX ring (`afpacket`)

      --auto-pin
          Pin the workers to cores on the NIC's NUMA node, core 0 last (Linux; ignored when --pin-cores is given)

      --queue <N>
          First hardware queue (`afxdp`, `dpdk`; worker i uses queue N+i)

      --xdp-mode <MODE>
          AF_XDP bind mode: auto (zero-copy, else copy), copy or zerocopy

          [default: auto]

      --busy-poll
          Busy polling: `afxdp` sockets busy-poll the driver (kernel 5.11+) and `wpg send` paces with `--wait busy-poll` unless --wait says otherwise

      --eal-args <ARGS>
          DPDK EAL arguments (`dpdk`), e.g. "-a 0000:00:04.0 --file-prefix wpg" (split on whitespace; wpg adds `-l <first CPU>` and `--in-memory` unless given)

  -h, --help
          Print help

  -V, --version
          Print version

wpg render

Writes the frames of a template to a pcapng file without transmitting.

Render a template to a pcapng file without transmitting

Usage: wpg render [OPTIONS] --output <OUTPUT> <TEMPLATE>

Arguments:
  <TEMPLATE>
          Template file

Options:
  -o, --output <OUTPUT>
          Output pcapng file (`-` writes it to standard output)

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --count <COUNT>
          Number of packets

      --var <NAME=VALUE>
          Template variable override (`name=value`), repeatable; wins over --vars-file

      --vars-file <FILE>
          YAML or JSON map of template variable values

      --set <LAYER.FIELD=VALUE>
          Set a field to a fixed value, repeatable. LAYER is a protocol id, `proto[n]` or a layer index, e.g. `ipv4.ttl=1`

      --gen <LAYER.FIELD=GEN>
          Vary a field with a generator, repeatable, e.g. `udp.src_port=range:1000..1999`, `ipv4.dst=list:10.0.0.1,10.0.0.2`, `ipv4.id=random`

      --json
          Print the result (packets, bytes, path) as JSON on stdout

  -h, --help
          Print help

  -V, --version
          Print version

wpg import

Turns a capture (or pasted hex) into a template; see the pcap replay tutorial.

Convert a pcap/pcapng capture into a template

Usage: wpg import [OPTIONS] <INPUT>

Arguments:
  <INPUT>
          Input: a `.pcap` / `.pcapng` capture, a hex dump (`.hex`, see `--hex`) or `-` for standard input

Options:
  -o, --output <OUTPUT>
          Output template (`-` prints YAML on standard output)

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --per-packet <DIR>
          Write one template per packet into this directory instead of one merged template

      --first-protocol <PROTOCOL>
          Protocol the frames start with

          [default: ethernet2]

      --max-packets <N>
          Read at most this many packets

      --no-detect-generators
          Do not infer generators (range / list / random) from the packets

      --hex
          Treat the input as pasted hex (Wireshark hex stream, spaced bytes, hexdump)

  -h, --help
          Print help

  -V, --version
          Print version

wpg template

Template tools. lint exits with status 1 on errors; export and import pack templates into, and unpack them from, .wpgbundle archives.

Template tools (lint, list, migrate, export, import)

Usage: wpg template [OPTIONS] <COMMAND>

Commands:
  lint     Check templates for errors and warnings (exit status 3 on errors)
  list     List the templates of a directory (default: `templates/`)
  show     Print the built packet (hex dump and layout tree) of a template
  schema   Print the JSON Schema of the template format
  export   Pack templates (files or ids) into a `.wpgbundle` archive
  migrate  Upgrade templates to the current schema version
  import   Extract the templates of a `.wpgbundle` archive into a directory
  help     Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg template lint

Check templates for errors and warnings (exit status 3 on errors)

Usage: wpg template lint [OPTIONS] <FILES>...

Arguments:
  <FILES>...
          Template files

Options:
      --json
          Print the issues as JSON on stdout

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg template list

List the templates of a directory (default: `templates/`)

Usage: wpg template list [OPTIONS] [DIR]

Arguments:
  [DIR]
          Directory to scan recursively

Options:
      --json
          Print the list as JSON on stdout

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg template show

Print the built packet (hex dump and layout tree) of a template

Usage: wpg template show [OPTIONS] <FILE>

Arguments:
  <FILE>
          Template file

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --var <NAME=VALUE>
          Template variable override (`name=value`), repeatable; wins over --vars-file

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --vars-file <FILE>
          YAML or JSON map of template variable values

      --set <LAYER.FIELD=VALUE>
          Set a field to a fixed value, repeatable. LAYER is a protocol id, `proto[n]` or a layer index, e.g. `ipv4.ttl=1`

      --gen <LAYER.FIELD=GEN>
          Vary a field with a generator, repeatable, e.g. `udp.src_port=range:1000..1999`, `ipv4.dst=list:10.0.0.1,10.0.0.2`, `ipv4.id=random`

      --json
          Print the packet (hex, layers, fields) as JSON on stdout

  -h, --help
          Print help

  -V, --version
          Print version

wpg template schema

Print the JSON Schema of the template format

Usage: wpg template schema [OPTIONS]

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg template export

Pack templates (files or ids) into a `.wpgbundle` archive

Usage: wpg template export [OPTIONS] --output <OUTPUT> <TEMPLATES>...

Arguments:
  <TEMPLATES>...
          Template files, or ids (file stem / name slug) looked up in `--dir`

Options:
  -o, --output <OUTPUT>
          Output bundle

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --attach <FILE>
          Attach a capture (pcap / pcapng) or other file, repeatable

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --dir <DIR>
          Template library used to resolve ids (default: `templates/`)

  -h, --help
          Print help

  -V, --version
          Print version

wpg template migrate

Upgrade templates to the current schema version.

Directories are scanned recursively. The original of a rewritten file is kept as `<file>.bak`; the new file loses its comments. Files already at the current version are not touched.

Usage: wpg template migrate [OPTIONS] <PATHS>...

Arguments:
  <PATHS>...
          Template files or directories

Options:
      --check
          Only report outdated templates (exit status 1 if any needs migrating)

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --no-backup
          Do not keep a `.bak` copy of migrated files

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

wpg template import

Extract the templates of a `.wpgbundle` archive into a directory

Usage: wpg template import [OPTIONS] --output <OUTPUT> <BUNDLE>

Arguments:
  <BUNDLE>
          The bundle

Options:
  -o, --output <OUTPUT>
          Output directory

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --force
          Overwrite existing files

  -h, --help
          Print help

  -V, --version
          Print version

wpg ifaces

Lists interfaces with MAC, addresses, MTU, link state and driver.

List network interfaces usable for transmission

Usage: wpg ifaces [OPTIONS]

Options:
      --json
          Output JSON

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg doctor

Runs the environment checks described in Permissions; the exit status is non-zero when a check fails.

Diagnose privileges, drivers, hugepages and Npcap

Usage: wpg doctor [OPTIONS]

Options:
      --json
          Output JSON

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg bench

Unlimited-rate transmission of a synthetic frame (EtherType 0x88b5), or of a template with --template. See docs/perf.md for baselines. --json output fields: backend, detail, iface, frame_size, batch_size, packets, dropped, pps, bps (L2), l1_bps, elapsed.

Measure transmit performance

Usage: wpg bench [OPTIONS]

Options:
      --backend <BACKEND>
          Backend to benchmark

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -i, --iface <IFACE>
          Interface (for real backends)

      --duration <DURATION>
          Duration in seconds

          [default: 5]

      --frame-size <FRAME_SIZE>
          Frame size in bytes (without FCS)

          [default: 64]

      --template <FILE>
          Benchmark on-the-fly generation of this template instead of a fixed frame

      --var <NAME=VALUE>
          Template variable override (`name=value`), repeatable; wins over --vars-file

      --vars-file <FILE>
          YAML or JSON map of template variable values

      --set <LAYER.FIELD=VALUE>
          Set a field to a fixed value, repeatable. LAYER is a protocol id, `proto[n]` or a layer index, e.g. `ipv4.ttl=1`

      --gen <LAYER.FIELD=GEN>
          Vary a field with a generator, repeatable, e.g. `udp.src_port=range:1000..1999`, `ipv4.dst=list:10.0.0.1,10.0.0.2`, `ipv4.id=random`

      --json
          Output JSON

      --batch <N>
          Frames per `send_batch` call

      --ring-depth <N>
          TX ring depth in frames (`afpacket`)

      --ring-bytes <BYTES>
          Memory of one TX ring / UMEM per worker in bytes (`afpacket`, `afxdp`; default: `tx.ring_bytes`, 16 MiB)

      --pin-core <CORE>
          Pin the TX thread to this CPU core (Linux; the first worker)

      --pin-cores <CORES>
          Pin worker i to the i-th core of this list, e.g. `1,2` (Linux)

      --workers <N>
          TX worker threads, each with its own backend instance (afpacket: socket and ring) and share of the stream and rate

          [default: 1]

      --qdisc-bypass
          Bypass the qdisc layer (`afpacket`, `PACKET_QDISC_BYPASS`)

      --no-tx-ring
          Use `sendmmsg` instead of the TPACKET_V3 TX ring (`afpacket`)

      --auto-pin
          Pin the workers to cores on the NIC's NUMA node, core 0 last (Linux; ignored when --pin-cores is given)

      --queue <N>
          First hardware queue (`afxdp`, `dpdk`; worker i uses queue N+i)

      --xdp-mode <MODE>
          AF_XDP bind mode: auto (zero-copy, else copy), copy or zerocopy

          [default: auto]

      --busy-poll
          Busy polling: `afxdp` sockets busy-poll the driver (kernel 5.11+) and `wpg send` paces with `--wait busy-poll` unless --wait says otherwise

      --eal-args <ARGS>
          DPDK EAL arguments (`dpdk`), e.g. "-a 0000:00:04.0 --file-prefix wpg" (split on whitespace; wpg adds `-l <first CPU>` and `--in-memory` unless given)

  -h, --help
          Print help

  -V, --version
          Print version

wpg capture

Receive: counters, the first frames, pcapng output, signature verification

Usage: wpg capture [OPTIONS]

Options:
  -i, --iface <IFACE>
          Interface to receive on (`any` = every interface with `afpacket`); for the `pcapfile` backend the capture file to replay

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --backend <BACKEND>
          Receive backend: afpacket (Linux), pcap (feature `pcap`), pcapfile, null

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -f, --filter <EXPR>
          tcpdump-style filter, e.g. `udp port 5001 and wpg` (default: every frame)

  -c, --count <COUNT>
          Stop after this many matching frames

      --duration <DURATION>
          Stop after this long, e.g. `10s`

      --show <N>
          Print the first N matching frames

          [default: 5]

      --hex
          Also print a hex dump of the shown frames

  -w, --write <FILE>
          Write the matching frames to this pcapng file

      --verify
          Check the signatures stamped by `wpg send --signature` (loss / order / latency)

      --promisc
          Promiscuous mode

      --include-outgoing
          Also count frames this host transmits

      --json
          Machine-readable output

  -h, --help
          Print help

  -V, --version
          Print version

wpg config

wpg.toml tools; see the configuration reference.

Configuration file tools (init, show, validate) and API tokens

Usage: wpg config [OPTIONS] <COMMAND>

Commands:
  init          Write a fully commented example `wpg.toml`
  show          Print the effective configuration (file + environment) as TOML, secrets redacted
  validate      Check the configuration; exit status 1 on errors
  set-password  Prompt for the admin password and store its argon2id hash as `auth.password_hash` (the file is created from the example if missing)
  token         API tokens for scripts and `wpg remote` (create, list, revoke), stored in the server's database
  help          Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg config init

Write a fully commented example `wpg.toml`

Usage: wpg config init [OPTIONS]

Options:
      --path <FILE>
          Output file

          [default: wpg.toml]

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --force
          Overwrite an existing file

  -h, --help
          Print help

  -V, --version
          Print version

wpg config show

Print the effective configuration (file + environment) as TOML, secrets redacted

Usage: wpg config show [OPTIONS]

Options:
      --config <FILE>
          Configuration file (default: `wpg.toml` if present)

          [env: WPG_CONFIG]

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

  -h, --help
          Print help

  -V, --version
          Print version

wpg config validate

Check the configuration; exit status 1 on errors

Usage: wpg config validate [OPTIONS]

Options:
      --config <FILE>
          Configuration file (default: `wpg.toml` if present)

          [env: WPG_CONFIG]

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

  -h, --help
          Print help

  -V, --version
          Print version

wpg config set-password

Prompt for the admin password and store its argon2id hash as `auth.password_hash` (the file is created from the example if missing)

Usage: wpg config set-password [OPTIONS]

Options:
      --config <FILE>
          Configuration file to update

          [env: WPG_CONFIG]
          [default: wpg.toml]

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --stdin
          Read the password from the first line of standard input (no prompt)

  -h, --help
          Print help

  -V, --version
          Print version

wpg config token

Manages API tokens directly in the server’s database (<data_dir>/wpg.sqlite), also while the server runs. create prints only the secret on standard output.

API tokens for scripts and `wpg remote` (create, list, revoke), stored in the server's database

Usage: wpg config token [OPTIONS] <COMMAND>

Commands:
  create  Create a token and print its secret (shown only once)
  list    List the tokens (never their secrets)
  revoke  Revoke (delete) a token by id
  help    Print this message or the help of the given subcommand(s)

Options:
      --data-dir <DIR>
          Data directory holding `wpg.sqlite` (default: `data_dir` of the configuration)

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg config token create

Create a token and print its secret (shown only once)

Usage: wpg config token create [OPTIONS] <NAME>

Arguments:
  <NAME>
          Name, to recognise the token later

Options:
      --data-dir <DIR>
          Data directory holding `wpg.sqlite` (default: `data_dir` of the configuration)

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --user <USER>
          User the token acts as (with that user's role)

          [default: admin]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --expires-days <DAYS>
          Expire after this many days (default: never)

      --json
          Print the token and its secret as JSON

  -h, --help
          Print help

  -V, --version
          Print version

wpg config token list

List the tokens (never their secrets)

Usage: wpg config token list [OPTIONS]

Options:
      --data-dir <DIR>
          Data directory holding `wpg.sqlite` (default: `data_dir` of the configuration)

      --json
          Print JSON

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg config token revoke

Revoke (delete) a token by id

Usage: wpg config token revoke [OPTIONS] <ID>

Arguments:
  <ID>
          Token id (see `wpg config token list`)

Options:
      --data-dir <DIR>
          Data directory holding `wpg.sqlite` (default: `data_dir` of the configuration)

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote

Drives a running server through its API with an API token; see Authentication and TLS. Exit status: 0 success, 1 the job failed (jobs wait, jobs start --wait), 2 any other error.

Drive a running server with an API token (jobs, templates)

Usage: wpg remote [OPTIONS] <COMMAND>

Commands:
  jobs       Transmit jobs: list, start, stop, wait
  templates  The server's template library: list, push
  help       Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote jobs

Transmit jobs: list, start, stop, wait

Usage: wpg remote jobs [OPTIONS] <COMMAND>

Commands:
  list   List the server's jobs (running and recently finished)
  start  Start a job from a library template id or a local template file; prints the job id
  stop   Stop a job
  wait   Wait until a job ends; exit status 1 if it failed
  help   Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote jobs list

List the server's jobs (running and recently finished)

Usage: wpg remote jobs list [OPTIONS]

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote jobs start

Start a job from a library template id or a local template file; prints the job id

Usage: wpg remote jobs start [OPTIONS] <TEMPLATE>

Arguments:
  <TEMPLATE>
          Template id on the server, or a local `.wpg.yaml` file sent with the job

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --var <NAME=VALUE>
          Template variable value (repeatable)

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --rate <RATE>
          Rate, e.g. `1000pps`, `1Mpps`, `10Gbps`, `unlimited`

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --count <COUNT>
          Number of packets

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --duration <DURATION>
          Duration limit, e.g. `10s`, `2m`

      --json
          Print the server's JSON responses

  -i, --iface <IFACE>
          Interface on the server

      --backend <BACKEND>
          Transmit backend (default: the server's)

      --name <NAME>
          Job name

      --wait
          Wait until the job ends (like `wpg remote jobs wait`)

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote jobs stop

Stop a job

Usage: wpg remote jobs stop [OPTIONS] <ID>

Arguments:
  <ID>
          Job id

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote jobs wait

Wait until a job ends; exit status 1 if it failed

Usage: wpg remote jobs wait [OPTIONS] <ID>

Arguments:
  <ID>
          Job id

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --timeout <SECS>
          Give up after this many seconds (exit status 2)

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote templates

The server's template library: list, push

Usage: wpg remote templates [OPTIONS] <COMMAND>

Commands:
  list  List the templates on the server
  push  Upload a template file to the server's user templates; prints its id
  help  Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote templates list

List the templates on the server

Usage: wpg remote templates list [OPTIONS]

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg remote templates push

Upload a template file to the server's user templates; prints its id

Usage: wpg remote templates push [OPTIONS] <FILE>

Arguments:
  <FILE>
          Template file (`.wpg.yaml`)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --server <URL>
          Server URL

          [env: WPG_SERVER]
          [default: http://127.0.0.1:8080]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

      --token <TOKEN>
          API token (`wpg_...`). Visible in the process list: prefer `WPG_TOKEN`

          [env: WPG_TOKEN]

      --insecure
          Accept any TLS certificate (for servers with a self-signed certificate)

      --json
          Print the server's JSON responses

  -h, --help
          Print help

  -V, --version
          Print version

wpg protocols

Protocol tools (list, show, check user-defined protocol files)

Usage: wpg protocols [OPTIONS] <COMMAND>

Commands:
  list   List the protocols: built-in ones and those of `--protocols-dir`
  show   Print a protocol definition, as an extension file to start a new protocol from (change its `id` first)
  check  Check user-defined protocol files (exit status 1 on errors)
  help   Print this message or the help of the given subcommand(s)

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg protocols list

List the protocols: built-in ones and those of `--protocols-dir`

Usage: wpg protocols list [OPTIONS]

Options:
      --json
          Output JSON

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg protocols show

Print a protocol definition, as an extension file to start a new protocol from (change its `id` first)

Usage: wpg protocols show [OPTIONS] <ID>

Arguments:
  <ID>
          Protocol id (`udp`, `ipv4`, ...)

Options:
      --json
          Output the definition as JSON instead of YAML

      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help

  -V, --version
          Print version

wpg protocols check

Check user-defined protocol files (exit status 1 on errors).

The files are checked together, with the built-in protocols and the other files of `--protocols-dir`.

Usage: wpg protocols check [OPTIONS] <PATHS>...

Arguments:
  <PATHS>...
          Extension files (`*.yaml`) or directories holding them

Options:
      --protocols-dir <DIR>
          Directory of user-defined protocol files (`*.yaml`, repeatable; added to `[protocols] dirs` of the configuration)

          [env: WPG_PROTOCOLS_DIR]

      --config <FILE>
          Configuration file (default: `wpg.toml` in the working directory, if any). `wpg send` also takes its default backend and rate limit from `[tx]`

          [env: WPG_CONFIG]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Configuration

The server reads wpg.toml from the working directory, or the file given with --config / WPG_CONFIG. Precedence, lowest first: built-in defaults, the file, environment variables WPG_<SECTION>__<KEY> (__ separates nesting levels, for example WPG_SERVER__BIND=0.0.0.0:8080 or WPG_TX__ALLOWED_IFACES='["eth1"]'), then command line options such as wpg serve --bind. Unknown keys are errors. wpg config init writes the commented example below, wpg config show prints the effective configuration, wpg config validate checks it and wpg config set-password stores the admin password hash. The admin password itself is not a key: wpg serve --password, --password-file and WPG_PASSWORD take precedence over auth.password_hash and auth.password_file. This page is generated from the configuration types.

Keys

Top level

KeyTypeDefaultEnvironment variableDescription
data_dirstringOS data directory (Linux: ~/.local/share/wpg)WPG_DATA_DIRDirectory for server state: user templates, favourites, the SQLite database (users, sessions, job history), dry-run captures and the self-signed TLS certificate.

[auth]

Authentication.

KeyTypeDefaultEnvironment variableDescription
password_filestringWPG_AUTH__PASSWORD_FILEFile holding the admin password: an argon2 PHC string, or plain text that is hashed at startup.
password_hashstringWPG_AUTH__PASSWORD_HASHargon2id PHC string of the admin password; wpg config set-password writes it.
session_ttl_secsinteger86400WPG_AUTH__SESSION_TTL_SECSSession lifetime in seconds (sliding: every request extends it).

[dhcp]

DHCP server tool (DHCPv4 / DHCPv6 on one interface; pools and options are edited on the DHCP screen).

KeyTypeDefaultEnvironment variableDescription
enabledbooleantrueWPG_DHCP__ENABLEDEnables the DHCP screen and the /api/dhcp endpoints.
ifacestring""WPG_DHCP__IFACEInterface the DHCP server answers on, e.g. eth1 (deploy.sh --dhcp-iface). Empty: chosen on the screen among tx.allowed_ifaces.

[log]

Logging.

KeyTypeDefaultEnvironment variableDescription
ansibooleantrueWPG_LOG__ANSIColour the console output when it is a terminal.
filestringWPG_LOG__FILEAlso write to this file (its directory is created).
format"pretty" | "json""pretty"WPG_LOG__FORMATLine format: pretty (human readable) or json (one object per line).
levelstring"info"WPG_LOG__LEVELFilter directives (RUST_LOG overrides them), for example info or wpg_tx=debug,info.
max_filesintegerWPG_LOG__MAX_FILESKeep at most this many rotated files (the oldest are deleted).
rotation"never" | "hourly" | "daily""never"WPG_LOG__ROTATIONRotation of the file: never, hourly or daily.

[protocols]

User-defined protocols.

KeyTypeDefaultEnvironment variableDescription
dirsstring[][]WPG_PROTOCOLS__DIRSDirectories of user-defined protocol files (*.yaml: new protocol definitions and bindings under existing protocols), loaded at startup in file name order. wpg serve --protocols-dir adds more.

[server]

HTTP listener.

KeyTypeDefaultEnvironment variableDescription
base_urlstringWPG_SERVER__BASE_URLPublic URL of the server behind a reverse proxy (https://wpg.example.net), used for absolute links.
bindstring"127.0.0.1:8080"WPG_SERVER__BINDListen address. Without a password (and no user created on the setup screen) only loopback addresses are accepted (--allow-insecure overrides).
job_historyinteger100WPG_SERVER__JOB_HISTORYFinished jobs kept in memory and listed on the Jobs screen and by the API (1–100000).
job_history_dbinteger1000WPG_SERVER__JOB_HISTORY_DBFinished jobs kept in the database; older ones are deleted (1–10000000).
preview_maxinteger256WPG_SERVER__PREVIEW_MAXMost packets one preview request (POST /api/render) may render (1–100000).
self_signed_tlsbooleanfalseWPG_SERVER__SELF_SIGNED_TLSServe HTTPS with a self-signed certificate generated into <data_dir>/tls/ (reused on later starts); wpg serve --tls sets it.

[server.tls]

TLS certificate chain and private key (PEM) to serve HTTPS with; takes precedence over self_signed_tls.

KeyTypeDefaultEnvironment variableDescription
certstringWPG_SERVER__TLS__CERTPEM certificate chain.
keystringWPG_SERVER__TLS__KEYPEM private key.

[snmp]

SNMP manager tool (Get / Walk / Set / traps, MIB upload).

KeyTypeDefaultEnvironment variableDescription
enabledbooleantrueWPG_SNMP__ENABLEDEnables the SNMP tool screen and the /api/snmp endpoints.
mib_dirstring""WPG_SNMP__MIB_DIRDirectory of uploaded MIB files. Empty: <data_dir>/mibs.
trap_listenstring""WPG_SNMP__TRAP_LISTENAddress the trap / inform receiver listens on from startup, e.g. 0.0.0.0:162 (ports below 1024 need root or CAP_NET_BIND_SERVICE). Empty: not started at boot (it can be started from the UI).

[templates]

Template library.

KeyTypeDefaultEnvironment variableDescription
library_pathsstring[]["./templates"]WPG_TEMPLATES__LIBRARY_PATHSRead-only template libraries (Git checkouts, for example), scanned recursively for *.wpg.yaml / *.wpg.json and reloaded when files change.
user_dirstringWPG_TEMPLATES__USER_DIRWritable directory for templates created or imported in the GUI; default <data_dir>/templates.

[terminal]

Web terminal: SSH / Telnet sessions the server opens for logged-in users (see the web terminal guide).

KeyTypeDefaultEnvironment variableDescription
allowed_targetsstring[][]WPG_TERMINAL__ALLOWED_TARGETSTargets sessions may connect to: host, host:port, *.domain, an IP address or a CIDR block (10.0.0.0/8, [2001:db8::1]:830); empty = any target.
enabledbooleanfalseWPG_TERMINAL__ENABLEDEnable the web terminal. Off by default.
idle_timeout_secsinteger1800WPG_TERMINAL__IDLE_TIMEOUT_SECSClose a session after this many seconds without input or output; 0 = never.
max_sessionsinteger8WPG_TERMINAL__MAX_SESSIONSMaximum number of simultaneous sessions (all users).
record_sessionsbooleantrueWPG_TERMINAL__RECORD_SESSIONSAllow session logs (what the remote side sends) under <data_dir>/terminal-logs; false disables server-side logs.

[tx]

Transmit policy and defaults.

KeyTypeDefaultEnvironment variableDescription
allowed_ifacesstring[][]WPG_TX__ALLOWED_IFACESInterfaces jobs may send on; empty = all. The null backend and dry runs are not restricted.
default_backendstringWPG_TX__DEFAULT_BACKENDBackend used when a job names none (null, pcapfile, afpacket, pcap, afxdp, dpdk); unset = afpacket on Linux, else pcap, else null.
dpdk_eal_argsstring[][]WPG_TX__DPDK_EAL_ARGSDPDK EAL arguments for the dpdk backend, e.g. ["-a", "0000:00:04.0"]. wpg adds -l <first CPU> and --in-memory unless given. EAL starts once per process with the first dpdk job; changing them needs a restart.
max_ratestringWPG_TX__MAX_RATEHighest rate a job may request (100kpps, 1Gbps); jobs without a rate are sent at this rate.
prerender_max_bytesinteger268435456WPG_TX__PRERENDER_MAX_BYTESPre-render a stream (build every frame before sending) only when packets × frame length is at most this many bytes; larger streams are built on the fly. 0 never pre-renders unless --plan prerender asks for it. Up to 1 TiB; wpg send --prerender-max-bytes overrides.
prerender_max_packetsinteger100000000WPG_TX__PRERENDER_MAX_PACKETSPre-render a stream only when it has at most this many packets. wpg send --prerender-max-packets overrides.
ring_bytesinteger16777216WPG_TX__RING_BYTESMemory of one afpacket TX ring or afxdp UMEM per worker, in bytes (1 MiB–1 GiB); the ring depth is reduced to fit. The memory is locked: raise ulimit -l for large values. --ring-bytes overrides.

Example (wpg config init)

Every active line equals the built-in default, so the file changes nothing until edited; the commented lines show the optional keys.

# wpg.toml — Web Packet Generator configuration.
#
# Precedence (lowest first): built-in defaults < this file < environment variables
# (WPG_<SECTION>__<KEY>, e.g. WPG_SERVER__BIND=0.0.0.0:8080 or
# WPG_TX__ALLOWED_IFACES='["eth1"]') < command line options (wpg serve --bind ...).
# Unknown keys are rejected. Check a file with `wpg config validate`, print the
# effective configuration with `wpg config show`.

# Server state: user templates, favourites, job history, dry-run captures.
# Default: the OS data directory (Linux: ~/.local/share/wpg).
# data_dir = "/var/lib/wpg"

[server]
# Listen address. Without a password keep it on localhost.
bind = "127.0.0.1:8080"
# Public URL when running behind a reverse proxy.
# base_url = "https://wpg.example.net"
# Serve HTTPS with a self-signed certificate generated into <data_dir>/tls/
# (same as `wpg serve --tls`). Ignored when [server.tls] is set.
self_signed_tls = false
# Most packets one preview request may render (1-100000).
preview_max = 256
# Finished jobs listed on the Jobs screen (kept in memory, 1-100000) and kept in
# the database (1-10000000; older ones are deleted).
job_history = 100
job_history_db = 1000

# TLS certificate chain and private key (PEM) to serve HTTPS with.
# [server.tls]
# cert = "/etc/wpg/cert.pem"
# key = "/etc/wpg/key.pem"

[auth]
# Admin password. Without one (and without a user created on the first-run
# setup screen) the server only listens on localhost. Sources, highest first:
# `wpg serve --password`, `--password-file`, $WPG_PASSWORD, password_hash,
# password_file, the setup screen.
# argon2id hash of the admin password (`wpg config set-password` writes it):
# password_hash = "$argon2id$v=19$m=19456,t=2,p=1$..."
# Or a file holding the hash or the plain-text password:
# password_file = "/etc/wpg/password"
# Session lifetime in seconds (extended by every request).
session_ttl_secs = 86400

[templates]
# Read-only template libraries (Git checkouts etc.), scanned recursively for
# *.wpg.yaml / *.wpg.json and reloaded when files change.
library_paths = ["./templates"]
# Writable directory for templates created or imported in the GUI.
# Default: <data_dir>/templates
# user_dir = "/var/lib/wpg/templates"

[protocols]
# Directories of user-defined protocol files (*.yaml), loaded at startup.
# Changes need a restart.
# dirs = ["/etc/wpg/protocols.d"]

[tx]
# Interfaces jobs may send on; empty = all. The null backend and dry runs are
# not restricted.
allowed_ifaces = []
# Highest rate a job may request, e.g. "100kpps" or "1Gbps". Jobs without a rate
# are sent at this rate.
# max_rate = "100kpps"
# Backend when a job names none: null, pcapfile, afpacket, pcap, afxdp, dpdk.
# Default: afpacket on Linux, else pcap, else null.
# default_backend = "afpacket"
# DPDK EAL arguments for the dpdk backend (wpg adds "-l <first CPU>" and
# "--in-memory" unless given). EAL starts with the first dpdk job; changing them
# needs a restart.
# dpdk_eal_args = ["-a", "0000:00:04.0"]
# Streams are pre-rendered (every frame built before sending) when they have at
# most prerender_max_packets packets and packets * frame length is at most
# prerender_max_bytes (default 256 MiB, up to 1 TiB); larger ones are built on
# the fly. `wpg send --prerender-max-bytes / --prerender-max-packets` override.
prerender_max_bytes = 268435456
prerender_max_packets = 100000000
# Memory of one afpacket TX ring / afxdp UMEM per worker in bytes (1 MiB-1 GiB,
# default 16 MiB); --ring-depth is reduced to fit. Locked memory: raise
# `ulimit -l` / LimitMEMLOCK for large values.
ring_bytes = 16777216

[snmp]
# SNMP tool screen and API (Get / Walk / Set / traps, MIB upload).
enabled = true
# Trap / inform receiver started at boot, e.g. "0.0.0.0:162" (ports below 1024
# need root or CAP_NET_BIND_SERVICE). Empty: not started at boot (it can be
# started from the UI).
trap_listen = ""
# Directory of uploaded MIB files. Empty: <data_dir>/mibs
mib_dir = ""

[dhcp]
# DHCP screen and API (DHCPv4 / DHCPv6 server, Linux only). Pools and options
# are edited on the screen and kept in <data_dir>/dhcp.json.
enabled = true
# Interface the server answers on, e.g. "eth1". Empty: chosen on the screen
# among tx.allowed_ifaces. Ports 67 / 547 need root or CAP_NET_BIND_SERVICE.
iface = ""

[log]
# Filter directives (RUST_LOG overrides this), e.g. "info" or "wpg_tx=debug,info".
level = "info"
# "pretty" or "json".
format = "pretty"
# Also write to this file (its directory is created).
# file = "/var/log/wpg/wpg.log"
# Rotation of the file: "never", "hourly" or "daily".
rotation = "never"
# Keep at most this many rotated files.
# max_files = 7
# Colour the console output when it is a terminal.
ansi = true

[terminal]
enabled = false          # Web terminal (SSH / Telnet)
allowed_targets = []     # "host", "host:port" or CIDR; empty = any target
record_sessions = true   # keep session logs under <data_dir>/terminal-logs
idle_timeout_secs = 1800
max_sessions = 8

Deploying (deploy.bat / deploy.ps1 / deploy.sh)

Status: draft

These scripts install wpg on a Linux host (Ubuntu 20.04 to 24.04, Debian; first target: an Ubuntu node on CML2) over SSH. From Windows use scripts\deploy.bat (a wrapper around scripts\deploy.ps1), from Linux / macOS scripts/deploy.sh. Both run the same host-side scripts (scripts/lib/*.sh), so the result is the same.

There are no arguments to remember. Started without arguments, a wizard asks for everything it needs, one question at a time, in English or Japanese (from the system language). Every question has a default in [ ] that Enter accepts.

It can run unattended too. With the answer file the wizard offers to save at the end, the same deploy runs without any question (scheduled upgrades, several hosts, CI); see Unattended deploy.

Windows

Open the scripts folder of the repository in Explorer and double-click deploy.bat. From PowerShell:

.\scripts\deploy.bat           # or: powershell -ExecutionPolicy Bypass -File .\scripts\deploy.ps1

Requirements: the OpenSSH client (ssh, scp, ssh-keygen) and tar.exe that ship with Windows 10 1809 and later / Windows 11. If the OpenSSH client is missing, add it under Settings > Apps > Optional features. Rust and Git are not needed on Windows (with Git, the source is packed with git archive).

Linux / macOS

scripts/deploy.sh              # no arguments = the wizard (or: just deploy-wizard)

sshpass is used for the SSH password when it is installed (not required).

What it looks like

A first run (Windows PowerShell 5.1, English system). Input at ******** is not shown.

wpg deploy wizard (Enter accepts the default in [ ]; Ctrl+C aborts)
Target host (IP address or name): 192.0.2.10
SSH port [22]:
SSH user [ubuntu]: cisco
SSH authentication:
  1) Password (used once to install a deploy key)
  2) An existing private key file
Choose a number [1]:

[1] Connecting to cisco@192.0.2.10
SSH password (cisco@192.0.2.10): ********
  Created the deploy key C:\Users\you\.ssh\wpg_deploy_ed25519
  Installing the public key into ~/.ssh/authorized_keys on the host (the password is used this once).
  Key login works; no password needed next time.
  OS: Ubuntu 24.04.1 LTS (x86_64)   sudo: password   wpg: -
How to get the wpg binary:
  1) Build from source on the host (recommended; needs internet there; 10-30 min the first time)
  2) Upload a Linux binary file you already have
  3) Download from a GitHub Release (no release yet)
Choose a number [1]:
Source code:
  1) Upload this checkout (C:\work\web-packet-generator)
  2) git clone from GitHub
Choose a number [1]:
Install as a systemd service (starts at boot)? [Y/n]:
Web UI listen address:port (0.0.0.0 = all) [0.0.0.0:8080]:
Interfaces jobs may send on (tx.allowed_ifaces):
  1) ens2         UP       192.0.2.10/24  <- management (this SSH session)
  2) ens3         UP
  3) ens4         UP
Numbers, comma separated (e.g. 2,3; all = no restriction) [2,3]:
Enable the web terminal? (newer wpg only) [y/N]:
Enable the SNMP trap receiver (UDP 162)? (newer wpg only) [y/N]: y
Interface the DHCP server answers on (empty / - = chosen on the screen; newer wpg only): ens4
Static addresses for ens4 (address/len, comma separated, e.g. 192.168.100.1/24,2001:db8:1::1/64; empty / - = none): 192.168.100.1/24
sudo password (Enter = same as the SSH password):
wpg admin password (Web UI login): ********
Repeat it: ********

Summary
  Host : cisco@192.0.2.10 (port 22)
  Binary : build on the host (this checkout: C:\work\web-packet-generator)
  Service : systemd (wpg.service)
  Listen : 0.0.0.0:8080
  TX interfaces : ens3,ens4
  Admin password : set
  Web terminal : off
  SNMP traps : on (UDP 162)
  DHCP server : ens4 192.168.100.1/24
Go ahead? [Y/n]:
Save these answers for next time? (no passwords) [Y/n]:
Saved the answers to C:\Users\you\AppData\Roaming\wpg\deploy.conf (no passwords).
log: C:\Users\you\AppData\Local\wpg\deploy-logs\deploy-20261027-101500.log

[2/6] Uploading to cisco@192.0.2.10:/tmp/wpg-deploy.Xa81Qe
[3/6] Installing the build dependencies (apt)
  -> apt-get install build-essential pkg-config libpcap-dev curl git ca-certificates tar
[4/6] Building on the host (10-30 minutes the first time)
  -> installing rustup (https://rustup.rs) into ~/.cargo
  -> installed trunk 0.22.1 (prebuilt)
  ...
  -> built wpg 0.1.0
[5/6] Installing (sudo)
  -> installed wpg 0.1.0 to /usr/local/bin/wpg
  -> setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/local/bin/wpg
  -> systemd unit wpg.service (re)started
[6/6] Health check (http://127.0.0.1:8080/api/health)
  {"status":"ok","version":"0.1.0",...}

Done. Open in a browser:
  http://192.0.2.10:8080/

The deploy.sh wizard asks the same questions (its binary menu also offers “Build on this machine and upload”, and it asks for the sudo password right after connecting).

The questions

QuestionDefaultNotes
Target hostlast valueIP address or name.
SSH port22
SSH userubuntuA user that may use sudo.
AuthenticationpasswordUsed once to install a deploy key (see below); an existing key file works too. Not asked when a key login already works.
sudo passwordsame as the SSH passwordNot asked with NOPASSWD sudo or a root login. Asked again up to 3 times when wrong.
Binarybuild on the hostThe default changes when the host cannot reach the internet; see “Getting the binary”.
Install as a serviceyessystemd wpg.service.
Listen address0.0.0.0:8080With 127.0.0.1:8080 the UI is only reachable through an SSH tunnel.
Admin password(required)Web UI login (user admin), typed twice. Enter keeps it when wpg is already installed.
TX interfacesall but the management oneThe host’s ip -br addr, numbered; the interface carrying the SSH session is marked “management”. all = no restriction.
Web terminal / SNMP trapsnoOnly enabled when the installed wpg supports them (see below).

Later runs

The answers (never the passwords) are saved to %APPDATA%\wpg\deploy.conf on Windows and ~/.config/wpg/deploy.conf on Linux / macOS. The next run starts with “Use the previous settings?”; Enter repeats the last deployment and only the passwords are asked (the SSH password is not needed any more, the key works). After a successful deploy the wizard offers to save a file that runs the same deploy without questions (Unattended deploy).

When wpg is installed and a wpg.prev exists, a menu comes first:

wpg is installed (wpg 0.1.0). What do you want to do?
  1) Install / upgrade
  2) Roll back (restore the previous binary wpg.prev)
  3) Quit

Getting the binary

MethodWhenNeeds
Build from source on the host (default)Almost always: the binary matches the host’s glibc.Internet access from the host (apt, rustup, crates.io, GitHub); 2 GiB of memory or swap; about 5 GiB of free disk.
Upload a Linux binaryYou already built one on another Linux machine.A wpg ELF file (Windows’ wpg.exe does not work). A binary built against a newer glibc than the host’s does not run.
Download a GitHub ReleaseOnce releases are published.Internet access from your machine. There are no releases yet (the wizard says “no release yet”).
Build on this machine (deploy.sh only)Your machine is Linux on the same CPU architecture.Rust and trunk (the original deploy.sh behaviour).

Building on the host:

  1. As root, installs build-essential, pkg-config, libpcap-dev, curl, git and ca-certificates with apt-get (on dnf-based distributions the equivalent packages, best effort).
  2. As the SSH user, installs rustup (stable, minimal profile, ~/.cargo), the wasm32-unknown-unknown target and trunk (prebuilt; cargo install trunk when that fails).
  3. Puts the source into ~/wpg-build/src: by default this checkout, uploaded (git archive when Git is available, including uncommitted changes of tracked files but not untracked files; otherwise tar.exe without target and the like), or a git clone from GitHub at a branch / tag.
  4. Runs scripts/build.sh --release. ~/wpg-build/target is kept, so later builds are incremental. The number of parallel jobs is lowered on hosts with little memory.

What one run does

  1. Connects over SSH (installing the key if needed) and reads facts about the host (OS, CPU, sudo, interfaces, installed wpg, internet access).
  2. Uploads to a temporary directory on the host (/tmp/wpg-deploy.*, removed at the end).
  3. (When building on the host) installs the dependencies and builds.
  4. Installs (scripts/lib/deploy-remote.sh as root): the binary goes to /usr/local/bin/wpg (the previous one stays as wpg.prev) with setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip (installing libcap2-bin first if setcap is missing and apt-get exists). For the service it creates the wpg system user, /etc/wpg/wpg.toml (only if missing), /etc/wpg/wpg.env and /etc/wpg/password, and (re)starts wpg.service. If ufw / firewalld is active and the port is not open, it prints how to open it (the firewall is never changed).
  5. Prints wpg doctor from the host and waits for GET /api/health (30 s; shows the last journal lines if the server does not answer).
  6. Prints the URL to open.

Steps are numbered ([3/6]) and coloured, and everything also goes to a log file (Windows: %LOCALAPPDATA%\wpg\deploy-logs\, deploy.sh wizard: ~/.local/state/wpg/). On a failure the scripts name the failing step, show the last lines of output and suggest a fix.

From the command line

deploy.sh

All the original options still work.

# Build, upload, setcap only (run `wpg send` / `wpg serve` yourself on the host)
scripts/deploy.sh ubuntu@192.0.2.10

# Install as a service that listens on all addresses, allows sending only on ens3
scripts/deploy.sh ubuntu@192.0.2.10 --service --iface ens3 --password-file ./admin-password

# Build from source on the host and install (the password is asked once, a key is installed)
scripts/deploy.sh ubuntu@192.0.2.10 --ask-password --sudo-password --build-on-host --service --iface ens3

# The same through the task runner
just deploy ubuntu@192.0.2.10

# Show what would run, without touching anything
scripts/deploy.sh ubuntu@192.0.2.10 --service --dry-run

--password-file takes a local file whose first line is the admin password (plain text) or its argon2id hash; it lands on the host as /etc/wpg/password (mode 0640, group wpg). Without it, and without a password already on the host (/etc/wpg/password, password_hash / password_file in /etc/wpg/wpg.toml, or an existing user database), the script refuses to start the server on a non-loopback address: use --bind 127.0.0.1:8080 plus an SSH tunnel (ssh -L 8080:127.0.0.1:8080 ubuntu@192.0.2.10), or --allow-insecure on an isolated lab network.

OptionMeaning
(none), --interactiveThe wizard.
--iface <name>Interface jobs may send on (repeatable); written as WPG_TX__ALLOWED_IFACES. Leave the management interface out.
--serviceInstall / update wpg.service and restart it.
--no-serviceDo not install the service (overrides service=1 of --config).
--bind <addr:port>Listen address of the service (default 0.0.0.0:8080).
--password-file <file>Admin password (or argon2 hash) for the service.
--allow-insecureStart without a password on a non-loopback address (adds a drop-in running wpg serve --allow-insecure).
--binary <file>Deploy this binary instead of target/release/wpg.
--target <triple>Build for another target, e.g. aarch64-unknown-linux-gnu (needs a cross linker).
--build-on-hostBuild from source on the host: --source local (default: upload this checkout) or --source git (--git-url, --git-ref; default: GitHub, main).
--release-tag <tag>Use the Linux binary of a GitHub Release (latest for the newest).
--prefix <dir>Install prefix on the host (default /usr/local).
--port <n>, --ssh-opt <opt>SSH port and extra -o options (e.g. --ssh-opt IdentityFile=~/.ssh/lab).
--identity <file>SSH private key to use.
--ask-passwordAsk for the SSH password once and install the deploy key ~/.ssh/wpg_deploy_ed25519 on the host.
--sudo-passwordAsk for the sudo password up front and pass it to sudo -S on stdin (default: sudo asks on the SSH terminal).
--terminal, --snmp-trapEnable the web terminal / the SNMP trap receiver (see below).
--dhcp-iface <name>Pin the interface the DHCP server answers on (WPG_DHCP__IFACE in /etc/wpg/wpg.env; with --service). See DHCP server.
--dhcp-iface-addr <addr/len>Static addresses for --dhcp-iface (repeatable or comma separated, e.g. 192.168.100.1/24,2001:db8:1::1/64): written to /etc/netplan/90-wpg-<iface>.yaml and applied with netplan apply. Refused for an interface carrying the default route.
--no-templatesDo not copy the sample templates to /usr/local/share/wpg/templates.
--no-healthcheckSkip the health check.
--rollbackSwap /usr/local/bin/wpg with wpg.prev and restart the service. Running it twice undoes it.
--dpdk, --hugepages <n>Prepare the host for DPDK (see below).
--profile <file>, --lang <ja|en>, --log <file>Wizard answers file, message language, log file.
--dry-runPrint the commands instead of running them.
--config, --yes, --json, --skip-if-current, --check-config, --targets, --section, --parallel, --setUnattended runs (Unattended deploy).

deploy.ps1

Everything the wizard asks can also be passed as parameters. With -HostName the wizard does not start (only missing passwords are asked; with -Yes nothing is asked and a missing one fails at once).

# Build on the host and install the service, without questions (sudo password from WPG_DEPLOY_SUDO_PASSWORD, ...)
.\scripts\deploy.ps1 -HostName 192.0.2.10 -User cisco -Iface ens3,ens4 -Yes

# Use a Linux binary you already have
.\scripts\deploy.ps1 -HostName 192.0.2.10 -User cisco -BinarySource file -Binary .\wpg

# Build the v0.2.0 tag from GitHub
.\scripts\deploy.ps1 -HostName 192.0.2.10 -Source git -GitRef v0.2.0

# Roll back
.\scripts\deploy.ps1 -HostName 192.0.2.10 -User cisco -Rollback
ParameterMeaning
-HostName, -User, -Port, -IdentityHost, SSH user (default ubuntu), port, existing private key.
-SshPassword, -SudoPassword, -AdminPasswordSecureStrings (e.g. (Read-Host -AsSecureString)); asked when needed if omitted.
-BinarySource build|file|releaseBuild on the host (default), the file -Binary, or a GitHub Release (-ReleaseTag).
-Source local|git, -GitUrl, -GitRefSource to build.
-Bind, -IfaceListen address, interfaces jobs may send on.
-NoServiceDo not install the service (installed by default).
-Terminal, -SnmpTrapWeb terminal / SNMP trap receiver.
-DhcpIface, -DhcpIfaceAddrDHCP server interface and static addresses (as --dhcp-iface / --dhcp-iface-addr).
-Rollback, -NoTemplates, -NoHealthcheckAs in deploy.sh.
-ProfilePath, -Lang ja|en, -LogFileAnswers file, message language, log file.
-Interactive, -Yes, -DryRunStart the wizard with the parameters as defaults / never ask anything (no confirmation, no password) / only connect and check, without building or installing.
-Prefix, -AllowInsecureInstall prefix on the host, start without a password (as in deploy.sh).
-ConfigFile, -Json, -SkipIfCurrent, -CheckConfig, -Targets, -Section, -Parallel, -SetUnattended runs (Unattended deploy).

Unattended deploy

Use the wizard when you deploy by hand. To repeat a known setup (scheduled upgrades, several hosts, CI), use an answer file plus --yes: the scripts then run to the end without a single question.

The easy way: let the wizard write it

At the end of a successful wizard run the scripts ask:

Save a file to run this deploy unattended (automatically) from now on? (no passwords) [Y/n]:
File [C:\Users\you\AppData\Roaming\wpg\deploy-192.0.2.10.conf]:
Save the sudo password encrypted? (Windows DPAPI: only this Windows user on this PC can decrypt it) [Y/n]:
Saved C:\Users\you\AppData\Roaming\wpg\deploy-192.0.2.10.conf (no plain-text passwords).
From now on this one line runs the same deploy without questions:
  powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\work\web-packet-generator\scripts\deploy.ps1" -ConfigFile "C:\Users\you\AppData\Roaming\wpg\deploy-192.0.2.10.conf" -Yes -SkipIfCurrent
Scheduled run, e.g. Task Scheduler every Sunday at 3:17 (logs stay in %LOCALAPPDATA%\wpg\deploy-logs):
  schtasks /Create /TN "wpg deploy 192.0.2.10" /SC WEEKLY /D SUN /ST 03:17 /TR "..."

Copy the printed line as it is (deploy.sh prints scripts/deploy.sh --config ~/.config/wpg/deploy-192.0.2.10.conf --yes --skip-if-current and a cron line). SSH uses the deploy key the wizard installed, so no SSH password is needed. When sudo needs a password, Windows can keep it DPAPI-encrypted (the question above); on Linux / macOS use an environment variable or a password file (see below).

The answer file

Same format as the wizard’s deploy.conf (key=value lines, # starts a comment); you can also write it by hand. Both scripts read the same file.

# deploy.wpg.conf
host=192.0.2.10
user=cisco
binary_source=build
source=git
git_ref=main
bind=0.0.0.0:8080
ifaces=ens3,ens4
service=1
sudo_password_file=/home/you/.config/wpg/sudo.pw
scripts/deploy.sh --config deploy.wpg.conf --yes                       # Linux / macOS
scripts/deploy.sh --config deploy.wpg.conf --check-config              # only show the settings (no connection)
.\scripts\deploy.ps1 -ConfigFile .\deploy.wpg.conf -Yes                 # Windows

Relative paths in the file (binary_file, identity, *_password_file, …) are relative to the answer file. Command-line options win over the file (--set key=value / -Set "key=value" overrides any key). An unknown key is an error (exit code 1), so typos do not go unnoticed.

KeyDefaultMeaning
host(required)Target host; user@host works too.
userubuntuSSH user.
ssh_port (port)22SSH port.
identity(none)SSH private key. Without it: the deploy key (wpg_deploy_ed25519), then ssh-agent / your default keys.
binary_sourcebuildbuild (on the host), file (upload binary_file), release (GitHub Release); deploy.sh also has local (build on this machine).
binary_fileLinux binary for binary_source=file.
sourcelocalSource for build: local (upload this checkout) or git.
git_url, git_refGitHub, mainRepository and branch / tag / commit for source=git.
release_taglatestTag for binary_source=release.
bind0.0.0.0:8080Listen address.
ifaces(all)Interfaces jobs may send on (comma separated).
service1Install the systemd service.
terminal, snmp_trap0Web terminal / SNMP trap receiver.
dhcp_iface, dhcp_iface_addremptyDHCP server interface and static addresses (comma separated).
templates, healthcheck1Copy the sample templates / run the health check.
allow_insecure0Listen on a non-loopback address without a password.
prefix/usr/localInstall prefix on the host.
skip_if_current0Same as --skip-if-current.
dpdk, hugepages0, 1024DPDK host preparation (deploy.sh only).
admin_password_file, ssh_password_file, sudo_password_fileA file you create with the password on its first line. admin_password_file may hold an argon2 hash instead.
admin_password_dpapi, ssh_password_dpapi, sudo_password_dpapiDPAPI-encrypted file (deploy.ps1 on Windows only; written by the wizard).
namesection / hostName in the result table and the JSON.
parallel1Several hosts: how many at a time.
langfrom the environmentja / en.

Booleans are 1 / 0 (yes / no, true / false work too).

Secrets without questions

SourceSSHsudoAdmin (web UI)
SSH key (recommended)deploy key / identity= / ssh-agent--
EnvironmentWPG_DEPLOY_SSH_PASSWORDWPG_DEPLOY_SUDO_PASSWORDWPG_DEPLOY_ADMIN_PASSWORD
File you create (chmod 600)ssh_password_file=sudo_password_file=admin_password_file=
DPAPI file (Windows)ssh_password_dpapi=sudo_password_dpapi=admin_password_dpapi=
  • Searched top to bottom. In deploy.ps1 the SecureString parameters (-SshPassword, …) come first.
  • The SSH password is only used when no key works, and then installs the deploy key (not needed next time). Without a sudo password the SSH password is tried. NOPASSWD sudo or a root login need none.
  • The admin password is only required for a first install that listens on a non-loopback address (0.0.0.0:8080, …). On later runs leaving it out keeps the current one (setting it rewrites it every time).
  • The scripts never write a password to a file in plain text. A DPAPI file is the output of ConvertFrom-SecureString (no key): only the Windows user who made it can decrypt it, on that PC. Run the scheduled task as that user.
  • A missing secret fails at once without asking: the message names the variable / key to set, and the exit code is 2 (SSH / sudo) or 1 (admin password). Even without --yes / -Yes nothing is asked when the standard input is not a terminal (cron, a pipe, -NonInteractive): the scripts say to add --yes and exit with 1.

Exit codes

CodeMeaning
0Success; also nothing to do with --skip-if-current, --dry-run and --check-config.
1Usage error, bad answer file, missing setting or admin password, a question needed without --yes.
2Connection / SSH authentication / sudo failed (including a missing SSH or sudo password).
3Preparing the binary failed (local build, Release download, build dependencies or build on the host).
4Upload or installation failed.
5Health check failed (the installation itself is done).
6Several hosts: at least one failed (each host’s code is in the table and the JSON).
130Interrupted, e.g. Ctrl+C (deploy.sh).

--json / -Json

Only the result goes to the standard output, as JSON (the log goes to the standard error and the log file). One host or several, the shape is the same:

{"tool":"wpg-deploy","format":1,"status":"ok","exit_code":0,"dry_run":false,"message":"",
 "hosts":[{"name":"lab1","host":"192.0.2.10","user":"cisco","port":22,"status":"ok","exit_code":0,
  "failed_step":"","message":"","version_before":"wpg 0.1.0","version_after":"wpg 0.1.0",
  "source_id":"git:24d946f6614eecbff02ca481df380aafeb63f368","url":"http://192.0.2.10:8080/",
  "dry_run":false,"log":"/home/you/.local/state/wpg/deploy-20261027-031700-192.0.2.10.log",
  "started_at":"2026-10-27T03:17:00Z","duration_s":41}]}

A host’s status is ok, skipped (already current, nothing done), dry-run, checked, aborted or failed. On a failure failed_step (config, connect, sudo, binary, deps, build, upload, install, health) and message say what went wrong.

--skip-if-current / -SkipIfCurrent: nothing to do, nothing done

Every deploy records what it installed with which settings in /usr/local/share/wpg/deploy.stamp on the host (source id, settings, SHA-256 of the binary, time; no passwords). With --skip-if-current the scripts connect, and when all of the following match they stop without building or installing anything (exit code 0, status skipped), without even using the sudo password:

  • The same source id: for source=git the commit the branch / tag points to (resolved with git ls-remote), for source=local the commit of this checkout (plus a hash of uncommitted changes), for binary_source=file the file’s SHA-256, for release the URL of the release archive.
  • The same settings (bind, ifaces, service, terminal, snmp_trap, dhcp_iface, dhcp_iface_addr, templates, allow_insecure, prefix).
  • The installed binary is the recorded one (after a rollback or a manual replacement the scripts deploy again).
  • With a service: wpg.service runs and answers the health check.

wpg --version carries no commit, hence the record file. When the source cannot be identified (no Git, the ref does not resolve) the scripts warn and deploy as usual. Re-installing an identical binary no longer overwrites wpg.prev, so the previous version stays available for a rollback.

--dry-run / -DryRun without questions

Together with --yes the scripts connect, read the host facts, check that every needed secret is there (the sudo password is really tried) and print the commands they would run. Nothing on the host changes (not even the key installation). Good for checking a setup from CI. To check only the answer file, without connecting, use --check-config / -CheckConfig.

Several hosts

[host <name>] sections in the answer file deploy to one host each. Keys before the first section apply to all hosts; a section’s own values win (without host= the section name is the host name).

# lab.conf
user=cisco
binary_source=build
source=git
git_ref=v0.2.0
sudo_password_file=sudo.pw

[host r1]
host=192.0.2.11
ifaces=ens3

[host r2]
host=192.0.2.12
ifaces=ens3,ens4
bind=127.0.0.1:8080

The hosts can also come from a separate list (--targets / -Targets: one host per line, [user@]host[:port] followed by optional key=value pairs; relative paths are relative to that file):

# hosts.txt
cisco@192.0.2.11 ifaces=ens3
cisco@192.0.2.12:2222 ifaces=ens3,ens4
scripts/deploy.sh --config lab.conf --yes --parallel 2
scripts/deploy.sh --config common.conf --targets hosts.txt --yes --json > result.json
.\scripts\deploy.ps1 -ConfigFile .\lab.conf -Yes -Parallel 2

Each host runs in its own process (--parallel / -Parallel sets how many at a time, default 1); per-host logs stay in ~/.local/state/wpg/deploy-<time>/ (Windows: %LOCALAPPDATA%\wpg\deploy-logs\deploy-<time>\). At the end a table is printed, and the exit code is 6 if any host failed.

Result
  NAME HOST                     STATUS    EXIT VERSION      DETAIL
  r1   cisco@192.0.2.11         ok        0    0.2.0        git:5d0c1e2...
  r2   cisco@192.0.2.12         skipped   0    0.2.0        git:5d0c1e2...
  r3   cisco@192.0.2.13         failed    2                 cannot connect to cisco@192.0.2.13 (port 22): ssh: connect to host ...
2 succeeded, 1 failed

Scheduled runs

Windows (Task Scheduler)

Paste the schtasks line the wizard prints into a command prompt. By hand it looks like this (add /RU <user> /RP to run while logged off; with a DPAPI file, run the task as the user who created the file):

schtasks /Create /TN "wpg deploy lab" /SC WEEKLY /D SUN /ST 03:17 ^
  /TR "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\work\web-packet-generator\scripts\deploy.ps1 -ConfigFile C:\Users\you\AppData\Roaming\wpg\lab.conf -Yes -SkipIfCurrent"

Task Scheduler’s “Last Run Result” shows the exit code; the logs are in %LOCALAPPDATA%\wpg\deploy-logs\.

Linux / macOS (cron)

# crontab -e
17 3 * * 0 /home/you/web-packet-generator/scripts/deploy.sh --config /home/you/.config/wpg/lab.conf --yes --skip-if-current >/dev/null 2>&1

When sudo needs a password, put sudo_password_file= (a file you create, chmod 600) into the answer file, or give the deploy user NOPASSWD on the host (environment variables are awkward in cron).

Linux (systemd user timer)

# ~/.config/systemd/user/wpg-deploy.service
[Unit]
Description=wpg unattended deploy

[Service]
Type=oneshot
ExecStart=%h/web-packet-generator/scripts/deploy.sh --config %h/.config/wpg/lab.conf --yes --skip-if-current
# ~/.config/systemd/user/wpg-deploy.timer
[Timer]
OnCalendar=Sun 03:17
Persistent=true

[Install]
WantedBy=timers.target
systemctl --user daemon-reload && systemctl --user enable --now wpg-deploy.timer
journalctl --user -u wpg-deploy      # results

From CI (GitHub Actions example)

Keep the SSH key and the sudo password in repository secrets. Putting the host’s public key into known_hosts avoids accepting it blindly on the first connection.

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: deploy to the lab
        env:
          WPG_DEPLOY_SUDO_PASSWORD: ${{ secrets.LAB_SUDO_PASSWORD }}
          WPG_DEPLOY_ADMIN_PASSWORD: ${{ secrets.LAB_ADMIN_PASSWORD }}
        run: |
          install -m 700 -d ~/.ssh
          printf '%s\n' "${{ secrets.LAB_SSH_KEY }}" > ~/.ssh/lab_ed25519 && chmod 600 ~/.ssh/lab_ed25519
          printf '%s\n' "${{ secrets.LAB_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
          scripts/deploy.sh --config deploy/lab.conf --yes --skip-if-current --json \
            --set identity=$HOME/.ssh/lab_ed25519 --set source=git --set git_ref=${{ github.sha }} > deploy-result.json
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: deploy-result
          path: deploy-result.json

Options for unattended runs

deploy.shdeploy.ps1Meaning
--config <file>-ConfigFile <file>Answer file.
--yes-YesNever ask anything.
--json-JsonJSON result on the standard output.
--skip-if-current-SkipIfCurrentDo nothing when the host is current.
--dry-run-DryRunCheck and print the commands, change nothing.
--check-config-CheckConfigCheck the answer file and print the settings (no connection).
--targets <file>-Targets <file>File with the hosts.
--section <name>-Section <name>Only one section of the answer file.
--parallel <n>-Parallel <n>Hosts deployed at a time.
--set <key=value>-Set "key=value"Override an answer-file key (repeatable).
--log <file>-LogFile <file>Log file (default: ~/.local/state/wpg/, %LOCALAPPDATA%\wpg\deploy-logs\).

Security

  • The SSH password is used once, to install a key. The scripts create a deploy key (~/.ssh/wpg_deploy_ed25519, on Windows %USERPROFILE%\.ssh\wpg_deploy_ed25519, no passphrase) and append its public key to ~/.ssh/authorized_keys on the host. The password is passed by sshpass (deploy.sh, when installed) or a temporary SSH_ASKPASS helper (OpenSSH 8.4 and later; the password travels in an environment variable, never in a file, and the helper is deleted right away); if neither works, ssh itself asks for the password once more. To revoke the key, delete the wpg-deploy@... line from ~/.ssh/authorized_keys on the host.
  • The sudo and admin passwords go through the standard input of ssh (sudo -S, cat > /tmp/wpg-deploy.*/password): they never appear on a command line, in the process list or on the local disk. The saved answers file contains no passwords.
  • The host key of a new host is accepted automatically (StrictHostKeyChecking=accept-new; a changed key is still refused). Outside a lab, connect once with ssh first and check the fingerprint.
  • The admin password is stored on the host as /etc/wpg/password (0640 root:wpg) and hashed by wpg at startup.
  • Unattended runs read passwords from the environment, from files you create, or on Windows from DPAPI-encrypted files. The scripts never store a password in plain text (Unattended deploy).
  • Keep the management interface out of the TX interfaces (the wizard’s default does): test traffic on it can cut your SSH session.

Web terminal and SNMP trap receiver

When enabled in the wizard (--terminal / --snmp-trap, -Terminal / -SnmpTrap), these lines are written into /etc/wpg/wpg.toml:

[terminal]
enabled = true
allowed_targets = []

[snmp]
trap_listen = "0.0.0.0:162"
  • Only into a wpg.toml created by this deployment. An existing wpg.toml is never changed; the lines to add and sudo systemctl restart wpg are printed instead.
  • An older wpg refuses to start with keys it does not know, so they are only written when wpg config validate of the installed binary accepts them; otherwise a warning is printed and they are skipped.
  • With trap_listen set, a drop-in (/etc/systemd/system/wpg.service.d/bind-service.conf, CAP_NET_BIND_SERVICE) lets the service bind the privileged UDP port 162. With ufw active, sudo ufw allow 162/udp is suggested.

What ends up on the host

PathWhatRewritten by a deploy
/usr/local/bin/wpg, wpg.prevCurrent and previous binaryyes
/usr/local/share/wpg/templates/Sample templates (template library)yes
/usr/local/share/wpg/deploy.stampRecord of the last deployed source and settings (for --skip-if-current; no passwords)yes
/etc/systemd/system/wpg.serviceThe unit from packaging/systemd/wpg.serviceyes
/etc/systemd/system/wpg.service.d/allow-insecure.conf (--allow-insecure), bind-service.conf (SNMP traps)yes
/etc/wpg/wpg.envWPG_SERVER__BIND, WPG_TX__ALLOWED_IFACES, library path, password fileyes
/etc/wpg/wpg.tomlFull configuration (wpg config init)no (created once)
/etc/wpg/passwordAdmin passwordonly when given
/var/lib/wpg/Data directory: database, user templates, TLS certificateno
~/wpg-build/, ~/.cargo/, ~/.rustup/ (SSH user)Source, build cache and Rust toolchain when building on the hostwhen building

Environment variables win over wpg.toml: change the wpg.env keys through the deploy options and everything else in wpg.toml. See Running as a service for the unit itself.

--dpdk: host preparation only

--dpdk only prepares the host. The dpdk backend also needs a binary built with --features dpdk (scripts/build.sh --dpdk; together with --build-on-host the host builds with --features dpdk), the NIC bound to vfio-pci, and EAL arguments in tx.dpdk_eal_args. See DPDK / AF_XDP setup.

With --dpdk the script:

  • reserves --hugepages 2 MiB hugepages (default 1024 = 2 GiB) now and at boot (/etc/sysctl.d/80-wpg-hugepages.conf), and mounts hugetlbfs on /dev/hugepages if nothing is mounted;
  • loads vfio-pci now and at boot (/etc/modules-load.d/wpg-dpdk.conf);
  • warns when there are no IOMMU groups (typical for CML2 VMs without a virtual IOMMU).

It does not bind NICs to vfio-pci: that takes the interface away from the kernel and can cut your SSH session. Use dpdk-devbind.py by hand; see DPDK / AF_XDP setup.

Upgrades and rollback

Running the same deployment again (in the wizard: Enter at “Use the previous settings?”) upgrades: the new binary replaces the old one, the service restarts, configuration and data stay. See Upgrading. If the new version misbehaves, choose “Roll back” in the wizard’s menu, or:

scripts/deploy.sh ubuntu@192.0.2.10 --rollback

Troubleshooting

SymptomFix
ssh / scp not found (Windows)Add the “OpenSSH Client” optional feature (elevated PowerShell: Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0).
Cannot connect / timeoutCheck address, port and user; try ssh -p 22 user@host by hand. On CML2 the node needs the management link (External Connector).
could not install the public keyWrong password, or password authentication is disabled on the server (PasswordAuthentication no). Choose an existing key file, or install a key on the host yourself.
key login failsPublic key authentication is disabled on the server, or ~/.ssh is too permissive (chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys).
sudo failedWrong sudo password, or the user is not in the sudo group (sudo usermod -aG sudo <user>).
Failure in the dependency stepCheck that the host reaches the internet (behind a proxy: configure it in /etc/apt/apt.conf.d/ and ~/.bashrc) and that apt is not locked by automatic updates; retry after a few minutes.
killed / signal: 9 in the build stepOut of memory: add swap (sudo fallocate -l 4G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile) and run again.
The build keeps failingRun rm -rf ~/wpg-build on the host and deploy again.
the uploaded binary does not run on this hostThe binary does not match the host’s glibc / CPU; build on the host instead.
Health check failssudo journalctl -u wpg -n 50 on the host; sudo ss -ltnp for a port already in use. Without an admin password the server does not start on a non-loopback address.
The browser cannot connectCheck the firewall (sudo ufw allow 8080/tcp), the CML2 external connection, and the listen address (127.0.0.1 needs an SSH tunnel).
does not support [terminal] / [snmp]The installed wpg predates the feature; deploy a newer source.
Garbled Japanese (Windows)If you edited deploy.ps1, save it as UTF-8 with BOM.

Verification status

deploy.sh was run against an Ubuntu 24.04 container (sshd, a minimal systemctl stand-in instead of systemd): the wizard (key installation with the password through both sshpass and SSH_ASKPASS, the sudo password, the interface selection, saving and reusing the answers, the rollback menu), building on the host (this checkout uploaded, rustup and trunk installed, through to the health check), and writing [terminal] / [snmp] into a new wpg.toml (with a stub standing in for a binary that knows the keys) while leaving an existing wpg.toml alone. The earlier checks in a container running systemd (installation, refusal without a password, --service with the health check, --rollback, --dpdk) still stand. The unattended mode was checked with deploy.sh against the same Ubuntu 24.04 container (two sshds, each in its own mount namespace separating /usr/local, /etc/wpg and /var/lib/wpg): a first install from an answer file with --yes (the deploy key installed with the SSH password from the environment, sudo and admin passwords from the environment, the sudo password also from a file), failing at once without asking when a secret is missing (no key and no SSH password: 2, sudo password missing / wrong: 2, no admin password on a first install: 1, no --yes with a non-terminal stdin: 1), --skip-if-current (skipped when nothing changed, even without a sudo password; deployed again after a new binary, changed settings or a rollback), --dry-run, --check-config, the --json output (validated with python3 -m json.tool), several hosts (three sections, one unreachable: per-host results in the table and the JSON, exit code 6; --parallel 2; --targets), and saving the unattended file at the end of the wizard plus a rerun with it. deploy.ps1 / deploy.bat have not been run on Windows (CI only parses them and checks the PowerShell 5.1 syntax; the unattended parts are untested on Windows too). Not tested on CML2 nodes or real hardware yet.

Running as a service

Status: draft

Samples live under packaging/ in the repository and in every release archive. All of them run wpg serve with the configuration in a fixed place (WPG_CONFIG) and a fixed data directory (WPG_DATA_DIR). Create the configuration first with wpg config init --path <file> and set a password with wpg config set-password --config <file>; a server that listens on a non-loopback address refuses to start without one.

Linux: systemd

packaging/systemd/wpg.service is what scripts/deploy.sh --service installs. By hand:

sudo useradd --system --home-dir /var/lib/wpg --shell /usr/sbin/nologin wpg
sudo install -m 0755 wpg /usr/local/bin/wpg
sudo install -d -m 0750 -o root -g wpg /etc/wpg
sudo wpg config init --path /etc/wpg/wpg.toml          # then edit bind, allowed_ifaces, ...
sudo wpg config set-password --config /etc/wpg/wpg.toml
sudo chgrp wpg /etc/wpg/wpg.toml && sudo chmod 0640 /etc/wpg/wpg.toml
sudo install -m 0644 packaging/systemd/wpg.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now wpg
journalctl -u wpg -f

Points of the unit:

  • Runs as the unprivileged user wpg. Raw sockets come from AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN, so the binary needs no setcap for the service (file capabilities are ignored under NoNewPrivileges=yes anyway).
  • StateDirectory=wpg creates /var/lib/wpg owned by wpg; ProtectSystem=strict makes the rest of the file system read-only for the server.
  • EnvironmentFile=-/etc/wpg/wpg.env for per-host WPG_* overrides (deploy.sh writes it).
  • LimitMEMLOCK=infinity for the AF_XDP backend (UMEM is charged to RLIMIT_MEMLOCK on kernels before 5.11).
  • RestrictAddressFamilies allows AF_PACKET and AF_XDP besides IP and Unix sockets.

Change the listen address with bind in wpg.toml or WPG_SERVER__BIND= in wpg.env, then sudo systemctl restart wpg.

macOS: launchd

packaging/launchd/io.github.seiyafunaokajp.wpg.plist is a system daemon (it runs as root, which /dev/bpf* needs unless ChmodBPF is set up, see Permissions):

sudo install -m 0755 wpg /usr/local/bin/wpg
sudo mkdir -p /usr/local/etc/wpg /usr/local/var/wpg /usr/local/var/log
sudo /usr/local/bin/wpg config init --path /usr/local/etc/wpg/wpg.toml
sudo /usr/local/bin/wpg config set-password --config /usr/local/etc/wpg/wpg.toml
sudo install -m 0644 packaging/launchd/io.github.seiyafunaokajp.wpg.plist /Library/LaunchDaemons/
sudo launchctl bootstrap system /Library/LaunchDaemons/io.github.seiyafunaokajp.wpg.plist
tail -f /usr/local/var/log/wpg.log

Stop and remove it with sudo launchctl bootout system/io.github.seiyafunaokajp.wpg. KeepAlive restarts the server when it exits with an error. Remove the quarantine attribute from a downloaded binary first, or launchd cannot start it (see Install on macOS).

Windows

wpg.exe is a console program and does not talk the Service Control Manager protocol. A plain sc.exe create wpg binPath= "C:\...\wpg.exe serve" therefore registers a service that fails to start with error 1053. Use one of these instead.

Scheduled task (built in)

packaging/windows/wpg-service.ps1 registers a task that runs wpg.exe serve as SYSTEM at boot and restarts it every minute if it stops. From an elevated PowerShell:

.\packaging\windows\wpg-service.ps1 -Action Install -Exe "C:\Program Files\wpg\wpg.exe"
.\packaging\windows\wpg-service.ps1 -Action Status
.\packaging\windows\wpg-service.ps1 -Action Stop
.\packaging\windows\wpg-service.ps1 -Action Uninstall

It creates C:\ProgramData\wpg\wpg.toml (with wpg config init) when missing and keeps the data in C:\ProgramData\wpg\data. A directory it creates is open to SYSTEM and Administrators only: every user may read new folders under C:\ProgramData, and these hold the password hash, the database and the TLS key (existing directories keep their permissions). From an elevated PowerShell, set the password with & "C:\Program Files\wpg\wpg.exe" config set-password --config C:\ProgramData\wpg\wpg.toml before binding to a non-loopback address. The script warns when Npcap is missing.

A real service through a wrapper

To manage wpg with sc.exe / services.msc, wrap it with WinSW or NSSM. With NSSM:

nssm install wpg "C:\Program Files\wpg\wpg.exe" serve
nssm set wpg AppEnvironmentExtra WPG_CONFIG=C:\ProgramData\wpg\wpg.toml WPG_DATA_DIR=C:\ProgramData\wpg\data
nssm set wpg AppDirectory C:\ProgramData\wpg\data
sc.exe start wpg
sc.exe query wpg

Npcap must be installed in either case (wpg doctor checks it). Allow wpg.exe through Windows Defender Firewall only on private networks, and only if it listens on a non-loopback address.

Verification status

The systemd unit was started by scripts/deploy.sh in an Ubuntu 24.04 container running systemd (the server ran as wpg with only CAP_NET_RAW and CAP_NET_ADMIN and answered /api/health); systemd-analyze verify accepts it. The release workflow installs the launchd daemon from the Apple silicon archive on a macOS 14 runner and the scheduled task from the Windows archive on a Windows Server runner as described above, checks /api/health, then stops and removes them; on Windows it also checks that BUILTIN\Users cannot read the configuration directory (see “What CI checks” in Release process). Both jobs pass. Not covered: a reboot (the boot trigger and RunAtLoad themselves), the NSSM / WinSW wrappers, and sending through Npcap on Windows.

Docker

Status: draft

The repository has a multi-stage Dockerfile and a docker-compose.yml. The build stage (rust:1-bookworm) downloads Trunk, builds the web UI and the release binary; the runtime image (debian:bookworm-slim) holds only wpg, curl (for the health check) and the sample templates in /usr/share/wpg/templates.

Build

docker build -t wpg .
docker build -t wpg --build-arg FEATURES=pcap .     # with the libpcap backend

The build needs Internet access: crates.io, the Trunk release on GitHub, and the Tailwind CSS and wasm-bindgen tools that Trunk downloads. Behind a TLS-intercepting proxy, pass the proxy’s CA certificate (PEM) as a build secret and the proxy address as the standard build arguments. The certificate is trusted in the build stage only and does not end up in the runtime image:

docker build -t wpg --secret id=ca_certs,src=/path/to/proxy-ca.pem \
  --build-arg HTTPS_PROXY=http://proxy.example:3128 .

If Docker Hub rate-limits anonymous pulls, the base images can be taken from another registry with --build-arg RUST_IMAGE=mirror.gcr.io/library/rust:1-bookworm --build-arg RUNTIME_IMAGE=mirror.gcr.io/library/debian:bookworm-slim.

Run

Sending on the host’s interfaces needs the host network namespace and two capabilities. Everything else is dropped:

docker run -d --name wpg --network host \
  --cap-drop ALL --cap-add NET_RAW --cap-add NET_ADMIN \
  -e WPG_PASSWORD='change me' \
  -e WPG_TX__ALLOWED_IFACES='["eth1"]' \
  -v wpg-data:/var/lib/wpg \
  wpg

Or with Compose (reads WPG_PASSWORD, WPG_BIND, WPG_ALLOWED_IFACES and WPG_FEATURES from the environment or a .env file):

WPG_PASSWORD='change me' WPG_ALLOWED_IFACES='["eth1"]' docker compose up -d --build
docker compose ps          # shows "healthy" once /api/health answers
docker compose logs -f wpg
SettingImage defaultNotes
WPG_SERVER__BIND0.0.0.0:8080With --network host this is the host’s port. Use 127.0.0.1:8080 to keep it local.
WPG_PASSWORDnoneRequired for a non-loopback bind: the server refuses to start otherwise. A plain password or an argon2id hash. WPG_AUTH__PASSWORD_FILE=/run/secrets/... works with Docker secrets.
WPG_DATA_DIR/var/lib/wpg (volume)Database, user templates, TLS certificate.
WPG_TEMPLATES__LIBRARY_PATHS["/usr/share/wpg/templates"]Mount your own library and add its path.
WPG_TX__ALLOWED_IFACESallInterfaces jobs may send on.

Other settings: any WPG_<SECTION>__<KEY> variable, or mount a wpg.toml and set WPG_CONFIG. See the configuration reference.

The process runs as root inside the container, but with only CAP_NET_RAW and CAP_NET_ADMIN. A non-root user would need file capabilities on the binary, which fail to execute when the container’s capability set lacks one of them, so the image keeps it simple.

Limits

  • Use Linux hosts. Docker Desktop on macOS and Windows runs containers inside a VM: --network host there is the VM’s network, so frames never reach your physical NIC.
  • wpg doctor inside the container reports the container’s view (capabilities, interfaces). The image is built without the dpdk feature (it would need the DPDK libraries in both stages); hugepages and vfio-pci for DPDK are prepared on the host in any case.
  • Without --network host (the default bridge network with -p 8080:8080) the GUI works, but jobs can only send on the container’s own eth0.

Verification status

Checked in October 2026 (Docker 29.8, Linux 6.18 host, image without extra features):

  • docker build completed (Trunk web UI and cargo build --release --locked); the runtime image is about 170 MB on disk (44 MB compressed).
  • docker run --network host --cap-drop ALL --cap-add NET_RAW --cap-add NET_ADMIN -e WPG_PASSWORD=...: the health check turned healthy, /api/health and the web UI answered, and wpg doctor inside the container reported raw sockets with CAP_NET_RAW / CAP_NET_ADMIN.
  • wpg send with the afpacket backend on lo inside the container sent 100 frames, and wpg capture in the same container received them.
  • --build-arg FEATURES=pcap: the image ships libpcap0.8, wpg doctor finds it, and wpg send --backend pcap sent 50 frames on lo.
  • docker compose up -d --no-build: the service turned healthy, login with WPG_PASSWORD succeeded (204) and a wrong password was refused (401). Without WPG_PASSWORD, compose refuses to start with the message from the compose file.

The development sandbox only allows HTTPS through its proxy, so apt-get there had to be pointed at https://deb.debian.org with a throw-away copy of the Dockerfile; the Dockerfile in the repository was otherwise used unchanged. Docker Desktop (macOS / Windows) was not checked.

Upgrading

Status: draft

An upgrade replaces the wpg binary and restarts the server. Configuration, the database and templates stay where they are; each of them carries a version and is migrated forward automatically or with one command.

Before you upgrade

  1. Read the release notes on the GitHub Release page.

  2. Back up the configuration and the data directory. The database is SQLite in WAL mode, so stop the server first (or copy with sqlite3 wpg.sqlite ".backup wpg.backup.sqlite"):

    sudo systemctl stop wpg
    sudo tar -C / -czf wpg-backup-$(date +%F).tar.gz etc/wpg var/lib/wpg
    
  3. Check the new binary against your configuration and templates without starting it:

    ./wpg-new --version
    WPG_CONFIG=/etc/wpg/wpg.toml ./wpg-new config validate
    ./wpg-new template migrate --check /var/lib/wpg/templates /path/to/your/library
    

Steps per installation method

Installed withUpgradeRoll back
scripts/deploy.shRe-run the same command with the new buildscripts/deploy.sh <host> --rollback
systemd by handsudo install -m 0755 wpg /usr/local/bin/wpg && sudo systemctl restart wpgRe-install the old binary
launchdsudo install -m 0755 wpg /usr/local/bin/wpg && sudo launchctl kickstart -k system/io.github.seiyafunaokajp.wpgSame with the old binary
Windows scheduled taskwpg-service.ps1 -Action Stop, replace wpg.exe, -Action StartSame with the old wpg.exe
Docker Composegit pull && docker compose up -d --build (the wpg-data volume is kept)Check out the old version and rebuild
Release archiveExtract the new archive over the old directory (macOS: clear the quarantine flag again)Extract the old archive

On Linux, setcap must be re-applied whenever the binary file is replaced (deploy.sh does it; the systemd unit does not need it).

What is migrated

Database (<data_dir>/wpg.sqlite)

Users, sessions and job history. The schema version is stored in the schema_version table. On start, the server applies the missing migrations in order, each in its own transaction. Nothing to do by hand. A database written by a newer wpg is refused with “database schema version N is newer than this build supports”, so a downgrade needs the backup taken before the upgrade.

Configuration (wpg.toml)

Unknown keys are errors, so a typo is never silently ignored. New versions only add keys with defaults, so an old wpg.toml keeps working. After a downgrade, keys that the old version does not know make it refuse to start; wpg config validate names them. Compare your file with wpg config init --path /tmp/wpg.toml to see new keys and their documentation.

Templates (schema:)

Every template starts with schema: <n>. When a template is loaded (library, user templates, bundles, the API), wpg upgrades older versions in memory; nothing is rewritten. Templates saved from the GUI are written with the current version. A template with a newer schema: than the binary supports is rejected (“unsupported template schema”), as is one without schema:.

To rewrite files on disk (for example a library kept in Git), use wpg template migrate:

wpg template migrate --check templates/        # list outdated files; exit status 1 if any
wpg template migrate templates/                # rewrite them, keeping <file>.bak
wpg template migrate --no-backup a.wpg.yaml    # no .bak copy

Directories are scanned recursively for *.wpg.yaml / *.wpg.json. Rewritten files lose their YAML comments and get the canonical key order, so review the diff. Files already at the current version are not touched.

The current template schema is 1, the only version so far, so there is nothing to migrate yet. The mechanism exists so that a future format change does not break saved templates.

For developers: changing the template format

A change that old templates cannot be read with (renamed or moved keys, changed meaning) needs a new schema version:

  1. Increase SCHEMA_VERSION in crates/wpg-template/src/lib.rs.
  2. Append a step to MIGRATIONS: a fn(serde_yaml::Value) -> Result<serde_yaml::Value, TemplateError> that turns a version n document into version n + 1, including setting schema: n + 1. MIGRATIONS[n - 1] upgrades n; steps run in sequence, so each one only knows its neighbour.
  3. Add a test that loads a version n fixture and compares it with the expected version n + 1 template, and keep the fixture.
  4. Update the sample templates (wpg template migrate templates/), regenerate docs/schema/template.schema.json (wpg template schema), and update the template schema reference in both languages.
  5. Mention the change in the release notes.

Additive changes (a new optional key with a default) do not need a new version.

Database changes work the same way: append an SQL migration to MIGRATIONS in crates/wpg-server/src/db.rs; never edit one that has been released.

DPDK and AF_XDP setup

Status: draft

The afxdp backend is implemented (M8) but optional: it is only available in builds with --features afxdp (cargo build --release -p wpg-cli --features afxdp). Copy mode has been verified on lo and veth; zero-copy has not been verified on real (physical) NICs. The dpdk backend (M8) is optional too (--features dpdk) and has only been verified on DPDK virtual devices (net_null, net_ring, net_pcap); physical NICs and CML2’s virtio PMD have not been tried yet.

AF_XDP

How it works

The afxdp backend is a minimal implementation on the kernel ABI (<linux/if_xdp.h>, bpf(2)) without libbpf or libxdp, so it adds no build dependencies. Each worker (--workers) has:

  • one AF_XDP socket bound to one NIC queue; worker i uses queue --queue + i (from 0 by default);
  • a UMEM (the frame area, at most 16 MiB) whose pages are allocated on the NIC’s NUMA node (mbind);
  • a TX ring and a completion ring. Frames are copied into UMEM chunks, their descriptors are queued on the TX ring, and the kernel is woken with sendto only when it asks for it (XDP_USE_NEED_WAKEUP).

Automatic copy / zero-copy (--xdp-mode)

ModeBehaviour
auto (default)try zero-copy first, fall back to copy mode
copyalways copy mode (XDP_COPY); works on any interface including lo and veth
zerocopyzero-copy (XDP_ZEROCOPY) only; an error if unavailable

Many drivers (i40e, ice, ixgbe, igc, …) only create the XDP rings that zero-copy transmission uses while an XDP program is attached. auto and zerocopy therefore attach a two-instruction XDP_PASS program in driver mode before the zero-copy bind (a bpf_link, detached when the backend closes; an XDP program that is already attached is used as is). If the program cannot be loaded, the driver refuses the zero-copy bind, or the first wake-up fails, the backend falls back to copy mode. The backend line of wpg bench / wpg send shows the outcome (AF_XDP zero-copy / AF_XDP copy mode, with the reason after a fallback).

Caution: some drivers rebuild their queues when an XDP program is attached or detached, which briefly takes the link down. On a production interface use --xdp-mode copy, or check the effect beforehand.

Requirements

  • Linux 5.10 or later (wpg doctor check kernel.af_xdp); --busy-poll needs 5.11.
  • Privileges: copy mode needs CAP_NET_RAW; zero-copy also CAP_NET_ADMIN and CAP_BPF (CAP_SYS_ADMIN before 5.8).
sudo setcap cap_net_raw,cap_net_admin,cap_bpf,cap_ipc_lock+ep "$(command -v wpg)"
  • Before Linux 5.11 the UMEM is charged to RLIMIT_MEMLOCK. wpg raises the soft limit to the hard limit; if that is not enough set ulimit -l unlimited (LimitMEMLOCK=infinity in systemd).
  • Only one AF_XDP socket can be bound to a queue. Configure as many channels as queues you use; with too few queues wpg fails with an ethtool -L hint.
ethtool -l ens3               # current and maximum channels
sudo ethtool -L ens3 combined 4
wpg bench --backend afxdp -i ens3 --workers 4 --auto-pin
  • The maximum frame length is the UMEM chunk size (2048 B when the MTU is 2030 or less, else 4096 B). Longer frames are counted as dropped (multi-buffer AF_XDP, needed for jumbo frames, is not used).

Main options

OptionMeaning
--backend afxdpsend with AF_XDP
--xdp-mode auto|copy|zerocopybind mode (above)
--queue Nfirst queue (worker i uses queue N+i)
--workers Nnumber of workers = number of queues used
--auto-pin / --pin-cores 2,3worker core pinning (Performance tuning)
--ring-depth NTX ring slots (rounded to a power of two, capped by the 16 MiB UMEM)
--busy-pollsets SO_PREFER_BUSY_POLL / SO_BUSY_POLL so the sending thread runs the driver’s NAPI itself (5.11+); wpg send also waits in busy-poll mode

Supported NICs (zero-copy)

AF_XDP copy mode works on every network device; zero-copy needs driver support. The table lists the main mainline Linux drivers with AF_XDP zero-copy and the approximate kernel version that added it. None of them has been verified with wpg on real hardware. Distribution kernels may differ because of backports, so always check that wpg bench reports zero-copy.

DriverNICZero-copy since (approx.)Verified with wpg
i40eIntel X710 / XL710 / XXV7104.20no
ixgbeIntel 82599 / X520 / X540 / X5504.20no
mlx5_coreNVIDIA (Mellanox) ConnectX-4 Lx and later5.3no
iceIntel E8105.5no
stmmacSynopsys DWMAC (embedded SoCs)5.13no
igcIntel I225 / I2265.14no
virtio_netvirtio-net in KVM / CML2recent kernels (6.x); copy mode beforeno
vethcontainers / netnsnone (native XDP yes, sending in copy mode)copy mode verified (4 queues, 2 workers)
loloopbacknone (copy mode)copy mode verified

Verified (2026-10, Linux 6.18 container, root): copy-mode transmission on lo and veth with the frames arriving at a receiver; the auto fallback (on veth the XDP_PASS program attaches in driver mode, the zero-copy bind is refused with EOPNOTSUPP, and copy mode is used); two workers on two veth queues. Unit tests: cargo test -p wpg-tx --features afxdp (the veth test runs only with WPG_AFXDP_VETH=vxa,vxb). For performance see docs/perf.md.

DPDK

The dpdk backend sends through a DPDK poll-mode driver (PMD). The NIC is taken away from the kernel and driven by wpg’s own threads, with no system call per batch. It is optional: build with --features dpdk (needs the DPDK development package and libclang, see Building).

cargo build --release -p wpg-cli --features dpdk

Verified so far (2026-10, Ubuntu 24.04 with DPDK 23.11.4, in a container without hugepages or a NIC): EAL with --no-huge, the net_null (wpg bench, 2 workers), net_ring and net_pcap virtual devices. A wpg send of a template through net_pcap wrote the same frames as the pcapfile backend. The unit tests run in CI against DPDK 24.11 and 23.11. Physical NICs (vfio-pci), hugepages and the virtio PMD on CML2 have not been tried.

How it works

  • EAL (DPDK’s environment layer) is started once per wpg process, by the first dpdk job, with your EAL arguments plus two defaults you can override: -l <first CPU wpg may use> (the main lcore only; wpg’s TX workers are its own threads and register with DPDK as non-EAL lcores) and --in-memory (no files under /var/run/dpdk; --no-shconf instead when you pass --no-huge). EAL cannot be restarted inside a process: if it fails, or you need other arguments, restart wpg serve (wpg send / wpg bench start a new process every time).
  • The interface is a DPDK port: its number (0), its device name (the PCI address of a bound NIC, 0000:00:04.0), or a virtual device. Virtual devices may carry devargs and are added on first use: net_tap0,iface=dtap0 (a kernel TAP interface, handy for testing), net_pcap0,tx_pcap=/tmp/out.pcap (writes a pcap file), net_null0 (discards frames, for benchmarks). An unknown name fails with a list of the ports EAL found.
  • Workers (--workers N) share one port: it is configured with --queue + N TX queues, worker i sends on TX queue --queue + i. Only one job can use a port at a time. The port is stopped when the job ends.
  • Buffers: one mbuf pool per port on the NIC’s NUMA socket, sized from --ring-depth (TX descriptors per queue, clamped to the driver’s limits) and --batch. Each frame is copied into an mbuf (2048 octets of data, so longer frames are counted as dropped; jumbo frames are not supported). When the TX ring is full the backend retries for up to 10 ms, then counts the rest as dropped. MBUF_FAST_FREE is turned on when the driver offers it.
  • The backend line of wpg send / wpg bench shows the DPDK version, port, driver, queue, descriptors, pool, NUMA socket, link state and the full EAL arguments.

Host setup

scripts/deploy.sh <host> --dpdk [--hugepages N] does the first two steps (hugepages now and at boot, hugetlbfs, vfio-pci, an IOMMU check) but leaves binding the NIC to you; see Deploying with scripts/deploy.sh.

  1. Hugepages (wpg doctor check hugepages, a warning when none). The pool for one port with 4 workers and the default --ring-depth 4096 takes about 70 MiB, plus what the driver allocates:

    echo 1024 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
    grep Huge /proc/meminfo
    
  2. IOMMU and vfio: on bare metal enable the IOMMU (intel_iommu=on iommu=pt or amd_iommu=on on the kernel command line) and sudo modprobe vfio-pci.

  3. Bind the NIC. The interface disappears from the kernel (and from wpg ifaces), so never bind the interface that carries your ssh session:

    dpdk-devbind.py --status                      # PCI addresses and current drivers
    sudo ip link set ens4 down
    sudo dpdk-devbind.py --bind=vfio-pci 0000:00:04.0
    # back to the kernel: sudo dpdk-devbind.py --bind=virtio-pci 0000:00:04.0 (or ixgbe, i40e, ...)
    

    NVIDIA / Mellanox ConnectX (mlx5) is the exception: it stays on its kernel driver and DPDK uses it through rdma-core; do not rebind it.

  4. Privileges: run as root. vfio as an ordinary user needs /dev/vfio/* permissions, CAP_IPC_LOCK / a large RLIMIT_MEMLOCK and access to the hugepage mount, and is not covered here.

EAL arguments

wpg send / wpg bench take them with --eal-args (one string, split on spaces); wpg serve takes them from tx.dpdk_eal_args in wpg.toml (Configuration) or WPG_TX__DPDK_EAL_ARGS. The useful ones:

ArgumentMeaning
-a 0000:00:04.0Only probe this PCI device (repeatable). Without it, EAL takes every NIC bound to a DPDK driver
-l 2Main lcore (default: first CPU wpg may use). Pin the TX workers with --pin-cores / --auto-pin as usual
--socket-mem 512 / -m 512Hugepage memory to reserve up front (MiB)
--vdev net_tap0,iface=dtap0Create a virtual device at start (or name it as the interface, see above)
--file-prefix wpgUse shared runtime files instead of --in-memory (for dpdk-proc-info and the telemetry socket)
--log-level lib.eal:debugMore EAL logging when something fails
--no-huge -m 256Run without hugepages (virtual devices only; physical NICs need hugepages)
sudo wpg bench --backend dpdk -i 0000:00:04.0 --eal-args "-a 0000:00:04.0" --workers 2 --auto-pin
sudo wpg send t.wpg.yaml --backend dpdk -i 0000:00:04.0 --eal-args "-a 0000:00:04.0" --rate 1Mpps

# Without a NIC: a TAP interface you can watch with tcpdump (needs root).
sudo wpg send t.wpg.yaml --backend dpdk -i net_tap0,iface=dtap0 --count 10 &
sudo tcpdump -ni dtap0
# wpg.toml
[tx]
default_backend = "dpdk"
allowed_ifaces = ["0000:00:04.0"]
dpdk_eal_args = ["-a", "0000:00:04.0", "-l", "1"]

CML2 and virtio

On a CML2 Ubuntu node the data interfaces are virtio-net devices, which DPDK drives with the virtio PMD (net_virtio, part of the standard DPDK packages):

  • The guest normally has no IOMMU, so vfio-pci refuses to bind. Use vfio’s no-IOMMU mode (echo 1 | sudo tee /sys/module/vfio/parameters/enable_unsafe_noiommu_mode before binding; “unsafe” because DMA is not isolated, acceptable in a lab VM) or uio_pci_generic.
  • Keep the management interface (usually ens2) on the kernel; bind only a data interface.
  • The virtio PMD usually offers as many TX queues as the node has vCPUs / virtio queue pairs; --workers above that fails with the queue count in the message.
  • Throughput is bounded by the host’s vhost path and the virtual link, not by DPDK. Compare with afpacket on the same link before relying on DPDK; on CML2 the gain is often small.
  • The NIC’s MAC address does not matter for sending: wpg sends the source MAC in the template. Promiscuous mode is not needed to transmit.

Limits

  • Transmit only (no DPDK receive in wpg capture).
  • Frames up to 2048 octets; no multi-segment mbufs, no TX checksum or segmentation offloads (wpg builds complete frames).
  • One job per port at a time; EAL arguments are fixed for the life of the process.
  • Shared DPDK libraries only (PMDs are loaded as plugins).

Expected performance (TODO section 2.2, not measured on hardware): AF_XDP about several Mpps per core, DPDK 10 Mpps or more per core on a physical NIC. Record your numbers with the checklist in docs/perf.md.

Building the bindings (dpdk-sys)

The bindings live in the dpdk-sys crate (ADR-0004). With its link feature (turned on by wpg-tx’s dpdk feature) the build script finds DPDK with pkg-config (libdpdk, 23.11 or newer; other versions than 24.11 / 23.11 build with a warning), generates the bindings with bindgen (EAL, ethdev, mempool / mbuf, lcore, the RTE_* constants) and compiles a small C shim with DPDK’s own cflags for the parts of the fast path that are static inline in the headers (wpg_rte_eth_tx_burst, wpg_rte_pktmbuf_alloc, wpg_rte_errno, …). Without the feature the crate is empty, so ordinary builds need no DPDK.

# Debian 13 (DPDK 24.11) / Ubuntu 24.04 (DPDK 23.11)
sudo apt install dpdk-dev libclang-dev pkg-config
cargo test -p dpdk-sys --features link     # bindings + EAL smoke test on a net_ring port
cargo build -p wpg-tx --features dpdk      # wpg-tx with the bindings linked

For DPDK built from source (meson / ninja), point pkg-config at it and make the shared libraries findable:

export PKG_CONFIG_PATH=/opt/dpdk-24.11/lib/x86_64-linux-gnu/pkgconfig
export LD_LIBRARY_PATH=/opt/dpdk-24.11/lib/x86_64-linux-gnu

DPDK 24.11 refuses to load PMD plugins from a directory with a world-writable parent (such as /tmp), so install it under /opt or /usr/local. The smoke test runs EAL with --no-huge --no-pci on a net_ring virtual port, so it needs neither hugepages, a NIC nor root; CI runs it against both LTS releases (job dpdk). Only DPDK’s shared libraries are supported (PMDs are loaded as plugins). The backend’s own tests (cargo test -p wpg-tx --features dpdk --lib dpdk) also run without hugepages, a NIC or root, on net_ring / net_pcap / net_null devices.

CML2 notes

Status: draft

The first deployment target is an Ubuntu node in Cisco CML2 with a virtio-net interface, where the afpacket backend is the main path. This page covers what to set up and what to watch for.

Verification status. Everything about wpg’s own behaviour (doctor checks, error messages, flags) is taken from the code and from wpg run in a container. No measurement has been made on CML2 yet. All performance numbers in docs/perf.md come from the lo interface and the null backend, so they only bound the afpacket path from above. The CML2-specific statements below (bridge behaviour, MAC filtering) are general Linux/KVM knowledge to be confirmed on your CML2 version; the M2 on-CML2 measurement is still open.

Prerequisites

  • An Ubuntu node (22.04 or later, kernel 5.15+) with at least one connected virtio-net interface. wpg doctor requires kernel 3.2 or newer for TPACKET_V3 and 5.10 or newer for AF_XDP.
  • The wpg binary built with --features pcap if you also want the pcap backend (needs libpcap0.8). afpacket needs no library.
  • Use two or more vCPUs. Sending is one busy thread; leave a core for the OS.

Building the lab

The smallest setup is one Ubuntu node running wpg and the node under test. To receive and verify as well (Receive and verification), add a second Ubuntu node on the far side.

External Connector (NAT / bridge) ── ens2 [Ubuntu: wpg] ens3 ── device under test (IOSv, CSR1000v, XRv9k, FRR, ...) ── ens3 [Ubuntu: receiver (optional)]
  1. Management link: connect the Ubuntu node’s first interface (ens2) to an External Connector. Use it only for copying the binary (scripts/deploy.sh), ssh and the web UI, never for test traffic.

  2. Data links: connect the next interfaces (ens3, ens4, …) to the device under test. An interface has no carrier until the nodes on both ends of the link are started.

  3. Node size: 2 or more vCPUs (N + 1 or more for --workers N) and 2 GiB of memory or more. Add the hugepages for DPDK (2 GiB for the default 1024 pages).

  4. Initial configuration: in the Ubuntu node’s Config (cloud-init user-data), add your ssh key and, if you want them, ethtool, tcpdump and libpcap0.8:

    #cloud-config
    ssh_authorized_keys:
      - ssh-ed25519 AAAA... you@workstation
    packages: [ethtool, tcpdump]
    
  5. Deploy: run scripts/deploy.sh from your workstation against the management address (Deploying with scripts/deploy.sh). Restrict sending to the data interfaces with --iface:

    scripts/deploy.sh ubuntu@192.0.2.10 --service --iface ens3 --password-file ./wpg-password
    
  6. Web UI: either set a password and listen on 0.0.0.0:8080, or install the service with --bind 127.0.0.1:8080 and open it through an ssh tunnel (ssh -L 8080:127.0.0.1:8080 ubuntu@192.0.2.10) (Authentication and TLS).

Privileges: setcap or root

AF_PACKET sockets need CAP_NET_RAW. Either run as root, or grant the capabilities to the binary once:

sudo setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/wpg

This is the hint wpg doctor prints (with the real path of the running binary). When the backend itself is refused it prints: AF_PACKET needs CAP_NET_RAW: run as root or grant it with `sudo setcap cap_net_raw,cap_net_admin+ep $(command -v wpg)` . The capability is lost when the file is replaced, so re-run setcap after every copy (scripts/deploy.sh does this). For systemd, use AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN instead of file capabilities. Capabilities are ignored on filesystems mounted nosuid.

Choosing the interface

$ wpg ifaces
NAME  IDX  MAC                IPV4       IPV6  MTU    STATE         SPEED  DRIVER
lo    1    -                  127.0.0.1  -     65536  up, loopback  -      -
ifb0  2    66:00:97:e0:50:14  -          -     1500   down          -      -
ifb1  3    62:7f:e1:7b:e9:80  -          -     1500   down          -      -
eth0  4    02:fc:00:00:00:01  192.0.2.2  -     1400   up            -      virtio_net

(The listing above is from a development container, not CML2.) Pick the interface that is up, has driver virtio_net, and is wired to the link you want to test. Do not send on the management interface that carries your ssh session. Interface names on CML2 Ubuntu nodes are usually ens2, ens3 and so on, one per node interface in the order of the CML2 topology; confirm with the MAC shown in the CML2 UI. Note the MTU column, it decides the maximum frame size (see below). An interface must be up with carrier; an unconnected CML2 interface stays without carrier.

Walkthrough with wpg doctor

$ wpg doctor
wpg doctor: environment check

✓ Raw sockets are available  [caps.raw_socket]
    euid/elevated=true CAP_NET_RAW=yes CAP_NET_ADMIN=yes bpf_writable=n/a
✓ At least one usable network interface is up  [iface.any_up]
    eth0
✓ Kernel supports AF_XDP (5.10 or newer)  [kernel.af_xdp]
    kernel 6.18.44-fc-v49 (need >= 5.10.0)
✓ Kernel supports TPACKET_V3  [kernel.tpacket_v3]
    kernel 6.18.44-fc-v49 (need >= 3.2.0)
! No hugepages configured (only needed for the DPDK backend)  [hugepages]
    0 x 2048 kB (0 free), 0 x 1048576 kB (0 free)
    → Reserve hugepages and bind the NIC to DPDK: echo 1024 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages ; sudo dpdk-devbind.py --status (then: --bind=vfio-pci <PCI address>)
- Not applicable on this operating system  [npcap]
- Not applicable on this operating system  [backend.pcap]
✓ libpcap is available  [pcap_lib]
    /usr/lib/x86_64-linux-gnu/libpcap.so

5 ok, 1 warning(s), 0 failure(s)

For afpacket only caps.raw_socket (fail if missing), iface.any_up and kernel.tpacket_v3 matter. The hugepages warning is expected unless you use DPDK. wpg doctor --json gives the same list for scripts. Then run a smoke test that leaves the host untouched:

wpg send tpl.wpg.yaml --backend pcapfile -i /tmp/out.pcapng   # dry run: writes a pcapng, sends nothing
wpg bench --backend afpacket -i eth0 --duration 5       # unlimited 64-byte frames on the wire!
wpg send tpl.wpg.yaml -i eth0 --backend afpacket --rate 10kpps --count 1000

Start with a low --rate; wpg bench sends at line rate into the CML2 link.

Promiscuous mode and MAC restrictions

wpg only transmits, and its afpacket socket is created with protocol 0, so it receives nothing and does not need promiscuous mode on the sending node. The restrictions are on the path:

  • Internal links between CML2 nodes are virtual links implemented by the CML2 host. Frames whose source MAC is not the one the node interface was created with may be filtered or the link may learn it inconsistently. If you generate frames with spoofed source MACs (ARP sweeps, DHCP load with many client MACs) and the peer never sees them, test first with the interface’s real MAC as source, then consider that the CML2 link may be dropping the rest. This has to be confirmed on your CML2 version.
  • External connector (bridge to the CML2 host network or to a physical NIC): the host bridge and any upstream switch may apply port security or MAC learning limits. High-rate multi-MAC traffic can flood the CAM table of a physical switch; use only on an isolated segment.
  • The receiving side (a CML2 router, or a second Ubuntu node running tcpdump) needs promiscuous mode only if the destination MAC is not its own: sudo ip link set ens3 promisc on.
  • Use of wpg is limited to lab networks you are authorised to test; see the legal notice.

MTU and jumbo frames

The afpacket ring sizes its slots from the interface MTU (capped at 9216); frames larger than a slot go out through a second plain socket. The frame length you send is Ethernet header plus payload without FCS, so a 1514-byte frame needs MTU 1500. The example above shows an MTU of 1400 on a virtio interface: a 1514-byte frame will then be rejected by the kernel (EMSGSIZE) and counted as dropped. Check wpg ifaces, keep template frames at MTU + 14, or raise the MTU on both ends (sudo ip link set ens3 mtu 9000). Jumbo frames also need every CML2 link and the peer node to allow them, which depends on the CML2 version and node type.

Expected afpacket performance on virtio

Unmeasured on CML2. What we have is the lo baseline in docs/perf.md: about 1.4–1.9 Mpps for 64-byte frames from one thread, bounded by the loopback receive path. On virtio-net the limit is the guest-to-host path: the virtio TX queue, the vhost thread on the CML2 host and the virtual link, so expect a value below the lo figure and strongly dependent on the host. Tuning switches worth trying, in order: --qdisc-bypass, larger --batch, --pin-core, and comparing --no-tx-ring. Record your results using the checklist in docs/perf.md.

--qdisc-bypass

--qdisc-bypass sets PACKET_QDISC_BYPASS so frames skip the qdisc layer. On lo it improved 64-byte throughput by about 30%. The consequences: no tc shaping, priority or netem on that interface applies to the traffic, packets are not counted by the qdisc statistics (tc -s qdisc), and if the device queue is full the frame is dropped (the kernel returns ENOBUFS) instead of waiting in the qdisc. wpg retries for a short time and then counts the frames as dropped. Leave it off when you rely on netem for impairments.

Receiving side: GRO, TSO and checksum offload

Offloads change what the receiver shows, not what wpg sent. With GRO or LRO enabled, tcpdump on a Linux receiver can display merged super-frames larger than the MTU for TCP streams; disable it for accurate captures: sudo ethtool -K ens3 gro off lro off. Checksum offload on the sending node does not matter for wpg, because wpg builds the full frame including checksums itself (bad checksums you asked for are sent as is). On virtio guests, captures on the sender may show “incorrect checksum” only for packets the kernel’s own stack produced, not for wpg frames. Use ethtool -k to see the current settings.

Choosing a backend on CML2

BackendWhen to use it on CML2 (virtio-net)Preparation
afpacketThe default; start here. Needs nothing extra and coexists with the management interfaceCAP_NET_RAW (above)
afxdpWorth comparing when afpacket tops out. virtio-net zero-copy needs a recent kernel; mostly you get copy mode, and the gap to afpacket is smallbuilt with --features afxdp, kernel 5.10+, enough queues (ethtool -L) (AF_XDP)
dpdkTakes the interface away from the kernel with the virtio PMD. The host’s vhost path is the limit, so the gain depends on the hostbuilt with --features dpdk, hugepages, vfio no-IOMMU mode or uio_pci_generic (CML2 and virtio)
pcapOnly to follow the same procedure as on other OSesbuilt with --features pcap, libpcap0.8

With any backend, check the frames with --backend pcapfile first and start with a low --rate. To compare performance, run wpg bench with each backend on the same link (Performance tuning) and record the results with the checklist in docs/perf.md.

Troubleshooting

SymptomLikely causeFix
AF_PACKET needs CAP_NET_RAW ... / EPERM / caps.raw_socket failsNo privilegeRun as root or sudo setcap cap_net_raw,cap_net_admin+eip $(command -v wpg); re-run after replacing the binary; not on nosuid mounts
ENOBUFS or a non-zero dropped counterTX queue full: the virtual link or vhost is slower than the send rate; frames retried ~100 ms then droppedLower --rate, reduce --batch, try without --qdisc-bypass, check the peer and the link speed; compare with --no-tx-ring
dropped equals the frames of one size classFrame larger than MTU (EMSGSIZE)Check wpg ifaces MTU, shrink the frame or raise MTU on both ends
“interface not found” / ENODEVWrong name or interface renamedwpg ifaces; names differ between eth0 and ens3 style
iface.any_up warns “none up with carrier”Interface down, or CML2 link not connected/startedsudo ip link set ens3 up; start the node and check the link in the CML2 topology
Sender counts packets but the peer sees noneWrong link, MAC filtering on the CML2 link, VLAN mismatch, receiver not in promiscCapture on the sending node interface first, then on the peer; try the real source MAC; ip link set ... promisc on
Throughput far below the lo baselinevirtio/vhost limits, one vCPU shared with other workGive the node 2+ vCPUs, --pin-core, see Performance tuning
Rate lower than requestedAbove what the path sustains; see rate accuracy in wpg send outputLower the rate; see Performance tuning

Interop checks

Status: draft

The templates in templates/interop/ check that a peer router accepts packets built by wpg. wpg is a stateless sender (no TCP sessions, no database synchronization), so each scenario checks one state change you can observe on the peer.

Verification status: the seven scenarios below were checked against FRR 8.4.4 with scripts/interop/frr-netns.sh (network namespace + veth, afpacket backend) on 2026-10-12, all PASS. The IOS-XR / Junos configuration examples and show commands come from general knowledge and have not been checked on real devices or CML2 yet. Please report differences in an issue.

Scenarios

TemplateWhat wpg sendsExpected state on the peer
ospfv2-hello-2wayOSPFv2 Hellos listing the peer’s router ID (priority 0), every 10 sNeighbor 2-Way/DROther (never Full)
ripv2-response-routeRIPv2 Responses with 198.51.100.0/24 (metric 1) and 203.0.113.0/25 (metric 5), every 30 sR routes in the RIB (metric + 1)
isis-l2-lan-hello-upL2 LAN IIHs listing the peer’s MAC in the IS Neighbors TLV (priority 0, padded to the MTU), every 3 sL2 adjacency Up
vrrpv3-preemptVRRPv3 Advertisements with priority 200 (VRID 5), every 1 sThe peer is Backup; about 3.6 s after wpg stops it is Master again
pim-hello-neighborPIMv2 Hellos (105 s holdtime, DR priority 0), every 30 swpg in the PIM neighbor list
ldp-link-helloLDP link Hellos (224.0.0.2, 15 s hold time), every 5 sA Link entry in LDP discovery (no TCP session)
bfd-session-upBFD control packets in state Down, then in state Up with the peer’s discriminator, every 300 msBFD session Up; Down one detection time (about 0.9 s) after wpg stops

By default wpg is 10.99.0.1 and the peer 10.99.0.2/24; change them with --var (see each template’s variables). Passing --var src_mac=<MAC of the sending interface> makes the peer’s tables easier to read.

BFD takes two steps: send a few packets with --var state=down so the peer moves to Init, read the peer’s local discriminator, then keep sending state Up with --var peer_discriminator=<value>.

All checks against FRR on one Linux host

sudo apt install frr iproute2       # the frr service does not need to run
cargo build -p wpg-cli
sudo scripts/interop/frr-netns.sh   # runs every scenario and prints PASS / FAIL

The script creates the namespace wpgfrr, starts the FRR daemons (zebra, ospfd, ripd, isisd, vrrpd, pimd, ldpd, bfdd) directly behind a veth pair (wpg0 ⇔ frr0), sends each template with wpg send --backend afpacket and checks the vtysh output. It cleans up on exit; with --keep the lab stays up and sudo ip netns exec wpgfrr vtysh -N wpg opens a shell in it (--down removes it).

Example output:

PASS  OSPFv2 neighbor 2-Way
PASS  RIPv2 routes installed
PASS  IS-IS L2 adjacency Up
PASS  VRRPv3 peer is Backup
PASS  PIM neighbor
PASS  LDP link discovery
PASS  BFD session Up

The FRR configuration applied by the script is below. FRR’s VRRP needs a macvlan vrrp4-2-5 carrying the virtual MAC 00:00:5e:00:01:05, which the script creates.

router ospf
 ospf router-id 10.99.0.2
 network 10.99.0.0/24 area 0
router rip
 version 2
 network 10.99.0.0/24
router isis 1
 net 49.0001.0000.0000.0002.00
 is-type level-2-only
interface frr0
 ip router isis 1
 ip pim
 vrrp 5 version 3
 vrrp 5 priority 100
 vrrp 5 ip 10.99.0.254
mpls ldp
 router-id 10.99.0.2
 address-family ipv4
  discovery transport-address 10.99.0.2
  interface frr0
bfd
 peer 10.99.0.1 interface frr0
  receive-interval 300
  transmit-interval 300

On CML2 or real devices

  1. Connect the sending interface of the Ubuntu node running wpg and the router’s interface to the same segment (prepare the node as in CML2 notes first).
  2. Apply the configuration below to the router (adjust interface names).
  3. For each scenario run wpg send templates/interop/<name>.wpg.yaml -i <iface> --backend afpacket --var src_mac=<MAC> ... and look at the state with the show commands. IS-IS needs --var peer_mac=<router MAC>; BFD needs the two steps above.

Show commands

ScenarioFRRIOS-XR (unverified)Junos (unverified)
OSPFv2show ip ospf neighborshow ospf neighborshow ospf neighbor
RIPv2show ip route ripshow route ripshow route protocol rip
IS-ISshow isis neighborshow isis adjacencyshow isis adjacency
VRRPv3show vrrp 5show vrrpshow vrrp
PIMshow ip pim neighborshow pim neighborshow pim neighbors
LDPshow mpls ldp discoveryshow mpls ldp discoveryshow ldp neighbor
BFDshow bfd peers briefshow bfd sessionshow bfd session

IOS-XR configuration example (unverified)

interface GigabitEthernet0/0/0/0
 ipv4 address 10.99.0.2 255.255.255.0
router ospf 1
 router-id 10.99.0.2
 area 0
  interface GigabitEthernet0/0/0/0
router rip
 interface GigabitEthernet0/0/0/0
router isis 1
 is-type level-2-only
 net 49.0001.0000.0000.0002.00
 address-family ipv4 unicast
 interface GigabitEthernet0/0/0/0
  address-family ipv4 unicast
router vrrp
 interface GigabitEthernet0/0/0/0
  address-family ipv4
   vrrp 5 version 3
    priority 100
    address 10.99.0.254
multicast-routing
 address-family ipv4
  interface GigabitEthernet0/0/0/0
   enable
router pim
 address-family ipv4
  interface GigabitEthernet0/0/0/0
mpls ldp
 router-id 10.99.0.2
 interface GigabitEthernet0/0/0/0
router static
 address-family ipv4 unicast
  192.0.2.0/24 10.99.0.1 bfd fast-detect minimum-interval 300 multiplier 3

Junos configuration example (unverified)

set interfaces ge-0/0/0 unit 0 family inet address 10.99.0.2/24 vrrp-group 5 virtual-address 10.99.0.254 priority 100
set interfaces ge-0/0/0 unit 0 family iso
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces lo0 unit 0 family iso address 49.0001.0000.0000.0002.00
set protocols vrrp version-3
set protocols ospf area 0 interface ge-0/0/0.0
set protocols rip group wpg neighbor ge-0/0/0.0
set protocols isis interface ge-0/0/0.0 level 1 disable
set protocols pim interface ge-0/0/0.0
set protocols mpls interface ge-0/0/0.0
set protocols ldp interface ge-0/0/0.0
set routing-options static route 192.0.2.0/24 next-hop 10.99.0.1 bfd-liveness-detection minimum-interval 300 multiplier 3

Limitations / out of scope

  • No stateful procedures (a non-goal): OSPF never reaches Full (wpg stays a priority-0 DROther), there are no LDP / BGP TCP sessions, no IS-IS LSP flooding and no automatic BFD state machine. BGP needs TCP and is not covered.
  • RIP routes time out 180 s after the last Response; keep sending to keep them.
  • IPv6 scenarios (OSPFv3, RIPng, MLD, VRRPv3 for IPv6) are not included because IPv6 was disabled in the environment used for verification.
  • The source MAC of the VRRP template is the virtual MAC 00:00:5e:00:01:<VRID>; change src together with the VRID.

Performance tuning

Status: draft

Measure first with wpg bench and compare against the baseline in docs/perf.md (measured on lo, null and a veth / dummy interface on WSL2, not on real NICs; afpacket reached 2-3 Mpps on one core on WSL2). All flags below exist on both wpg send and wpg bench unless noted; see the CLI reference.

Where to start

Change one thing at a time and measure each step with wpg bench (64-byte frames, about --duration 10 seconds).

  1. Know the ceiling: wpg bench --backend null measures frame generation without any transmit path. If a real interface gets close to it, wpg itself is the limit.
  2. afpacket basics: --qdisc-bypass (unless you need tc), --batch 64 / 128 / 256 / 512, and a comparison with --no-tx-ring.
  3. Pin cores: --pin-core (one worker) or --auto-pin. Keep the thread on the NIC’s NUMA node with its interrupts, and set the governor to performance (see “IRQ affinity and CPU governor” below).
  4. Add workers: --workers 2, 4, … up to the number of queues, until the gain stops.
  5. Change the backend: if that is still not enough, try afxdp (--xdp-mode, --busy-poll), then dpdk (DPDK and AF_XDP setup). On virtual NICs (CML2 and the like) the gap is often small; see CML2 notes.
  6. Tighten the rate: run wpg send at the target rate, read the achieved rate and lateness in the final report, and adjust --wait / --clock (see “Rate accuracy” below).
  7. Record it: keep the environment (CPU, NIC and driver, kernel, command, wpg bench --json output) with the checklist in docs/perf.md.

Core pinning: --pin-core

--pin-core <CORE> pins the transmit thread to one CPU core (Linux). This stops the scheduler from migrating the thread and keeps caches warm. Choose a core that is not handling the NIC’s interrupts, and preferably on the same NUMA node as the NIC (lscpu, /sys/class/net/<if>/device/numa_node). Keep the core free of other work (isolcpus or taskset for the rest).

Batch size and ring depth

  • --batch <N>: frames handed to the backend per send_batch call. Larger batches mean fewer system calls (default 64 for wpg send, 256 for wpg bench). Too large a batch delays the rate limiter’s pacing granularity. Try 64, 128, 256, 512.
  • --ring-depth <N>: number of frame slots in the afpacket TX ring (default 4096). The ring (and the afxdp UMEM) is capped at --ring-bytes / tx.ring_bytes in total (default 16 MiB), so on lo (16 KiB slots) the effective depth is 1024. Larger rings absorb bursts; they do not raise the sustained rate.
  • --burst <N> (wpg send): frames sent back to back per rate-control grant.

Memory limits

These defaults suit most hosts; raise them only for the cases below. Each has a wpg.toml key (see the configuration reference) and, for wpg send, a command-line override.

  • tx.prerender_max_bytes (256 MiB) and tx.prerender_max_packets (100M), --prerender-max-bytes / --prerender-max-packets: streams within both limits are built in full before sending (--plan auto); larger ones are built on the fly. Pre-rendered streams reach higher rates for templates whose fields cannot be patched in place, so raise the limits when such a stream just misses them and the host has the memory to spare. Lower them on small hosts that run several jobs at once.
  • tx.ring_bytes (16 MiB), --ring-bytes: memory per worker for the afpacket TX ring or the afxdp UMEM. Raise it together with --ring-depth when jumbo frames or long bursts need a deeper ring than 16 MiB holds. The memory is locked, so raise ulimit -l (systemd: LimitMEMLOCK) to match.
  • server.preview_max (256): most packets one preview request may render. Raise it to look further into a stream in one request; each request renders that many packets on the server.
  • server.job_history (100) and server.job_history_db (1000): finished jobs listed on the Jobs screen and kept in the database.

Ring versus sendmmsg: --no-tx-ring

The default afpacket path is the TPACKET_V3 TX ring: frames are copied into shared slots and a single send() per batch triggers transmission. --no-tx-ring uses sendmmsg instead (also the automatic fallback when the ring cannot be set up). On lo the two are within a few percent of each other (ring 1.44, sendmmsg 1.50 Mpps in release); on other drivers the result can differ, so measure both. The bench header prints which mode is active.

--qdisc-bypass

Skips the qdisc layer, about 30% faster on lo, but disables tc shaping/netem for the traffic. See CML2 notes.

Rate accuracy: wait mode (--wait) and clock (--clock)

The rate limiter (wpg send) is a token bucket. --wait chooses how it waits:

--waitBehaviourCPU
hybrid (default)sleep while the deadline is far away, busy-spin for the last 50 microsecondsa little, proportional to waiting
sleepsleep onlylowest
spinbusy-spin onlya full core
busy-pollspin and service the backend meanwhile (afxdp: reap the completion ring, wake the driver); the default with --busy-polla full core

Precision work (M8):

  • The TX thread’s timer slack is lowered from 50 to 1 microsecond (PR_SET_TIMERSLACK, Linux, for the modes that sleep).
  • Oversleep is learned: a moving average of how late sleep actually woke up is subtracted from the next sleep (the rest is spun away).
  • The clock is the TSC (--clock auto, the default): on x86_64 with an invariant TSC (CPUID, or the Linux flags constant_tsc and nonstop_tsc) the pacer reads rdtsc directly, with the frequency calibrated once against Instant. A read costs a few ns, so each spin iteration is shorter and the lateness about halves. --clock monotonic restores Instant; where the TSC is not usable the pacer falls back automatically.

Measurements in a container on lo (including a before/after comparison) are in docs/perf.md, section “Rate control precision”. In short: hybrid at 1 kpps went from 74.5 to 10-15 microseconds mean lateness, sleep from 62-121 to 2-44 microseconds; the median lateness of the spinning modes is about 0.1 microsecond (0.03-0.06 with the TSC). The maximum (milliseconds) comes from the shared host taking the vCPU away and no wait mode removes it; for precision combine --pin-core / --auto-pin with isolcpus.

When the interval between frames is shorter than the wait resolution, the limiter grants several frames at once (--burst), so the average rate follows the target while individual spacing does not. ifg=<duration> forces a burst of 1. If the achieved rate is lower than requested, the path is the limit: a catch-up burst is capped (10 ms) so it never floods after a stall. The final report of wpg send includes the achieved ratio and the lateness (max, mean); --json also has p50 / p99 (p50_jitter, p99_jitter) and whether the TSC was used (tsc).

Multi-queue, multi-core sending (--workers)

--workers N starts N TX workers. Each has its own thread and backend instance (afpacket: socket and TX ring; afxdp: socket and UMEM; dpdk: a TX queue of the shared port) and gets 1/N of the stream and of the rate (--rate 1Mpps --workers 4 is 250 kpps per worker). Counters are summed and the final report lists every worker. pcap and pcapfile are limited to one worker.

Queue assignment:

  • afxdp: worker i binds NIC queue --queue + i. Create the queues with ethtool -L <if> combined N (DPDK / AF_XDP).
  • dpdk: the port is configured with --queue + N TX queues and worker i sends on TX queue --queue + i; the mbuf pool lives on the NIC’s NUMA socket (DPDK).
  • afpacket: the queue cannot be chosen directly; the kernel derives it from the sending CPU. With XPS configured (/sys/class/net/<if>/queues/tx-<n>/xps_cpus) it follows that map, otherwise with --qdisc-bypass it is “CPU number mod queue count”. Pinning the workers to different cores spreads them over different queues.
# 4 workers on a 4-queue NIC, pinned automatically to cores on the NIC's NUMA node
wpg bench --backend afxdp -i ens3 --workers 4 --auto-pin
wpg send tpl.wpg.yaml -i ens3 --backend afpacket --qdisc-bypass --workers 4 --pin-cores 2,3,4,5

NUMA awareness (--auto-pin)

  • --auto-pin pins the workers, in order, to cores on the NIC’s NUMA node (/sys/class/net/<if>/device/numa_node). Only cores the process may use (taskset / cgroup cpuset) are chosen, and core 0 (which tends to collect interrupts and housekeeping) comes last. Without NUMA information (virtual NICs, single-node machines) the allowed cores are used in order. --pin-cores takes precedence.
  • Workers allocate their frame buffers after pinning themselves, so Linux’s first-touch policy puts that memory on the core’s node.
  • The afxdp UMEM is allocated on the NIC’s node (mbind(MPOL_PREFERRED)); the backend line shows NUMA node N.
  • Keep the (TX completion) interrupts on cores of the same node too (see “IRQ affinity” below).

IRQ affinity and CPU governor

  • Spread or pin NIC interrupts: cat /proc/interrupts | grep <if>, echo <mask> | sudo tee /proc/irq/<n>/smp_affinity; stop irqbalance when pinning by hand. Keep the TX thread and the TX-completion IRQ on the same NUMA node (not necessarily the same core).
  • Use the performance governor: sudo cpupower frequency-set -g performance. In a VM the governor is controlled by the host; ask the CML2 host admin.
  • Disable deep C-states if latency spikes appear; disable SMT sibling load on the pinned core.

Authentication and TLS

Admin password

wpg has one admin account (admin). Its password comes from the first of these sources that is set:

  1. wpg serve --password <PASSWORD>. Other users can see it in the process list, so use it only for quick tests.
  2. wpg serve --password-file <FILE>. The file holds the plain-text password or an argon2 hash.
  3. The environment variable WPG_PASSWORD, holding the plain-text password or an argon2 hash.
  4. auth.password_hash in wpg.toml. wpg config set-password prompts for the password and writes this key. Use --stdin in scripts.
  5. auth.password_file in wpg.toml, holding the plain-text password or an argon2 hash.
  6. The first-run setup screen, when none of the above is set.

wpg hashes plain-text passwords with argon2id at startup (19 MiB, 2 passes; the OWASP recommendation) and stores the hash in <data_dir>/wpg.sqlite. If a configured password changes, the next start ends all existing sessions.

Without a password

Until a password exists:

  • every API endpoint except /api/health, /api/version, /api/auth/* and /api/docs answers 401 setup_required;
  • wpg serve refuses to listen on a non-loopback address and exits with status 2. Pass --allow-insecure to override this. wpg then logs a loud warning, and anyone who can reach the server can set the password;
  • the setup screen accepts requests only from the machine itself (loopback), unless the server runs with --allow-insecure.
wpg serve                                  # 127.0.0.1:8080: open it and set the password
wpg config set-password                    # or: store a hash in wpg.toml first
wpg serve --bind 0.0.0.0:8080 --tls        # now any address is fine

Sessions and CSRF

  • After a login, the wpg_session cookie identifies the session. It holds a random 256-bit token and is set with HttpOnly; SameSite=Strict, plus Secure over HTTPS. The database stores only the token’s SHA-256.
  • Sessions last auth.session_ttl_secs (default 24 h). Every request extends the session.
  • POST, PUT and DELETE requests must send the session’s CSRF token in X-CSRF-Token. The server returns the token in GET /api/auth/status and in the readable wpg_csrf cookie. Login and setup take no CSRF token, but they accept only Content-Type: application/json.
  • WebSocket connections (/api/ws, and /api/terminal/ws of the web terminal) need the session cookie. The server rejects them when their Origin names another host. See Web terminal for the terminal’s safeguards.

API: GET /api/auth/status, POST /api/auth/setup {password, confirm}, POST /api/auth/login {password, username?}, POST /api/auth/logout. See the API reference.

API tokens

Scripts, CI jobs and wpg remote authenticate with an API token instead of a session:

# on the server (also while it runs); prints only the token
wpg config token create ci --expires-days 90
# or on the web UI: Settings → API tokens

export WPG_SERVER=https://wpg.example.net:8080 WPG_TOKEN=wpg_...
wpg remote jobs start examples-arp-sweep --backend null --count 100 --wait
curl -H "Authorization: Bearer $WPG_TOKEN" "$WPG_SERVER/api/jobs"
  • A token is wpg_ followed by 64 hex digits (256 random bits). wpg shows it once, when you create it. The database stores only its SHA-256, and the first 12 characters (wpg_ + 8 hex digits) to tell tokens apart. A fast hash is enough because the token is random and long; argon2 would cost every API request about 19 MiB and tens of milliseconds.
  • A request with Authorization: Bearer <token> acts as the user who created the token, with that user’s role. There are no finer scopes. It needs no CSRF token and gets no cookies.
  • When a request carries an Authorization header, wpg ignores the session cookie. A wrong, expired or revoked token answers 401 unauthorized. Failures count against the login rate limit of the client address.
  • A token can expire after 1 to 3650 days, or never. It survives password changes. Revoking it (web UI, wpg config token revoke <id>, DELETE /api/tokens/{id}) deletes it; the next request with it fails.
  • Tokens cannot manage tokens: /api/tokens answers 403 forbidden to bearer requests. Create and revoke tokens with a session (the web UI) or with wpg config token on the server. Admins see and revoke every user’s tokens; other users see only their own.
  • The audit log records token creation, revocation and rejected tokens. wpg records each token’s last use, at most once a minute.

API: GET /api/tokens, POST /api/tokens {name, expires_in_days?} (returns {token, secret}), DELETE /api/tokens/{id}.

wpg remote checks the server certificate. For a server with a self-signed certificate, pass --insecure.

Login rate limit

wpg allows 5 failed logins per minute per client address. After that, the client is locked out for 1 minute. The lock-out doubles each time it happens again, up to 15 minutes. While a client is locked out, logins answer 429 rate_limited with details.retry_after_secs and a Retry-After header.

wpg records every attempt in the login_attempts table and keeps it for 30 days. Behind a reverse proxy, all clients share the proxy’s address.

Audit log

Logins, failed logins, logouts, the setup, API token creation, revocation and rejection, and every job action (create, start, pause, resume, stop, delete) are logged with the wpg::audit target, the user and the client address. To log only these events, set RUST_LOG=wpg::audit=info.

TLS

  • wpg serve --tls, or server.self_signed_tls = true, generates a self-signed ECDSA certificate into <data_dir>/tls/ and reuses it on later starts. wpg renews it about a month before it expires; certificates are valid for 800 days. It covers localhost, 127.0.0.1, ::1, the bind address and the host name. wpg prints the certificate’s SHA-256 fingerprint at startup, so you can compare it with the one your browser shows.
  • To use your own certificate, set [server.tls] cert = "...", key = "..." (PEM files) in wpg.toml. This takes precedence over the self-signed certificate.
  • The server does not answer plain HTTP on a TLS port and does not redirect to HTTPS.

Behind a reverse proxy (nginx, Caddy), keep wpg on 127.0.0.1 and let the proxy handle TLS. Forward the WebSocket upgrade for /api/ws.

Security headers

Every response carries a Content Security Policy (default-src 'self'; scripts only from the server plus 'wasm-unsafe-eval' and the hashes of the inline bootstrap script; inline styles; connect-src 'self' ws: wss:; frame-ancestors 'none'), plus X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: no-referrer and a restrictive Permissions-Policy. The Swagger UI under /api/docs gets a relaxed policy that allows its inline scripts.

Web terminal (SSH / Telnet)

The wpg UI can open SSH and Telnet sessions to the devices under test. While sending packets you can watch the counters and logs of the peer without a separate terminal program (Tera Term, PuTTY) or jump host. The wpg server opens the connections, so it also works in labs where your PC cannot reach the devices directly (CML2, EVE-NG, closed hardware labs). The design is recorded in ADR-0011.

Enabling it

The web terminal is disabled by default. Add a [terminal] section to wpg.toml and restart the server.

[terminal]
enabled = true                                 # Web terminal (SSH / Telnet)
allowed_targets = ["10.0.0.0/8", "*.lab.example", "console-srv:2001"]
record_sessions = true                         # keep session logs under <data_dir>/terminal-logs
idle_timeout_secs = 1800                       # close idle sessions after this many seconds (0 = never)
max_sessions = 8                               # simultaneous sessions, all users
KeyDefaultMeaning
enabledfalseEnable the web terminal
allowed_targets[]Targets sessions may connect to; empty = any target
record_sessionstrueAllow session logs (false disables server-side logs)
idle_timeout_secs1800Seconds without input or output before a session is closed; 0 = never
max_sessions8Simultaneous sessions

Environment variables work as well (WPG_TERMINAL__ENABLED=true, WPG_TERMINAL__ALLOWED_TARGETS='["10.0.0.0/8"]'). Check the file with wpg config validate; it warns when the terminal is enabled with an empty allowed_targets on a non-loopback address.

allowed_targets syntax

EntryMeaning
r1, r1.lab.exampleThat host name (case-insensitive), any port
r1:22That host name, port 22 only
*.lab.exampleEvery subdomain of lab.example
192.0.2.10, 192.0.2.10:2001That IP address (and port)
[2001:db8::1]:830IPv6 address and port
10.0.0.0/8, 2001:db8::/32An address block (CIDR)

Host name entries match the name the user typed. Address and CIDR entries match the addresses the name resolves to, and the session only connects to the addresses that matched. The checked address is the one dialled, so changing DNS afterwards cannot bypass the list.

Using it

Open Terminal in the sidebar (shortcut g c).

  1. In the connection form choose the protocol (SSH / Telnet), host, port (default 22 / 23) and, for SSH, the user name.
  2. Choose the SSH authentication:
    • Password: log in with the password. Leave it empty to get the server’s prompts (keyboard-interactive, password) in a dialog. A single hidden keyboard-interactive prompt (“Password:”, common on network devices) is answered with the password you entered.
    • Private key: paste or load an OpenSSH, PEM or PuTTY .ppk key; passphrases are supported.
  3. Connect opens a new tab. Several tabs can be open at once and they stay connected while you use other pages.

Save profile stores the protocol, host, port, user name, authentication method and log options in the browser (localStorage). Passwords, keys and passphrases are never stored.

First connection to an SSH host

For a host it has not seen before, wpg shows the host key algorithm and its SHA-256 fingerprint (SHA256:...). Compare it with the real value before you continue, for example:

  • run ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the host itself;
  • run ssh-keyscan -p 22 host | ssh-keygen -lf - from a machine with a trusted path to the host;
  • on network devices, convert the public key the device shows (show crypto key mypubkey rsa on Cisco IOS, …) to OpenSSH format and pass it to ssh-keygen -lf; some devices print MD5 or hexadecimal fingerprints, so compare like with like.

Then choose:

  • Trust and save: store the key in the server’s <data_dir>/terminal/known_hosts (OpenSSH known_hosts format) and connect. Later connections are silent.
  • Connect once: connect without storing the key (useful for lab devices that are rebuilt often).
  • Cancel: do not connect.

When a host presents a key that differs from the stored one, the connection is refused (possible man-in-the-middle) and both keys are shown. If the change is expected (device replaced, keys regenerated), remove the stored key under Known hosts at the bottom of the page and connect again to confirm the new key. You can also pre-seed known_hosts with lines from ssh-keyscan.

Through jump hosts (ProxyJump)

Under Jump hosts (ProxyJump) in the connection form, press Add jump host and enter the SSH servers to go through, nearest first (up to 4). It works like OpenSSH’s ssh -J ops@bastion,ops@inner admin@r1: one click reaches the device behind them, without typing ssh on each hop.

browser ── wpg server ──SSH── jump 1 ──SSH── jump 2 ──SSH / Telnet── device
  • The wpg server only connects to jump host 1 itself. Jump host 2 and the device are reached through a direct-tcpip channel opened on the previous jump host (the mechanism behind OpenSSH’s -W / ProxyJump), so AllowTcpForwarding must be enabled in the jump hosts’ sshd.
  • Each hop’s host key is confirmed on first contact, exactly as for a direct connection. The dialog and the login prompts name the hop they belong to.
  • Each hop logs in with its own password or private key. An empty password is asked for at that hop. Keys and passwords are not stored in profiles (the jump hosts’ host, port and user are).
  • The final target can be SSH or Telnet, so a terminal server’s Telnet ports behind a bastion work too.
  • When something fails, the error names the jump host it happened at (for example “at jump host 10.0.0.1:22”).
  • The audit log and GET /api/terminal/status record the jump hosts (via).

Allowlist: allowed_targets applies to every hop, jump hosts included. The first jump host is resolved by the wpg server and checked like a direct target. Later hops and the final target are resolved by the jump host, so a host name is matched against name entries (r1.lab, *.lab.example) and an IP address against address / CIDR entries; a target given by name is not admitted by a CIDR entry.

Telnet

The Telnet client only answers the server’s option requests (ECHO, SGA, NAWS window size, terminal type XTERM-256COLOR, BINARY); it never starts a negotiation, so raw TCP console ports of terminal servers (CML2, EVE-NG consoles) never see stray bytes. Enter is sent as CR NUL as the NVT rules require.

Copy and paste

ActionHow
CopySelect (copied automatically by default), Ctrl+Shift+C, Ctrl+Insert
PasteRight / middle click, Ctrl+Shift+V, Shift+Insert, Ctrl+V
FindThe search box of the toolbar (Enter: next, Shift+Enter: previous)

Pasting several lines shows the line count and a preview first (can be switched off). With a pause per line each line is followed by that many milliseconds, for consoles with small input buffers when pasting configurations. Send file sends a text file after the same confirmation.

Browsers only allow the clipboard API on HTTPS or localhost. Over plain HTTP from another host, right-click paste cannot read the clipboard: use Ctrl+V or Shift+Insert (copying still works).

Font size, scrollback lines, copy on select, right-click paste, paste confirmation and the pause per line are in Terminal settings and stored in the browser.

Session logs

With record_sessions = true, “Record a session log on the server” (on by default) writes what the remote side sends to <data_dir>/terminal-logs/, named like 20261027-101500_ssh_r1.lab_22_ab12cd34.log (UTC time, protocol, host, port, session id).

  • Only the remote side’s output is recorded, never your keystrokes (input that is not echoed, such as passwords, does not end up in the log).
  • By default escape sequences are removed (Tera Term’s “plain text”); without stripping, cat replays the log with colours.
  • Start log / Stop log in the toolbar control recording during a session; restarting creates a new file.
  • A file stops growing at 256 MiB (the session continues).
  • The Session logs list downloads and deletes logs; a log that is being written cannot be deleted.
  • Logs are never deleted automatically; manage retention yourself. Files are created with mode 0600.

Without server-side logs, Save scrollback saves the terminal’s scrollback from the browser as a text file.

Security

With the web terminal enabled the wpg server becomes a jump host into the test network:

  • Restrict the targets: list only the lab ranges in allowed_targets. Left empty, everyone who can log in to wpg can reach any host the server can reach, management networks and internal servers included.
  • Use HTTPS: passwords and private keys travel from the browser to the wpg server. Away from localhost use wpg serve --tls or a certificate (Authentication and TLS).
  • No stored secrets: wpg never writes passwords, keys or passphrases to disk; they stay in memory while the connection is being set up. The browser tab keeps what you typed in memory for reconnecting until the tab is closed.
  • Audit trail: session start, end and refusals are logged with target wpg::audit (wpg user, client address, target, login name, end reason, bytes in / out, log file). RUST_LOG=wpg::audit=info prints only audit events. Storing / removing host keys and deleting logs are logged as well.
  • Access: only logged-in users; the WebSocket only accepts same-origin connections (including a reverse proxy configured in server.base_url). Users with the viewer role (P1) cannot open sessions.
  • Idle timeout and session limit: abandoned sessions are closed after idle_timeout_secs; max_sessions caps simultaneous sessions.
  • Legacy algorithms: to reach old network equipment, SHA-1 key exchange and CBC ciphers are offered with the lowest priority; they are only used when the device offers nothing better.

Reverse proxy

Behind a reverse proxy, forward the WebSocket upgrade of /api/terminal/ws like that of /api/ws. nginx:

location /api/terminal/ws {
    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_read_timeout 3600s;
}

Keep proxy_read_timeout above idle_timeout_secs.

API

MethodPathPurpose
GET/api/terminal/statusConfiguration (enabled, allowlist) and running sessions
GET/api/terminal/wsSession WebSocket (403 terminal_disabled when disabled)
GET/api/terminal/logsSession logs
GET / DELETE/api/terminal/logs/{name}Download / delete a log
GET/api/terminal/known-hostsStored host keys
DELETE/api/terminal/known-hosts/{host}/{port}Remove a host key

On the WebSocket, send {"type":"connect","protocol":"ssh","host":"r1","username":"admin","password":"...","cols":120,"rows":40} first. The server answers with JSON state, host_key, auth_prompt, connected, record, error and closed messages and sends the terminal output as binary frames; keystrokes go back as binary frames (or {"type":"input","data":"..."}). See TerminalClientMessage / TerminalServerMessage in the API reference.

Troubleshooting

MessageCause and fix
“This host is not in the server’s allowed targets”Add it to allowed_targets and restart the server
“the host key has changed”The device’s key changed. If that is legitimate, remove the old key under Known hosts
“SSH error: No common … algorithm”The device shares no algorithm with wpg; enable newer ones on the device (aes-ctr, ecdh, ed25519, …)
“Login failed”Check user name, password or key; some devices disable public key authentication
“The connection failed” at a jump hostThe jump host cannot reach the next hop, or its sshd has AllowTcpForwarding no
Right-click paste does nothingYou use plain HTTP from another host; use Ctrl+V / Shift+Insert or HTTPS
Garbled layoutResizing the window notifies the device; for Telnet devices without NAWS set the size on the device (terminal length 0, …)

Receive and verification

Status: draft

Besides sending, wpg can do simple receive-side checks (v1 is deliberately minimal):

  • receive counters: frames, bytes, pps / bps received, and the count and rate of frames matching a filter;
  • matching with a tcpdump-style filter expression;
  • the first N frames (hex and decoded);
  • saving the matching frames as pcapng;
  • loss, reordering, duplicates and latency estimates from signatures embedded by the sender.

The CLI is wpg capture, the web UI has a “Receive” page and the API is /api/captures.

Receive backends

BackendOSNotes
afpacketLinuxReceives through an AF_PACKET raw socket; -i any means every interface. Needs CAP_NET_RAW (Permissions). Frames this host transmits (PACKET_OUTGOING) are not counted by default, so a frame sent and received on lo counts once; --include-outgoing counts them too. Kernel drops (PACKET_STATISTICS) are shown as dropped.
pcapalllibpcap / Npcap, only in builds with --features pcap. Excluding outgoing frames (pcap_setdirection) does not work on Windows.
pcapfileallReplays a pcap / pcapng file as if its frames had just been received, with their recorded timestamps. Give the file path instead of an interface. Useful without a NIC and for offline verification of a capture taken elsewhere. Replay is instant, so pps / bps are processing speeds.
nullallReceives nothing (tests).

Filters

Filters are a subset of tcpdump / BPF, evaluated in user space the same way on every backend. An empty filter matches every frame. Keywords are case-insensitive.

SyntaxMeaning
and / &&, or / ||, not / !, ( )Logic (precedence not > and > or)
ether [src|dst] host <MAC>, ether src <MAC>Source / destination MAC (00:11:22:33:44:55, 0011.2233.4455)
ether proto <number|ip|ip6|arp|vlan|mpls|lldp|pppoe>EtherType (tag types count too)
broadcast, multicast (optionally after ether)All-ones / multicast destination MAC
vlan [<id>]Has an 802.1Q / 802.1ad tag (with an id: any tag with that id)
mplsMPLS (0x8847 / 0x8848)
ip, ip6, arp, rarpL3 type
tcp, udp, sctp, icmp, icmp6Transport type
ip proto <number|name>, ip6 proto …, proto …IP protocol number (names such as ospf, gre, pim, vrrp work too)
[src|dst] host <address>, src <address>IPv4 / IPv6 address (also ARP sender / target addresses)
[src|dst] net <address/len>, net <address> mask <mask>Network
[tcp|udp|sctp] [src|dst] port <n>Port
[tcp|udp|sctp] [src|dst] portrange <low>-<high>Port range
less <n>, greater <n>, len <|<=|>|>=|==|!= <n>Frame length (without FCS)
wpg (signature)Frames carrying a wpg signature

Examples: udp dst port 5001 and wpg, vlan 100 and not arp, ip6 and net 2001:db8::/32.

Differences from tcpdump:

  • vlan does not shift the offsets of later primitives; every primitive looks inside the VLAN tags.
  • host / net also match ARP addresses.
  • Byte-offset expressions such as ip[0] & 0xf are not supported.
  • Matching happens in user space, so every received frame is copied to user space.

Syntax errors are reported with their position (wpg capture exits with status 2, the API answers 400, the web UI shows the error at the input).

Signatures

With wpg send --signature (job option "signature": true, the checkbox under Advanced in the web UI’s new-job form) every frame gets a signature written over its last 24 octets:

OffsetSizeContent
04magic 57 50 47 01 ("WPG" + version 1)
44stream id (big endian)
88sequence number within the stream (from 0)
168TX time (nanoseconds since the Unix epoch)
  • Only payload (or Ethernet padding) is overwritten. The sender reads the Ethernet / 802.1Q / 802.1ad / IPv4 / IPv6 (extension headers) / UDP / TCP / ICMP / ICMPv6 headers; a frame with fewer than 24 octets after them is sent unchanged and counted as unsigned in the statistics. Give the template a payload of at least 24 octets when using signatures.
  • UDP / TCP / ICMP / ICMPv6 checksums are updated incrementally (RFC 1624), so receivers do not see bad checksums. An IPv4 UDP checksum of 0 (not computed) stays 0. Other checksums (OSPF, GRE, …) are not updated.
  • The stream id is --stream-id (default 0) plus the stream index; the streams of a mixed job get distinct ids.
  • Sequence numbers count per stream from 0 across all workers. The TX time is taken once per batch.

The receiver looks for the magic within the last 92 octets of a frame, so Ethernet padding or an FCS added on the way do not hide it.

Reading the verification results

With --verify (verify in the API / web UI) the signatures of the matching frames are aggregated per stream:

FieldMeaning
receivedFrames received with that stream id
seq first–lastLowest / highest sequence number received
lost(highest − lowest + 1) − distinct sequence numbers received. An estimate: frames before the lowest one (sent before the capture started) and frames still in flight at the time of the snapshot are not counted.
reorderedFrames that arrived after a higher sequence number
duplicatesSequence numbers received twice within the last 65536 sequence numbers (older repeats count as reordered)
latency min / avg / maxReceive time − TX time
jitterMean absolute difference between consecutive latencies

Latency is only meaningful when sender and receiver share a clock (same host, or hosts synchronised with PTP / NTP); negative values mean the clocks disagree. It includes the kernel network stack and batching.

Examples

Same host over lo (Linux)

# terminal 1: receive (ends after 1000 frames)
wpg capture -i lo -f "udp port 5001 and wpg" --count 1000 --verify -w rx.pcapng
# terminal 2: send
wpg send templates/examples/eth-ipv4-udp-range.wpg.yaml -i lo --backend afpacket \
  --count 1000 --rate 50kpps --signature --stream-id 9

Receiver output:

#   0  12:54:03.823537753    106 B  ethernet2 / ipv4 / udp / raw  [wpg stream 9 seq 0]
...
matched    1000 pkts  106000 bytes
saved      1000 pkts to rx.pcapng
signed     1000 with a signature, 0 without
stream 9     received 1000  seq 0-999  lost 0 (0.000%)  reordered 0  duplicates 0
             latency min 96.4 µs  avg 190.5 µs  max 829.9 µs  jitter 5.6 µs

Two hosts

Start wpg capture -i eth1 --verify -f "udp and wpg" on the receiver first, then wpg send … --signature on the sender. For latency, synchronise both clocks (PTP, …); loss and ordering do not need synchronised clocks.

Without a NIC (every OS)

wpg send templates/examples/eth-ipv4-udp-range.wpg.yaml --backend pcapfile -i tx.pcapng \
  --count 500 --signature
wpg capture --backend pcapfile -i tx.pcapng --verify

A capture taken elsewhere (a switch mirror port, …) can be verified offline the same way.

Web UI

On the “Receive” page choose the backend, interface, filter (checked while you type), packet / time limits, how many leading frames to keep, a file name to save to and whether to verify signatures, then start. While it runs, counters and rates update live over the WebSocket, with the per-stream verification results and the list of the first N frames (hex and decoded view of the selected one). A saved pcapng file can be downloaded once the capture has ended.

For the pcapfile backend the input file and the save file are file names under captures/ in the server’s data directory (where job dry runs are written too).

Limitations

  • Filters are evaluated in user space and afpacket calls recvfrom once per frame, so receiving more than a few hundred thousand pps is out of scope; at high rates compare the receive counters with NIC or switch statistics.
  • Saved pcapng files have microsecond timestamps.
  • Full capture features (ring buffers, file rotation, kernel BPF) are out of scope.

SNMP tool

Status: draft

Besides generating packets, wpg contains an SNMP manager (the “SNMP” screen of the web UI; API /api/snmp). Reading device counters while you load a link, or checking that a trap is sent, no longer needs a second tool. See ADR-0010 for the design.

  • Get / GetNext / GetBulk / Walk / Set (SNMPv1 / v2c / v3)
  • SNMPv3 USM: noAuthNoPriv / authNoPriv / authPriv, authentication MD5 / SHA-1 / SHA-224 / SHA-256 / SHA-384 / SHA-512, privacy DES / AES-128 / AES-192 / AES-256; the agent’s engine ID is discovered automatically
  • sending and receiving traps / informs
  • MIB upload, and readable values using names, enumerations, display hints and units
  • pcap / pcapng recording of the exchanged SNMP datagrams

The screen

The screen has three tabs; the “Record pcap” switch in the header applies to all of them.

Operations

  1. Fill in the target (host, port, version; the community for v1 / v2c; user, security level, protocols and pass phrases for v3). “Save profile” keeps a target in the browser. Communities and pass phrases are never stored, neither in profiles nor on the server.
  2. Type object names or OIDs; names from the loaded MIBs are completed (ifDescr.1, IF-MIB::ifTable, sysUpTime.0, 1.3.6.1.2.1.1). Separate several with spaces. “Pick from the MIB tree” opens the tree (whole, or one module) with check boxes that add OIDs to the field and remove them; scalars get .0.
  3. Press Get / GetNext / GetBulk / Walk. What each one does is listed below the buttons:
    • Get: the value of the given instances: sysDescr.0 for a scalar, ifDescr.1 with the INDEX for a table column. sysDescr or ifTable alone return noSuchObject (the result says so).
    • GetNext: the one instance after each OID.
    • GetBulk (v2c / v3): up to “Max repetitions” instances after each OID in one request. It does not stop at the end of the subtree, so values outside the requested OIDs are included.
    • Walk: the whole subtree of each OID, in the order given. It uses GetBulk on v2c / v3 and GetNext on v1 and stops at the end of the subtree, at endOfMibView or at an OID that does not increase. An instance such as sysDescr.0 gives the Get result. “Walk limit” counts all OIDs together.

The result names the OIDs that were requested.

Results are shown as name / type / value, formatted with the MIBs:

RawShown
ifOperStatus 1up(1)
MacAddress (1x:)00:1b:21:aa:bb:cc
DateAndTime2026-10-27,13:5:9.4,+9:0
TimeTicks 123456781d 10:17:36.78 (12345678)
hrMemorySize 80488048 KBytes (UNITS)
OID valueIF-MIB::ifIndex

“Raw values” shows the values without MIB knowledge. When a walk contains a conceptual table (ifTable, …) it is also shown as rows × columns keyed by its INDEX (“Table view”). Values outside the tables (ifNumber.0 when walking interfaces, …) are listed above them.

“Auto refresh” repeats the last read operation at the chosen interval. Counter32 / Counter64 values get a per-second rate from the previous poll and a sparkline (Counter32 wraps are handled).

Set takes rows of OID / type / value. Type auto takes the type from the MIB and accepts enumeration labels such as down; for objects no MIB knows, choose a type (net-snmp’s i u c C t a o s x d n). Agent errors (notWritable, wrongType, …) are shown with the result.

Traps

  • Receive: choose the listen address (default 0.0.0.0:162), the accepted communities (empty = any) and v3 users, then “Start”. Notifications appear at once (WebSocket snmp_trap events) with the trap OID and bindings named by the MIBs. Informs are acknowledged automatically. Messages with a wrong community or failed authentication are listed too, with the error.
  • Send: with the target of the Operations tab, send a trap OID (linkDown, …) and bindings (one per line: “object value” or “object type value”). On v1 the notification is converted to a Trap-PDU (RFC 3584). “Inform” waits for the acknowledgement. For v3 traps wpg is the authoritative engine.

MIBs

Drop MIB files (.mib .txt .my) on the upload area or use “Choose files”. They are stored under <data_dir>/mibs (setting snmp.mib_dir) and loaded at once. The module list shows the load state:

  • loaded: everything resolved
  • loaded with problems: some definitions do not resolve or an imported module is missing; the missing modules are named, upload them too (vendor MIBs usually need common modules such as CISCO-SMI)
  • not usable: nothing resolved

The quirks of vendor MIBs (comment banners, unknown macros, missing imports, broken definitions) become warnings; the rest stays usable. Uploaded modules can be deleted (with every module of the same file). Bundled modules cannot be deleted, but uploading a newer version with the same name replaces them.

The MIB tree shows descriptions, syntax, access, enumerations, INDEX and more. “Module to show” narrows it to one uploaded (or bundled) MIB module: only the objects that module defines, starting at its top nodes instead of 1.3.6.1. The magnifier button in the module list does the same. “Use in a request” copies the name to the Operations tab (scalars with .0); the Get (scalars only) / GetNext / Walk buttons switch to the Operations tab, run the request at once and scroll to the result.

Bundled MIBs: SNMPv2-SMI / TC / CONF / MIB, RFC1155-SMI, RFC-1212, RFC-1215, RFC1213-MIB, IANAifType-MIB, IF-MIB, INET-ADDRESS-MIB, IP-MIB, HOST-RESOURCES-MIB, SNMP-FRAMEWORK-MIB, SNMP-USER-BASED-SM-MIB, UUID-TC-MIB, IANA-ENTITY-MIB, ENTITY-MIB (IETF MIB modules extracted from the RFCs).

pcap recording

With “Record pcap” on, every SNMP datagram wpg sends or receives (requests, responses, traps, informs) is recorded; download it as .pcap or .pcapng and open it in Wireshark. The datagrams travel over ordinary UDP sockets, so the Ethernet / IP / UDP headers are synthesised with the real addresses and ports and placeholder MACs (02:00:00:00:00:01 for wpg, 02:00:00:00:00:02 for the peer). At most 100,000 frames are kept in memory.

Configuration

[snmp]
enabled = true        # SNMP tool screen and API
trap_listen = ""      # e.g. "0.0.0.0:162"; empty = trap receiver not started at boot (can be started from the UI)
mib_dir = ""          # default <data_dir>/mibs

With trap_listen set, the receiver starts at boot (accepting any community and no v3 users; restart it from the screen to change that).

Permissions for UDP 162

Ports below 1024 need root or CAP_NET_BIND_SERVICE:

sudo setcap cap_net_bind_service=+ep "$(command -v wpg)"

Otherwise listen on e.g. 0.0.0.0:1162 and point the devices’ trap destination port there. A start without the permission fails with an explanatory error.

Limits

  • The receiver does not enforce the SNMPv3 time window (notInTimeWindow) so that late messages are still shown; noAuthNoPriv v3 messages are accepted from any user name.
  • v3 pass phrases need at least 8 characters (RFC 3414’s recommendation, enforced by most devices).
  • The MIB parser looks up names and types; it is not a strict SMI validator.

DHCP server

Status: draft

wpg includes a DHCP server for test networks (the “DHCP” screen of the web UI; API /api/dhcp). Connect the wpg host directly to the device under test (router, CPE, host) and hand it addresses and prefixes. The design is in ADR-0012 (Japanese).

  • DHCPv4: address pool, subnet mask, routers, DNS, domain name, NTP, reservations (MAC → IP), relays (giaddr / option 82)
  • DHCPv6: addresses (IA_NA), prefix delegation (IA_PD), DNS servers / domain search list, Rapid Commit
  • Router advertisements (RA): the M / O flags that make hosts use DHCPv6, an optional on-link prefix
  • Static interface addresses (temporary from the screen, persistent with netplan at deploy time)
  • The lease table and an activity log

Linux only.

Choosing the interface

The server answers on one interface only (its sockets are bound to it with SO_BINDTODEVICE); the management interface never sees DHCP.

Normally the interface is fixed at deploy time:

scripts/deploy.sh user@host --service --iface ens3 \
    --dhcp-iface ens3 --dhcp-iface-addr 192.168.100.1/24,2001:db8:1::1/64
  • --dhcp-iface ens3 writes WPG_DHCP__IFACE=ens3 into /etc/wpg/wpg.env; the screen can no longer change the interface. The service gets a CAP_NET_BIND_SERVICE drop-in (ports 67 / 547).
  • --dhcp-iface-addr gives that interface static addresses: it writes /etc/netplan/90-wpg-ens3.yaml and runs netplan apply (DHCP client and RA acceptance are turned off on it). An interface carrying the default route is never touched. To undo, delete the file and run sudo netplan apply.

From Windows: deploy.ps1 -DhcpIface ens3 -DhcpIfaceAddr 192.168.100.1/24. In answer files: dhcp_iface= / dhcp_iface_addr=.

It can also be set in wpg.toml:

[dhcp]
enabled = true
iface = "ens3"

With an empty iface, the screen offers the interfaces in tx.allowed_ifaces.

The screen

Status

The interface, the DHCPv4 server identifier, the DHCPv6 server DUID, the addresses wpg added, and packet counters. “Save and start” in the header saves the settings and starts the server (restarts it when running); “Stop” stops it. A server running when wpg stops starts again with wpg.

Settings

Interface addresses (static IP): addresses such as 192.168.100.1/24, 2001:db8:1::1/64 are added to the interface when the server starts (the link is brought up too) and the ones wpg added are removed when it stops. Use --dhcp-iface-addr at deploy time for addresses that survive a reboot. The first IPv4 address becomes the DHCPv4 server identifier (the “server identifier” field overrides it).

DHCPv4: range start / end, subnet mask, lease time (T1 / T2 are 1/2 and 7/8 of it), routers, DNS servers, domain name, NTP servers. Lists are separated by commas or spaces. Reservations are one MAC IP per line (the address may be outside the range).

DHCPv6: “Addresses (IA_NA)” hands out one address of the range per IA; “Prefix delegation (IA_PD)” cuts the pool prefix (e.g. 2001:db8:100:: / 40) into prefixes of the delegated length (e.g. 56). Also the preferred and valid lifetimes (T1 / T2 are 1/2 and 4/5 of the preferred lifetime), DNS servers, domain search list, the ADVERTISE preference and Rapid Commit.

Router advertisements: hosts only use DHCPv6 when an RA sets the M flag (addresses) or the O flag (other configuration). Turn on “Send router advertisements” when no router on the link sends them. M is set when IA_NA is on, O always. An on-link prefix adds a Prefix Information option, with the A flag when “SLAAC” is checked. A router lifetime of 0 does not make wpg a default router.

Leases

Bound, offered and declined (DECLINE: reported in use) leases. Deleting one only removes wpg’s record (the client keeps the address until it renews). Expired leases disappear on their own.

Activity

Requests and replies (DISCOVER → OFFER, SOLICIT → ADVERTISE, RAs sent, …) and why nothing was sent (pool exhausted, another server selected, unknown server identifier), newest first.

Permissions

ActionNeeds
Listening on ports 67 / 547CAP_NET_BIND_SERVICE
Sending RAs (raw ICMPv6)CAP_NET_RAW
Adding interface addressesCAP_NET_ADMIN

The systemd service installed by deploy.sh has all of them (the bind-service.conf drop-in is added with --dhcp-iface or when an SNMP trap listener is configured). When running wpg by hand: sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/local/bin/wpg.

Limitations

  • Another DHCP server on the same link conflicts with wpg. Use it on test interfaces only.
  • DHCPv4 replies go to the relay when relayed, by unicast to renewing clients, and by broadcast otherwise.
  • DHCPv6 relay messages (RELAY-FORW) are not answered.
  • There are no static DHCPv6 assignments (DUID → address).

Crate layout

The repository is a Cargo workspace under crates/. User-facing strings live in locales/, sample templates in templates/, documentation in docs/ and the end-to-end tests in e2e/, all beside crates/.

The crates

CrateRolewasm32
wpg-coreProtocol definition IR, packet build/parse, field generators and lint diagnostics (diag::keys). OS-independent✓
wpg-protocolsBuilt-in protocol definitions (Ethernet through IS-IS / CLNP). A Rust macro compiles them to the wpg-core IR✓
wpg-i18nFluent-based i18n (ja / en / zh-CN / zh-TW / ko / de / fr / es); embeds locales/<lang>/main.ftl with include_str!✓
wpg-templateTemplate file format (.wpg.yaml / JSON), schema versioning and (de)serialisation
wpg-txTransmit backends (null, pcap, AF_PACKET, AF_XDP, DPDK) behind the TxBackend trait
wpg-rxReceive-side counters and simple verification (v1: minimal)
wpg-sysOS facts: network interfaces, privileges, kernel, hugepages, Npcap / libpcap detection, the doctor checks
wpg-logLogging setup: a tracing subscriber (pretty / JSON), rolling log files and a broadcast sink for live streaming
wpg-serveraxum HTTP / WebSocket server with the web UI embedded
wpg-cliThe command line itself (serve, send, render, import, template, doctor, …); builds the wpg binary
wpg-webLeptos (CSR) web UI, compiled to WASM with Trunk✓
dpdk-sysRaw FFI to DPDK (24.11 / 23.11 LTS), generated with bindgen; the inline fast path (rte_eth_tx_burst, rte_pktmbuf_alloc, …) and rte_errno are wrapped by a C shim (wpg_ prefix). Empty unless the link feature is on (enabled by wpg-tx’s dpdk). ADR-0004
wpg-testutilTest helpers: pcap / pcapng reader and writer, hex helpers, golden-file assertions (not published)

A further wpg-golden-tests crate holds the golden-pcap byte checks and the tshark cross-check (cargo test -p wpg-golden-tests).

The wasm32 constraint

wpg-core, wpg-protocols, wpg-i18n and wpg-web must also build for the browser (wasm32-unknown-unknown) for the web UI. Do not use file I/O, threads or OS-specific crates in these four. CI and just check-wasm enforce it with:

cargo check -p wpg-core -p wpg-protocols -p wpg-i18n --target wasm32-unknown-unknown

Transmission and OS facts (wpg-tx, wpg-sys) are native-only. When you add build/parse logic, first check whether it belongs in the OS-independent wpg-core.

Adding a protocol

Core protocols are defined with a Rust macro (crates/wpg-protocols/src/) and compile to the IR. From the IR the project generates building, parsing, the GUI editor and the reference docs. A new protocol needs a definition, Fluent strings, a sample template, a golden pcap and, where possible, a tshark cross-check. This keeps the cost of each added protocol constant.

Steps

  1. Define it. Add the protocol with the macro to the right module in crates/wpg-protocols/src/ (for example app.rs for an application-layer protocol) and register it in the catalog. Tag each field with a Fluent key via desc = "key". Before reaching for an approximation, check the building blocks below.
  2. Add Fluent strings. Add the protocol name and every field’s desc key to every language’s locales/*/main.ftl (see Adding i18n strings).
  3. Add a sample template. Put one or more .wpg.yaml files under templates/protocols/<group>/, with ja / en descriptions and protocol: / layer: tags. The samples.rs tests check that every protocol has a sample and that well-formed samples parse back to the same stack.
  4. Regenerate the golden files. Rebuild tests/golden/*.hex / *.pcap with just golden-update and review the diff. Never edit the .hex / .pcap by hand.
  5. Cross-check. If tshark is available, compare against Wireshark with WPG_TSHARK=1 cargo test -p wpg-golden-tests -- --ignored.
  6. Update the notes. When approximations remain or the encapsulation is unusual, add matching ja / en notes under docs/{ja,en}/src/protocols/.
  7. Regenerate the reference. Rebuild the protocol reference and the other generated pages with just docs-gen and commit them (see “Reference docs” below).
  8. Pass the pre-push checks (CLAUDE.md).
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --no-fail-fast
cargo check -p wpg-core -p wpg-protocols -p wpg-i18n --target wasm32-unknown-unknown

Building blocks

Before falling back to an approximation (opaque octets or a Manual value), check whether one of these covers the case.

NeedBuilding blockExample
Element count fieldauto = count(list_field) (also inside list elements and TLV values; count(list_field, adjust = -1) gives the index of the last element)IGMPv3 num_group_records, VRRP count_ip_addrs, SRH last_entry
Checksum that skips a fieldauto = checksum(kind, coverage, exclude = [field])OSPFv2 authentication, LSA ls_age
Octet size of a later variable fieldauto = size(field) (also inside list elements and TLV values)IS-IS sub-TLV lengths
Prefix of ceil(bits / 8) octetsbytes(from = len, adjust = 7, div = 8) (Length::FromField { div })IS-IS extended IP / IPv6 reachability
List of N variable-size elementsLength::Count { field }IS-IS optional sub-TLV block (S bit)
Region ending at a header length field, after variable-size fieldsLength::UntilOffset { field, unit, adjust } (ends at field * unit + adjust)CLNP / ES-IS options up to the length indicator, SRH TLVs (hdr_ext_len * 8 + 8), GTPv2-C IEs (length from octet 5: adjust = 4), RTCP (words minus one: unit = 4, adjust = 4)
Region up to a trailer of N octetsLength::ToEndExcept { octets }MACsec secure data before the ICV
Text / list ended by a terminatorLength::Until { terminator } (bytes: up to the terminator, which is not in the value; list: until an element would start with it)SIP CRLF lines and the empty line, RTCP SDES items ended by a null octet
TLV value octets between the type and the lengthTlvDef::head_octetsSCTP chunk flags
TLV items padded to a multiple of N octets, padding outside the lengthTlvDef::align (unpadded_last: the enclosing item pads the last one)SCTP chunks, parameters and error causes
TLV items of one type whose layout depends on the valueTlvVariant::when_value_starts / when_value_len (variants sharing a type; one without a discriminator is the fallback)BGP MP_REACH_NLRI per AFI / SAFI, OSPF SR SIDs of 3 or 4 octets, EVPN IPv4 / IPv6 IP Prefix routes
TLV items with the length before the typeTlvDef::len_first (not with head_octets / long_length)RSVP objects (length, Class-Num, C-Type)
TLV value octets after the length that it does not countTlvDef::uncounted_octets (only with a length without the header)GTPv2-C IE spare / instance octet
TLV list closed by an End item, followed by paddingLength::UntilTlv { type_value } (tlv fields only)CFM and 802.3ah OAM TLVs (End TLV 0)
A type flag that widens the TLV lengthTlvDef::long_length (TlvLongLength { flag, len_bits }, set automatically when the value is too long)BGP Extended Length path attributes
Pad to a requested PDU size with filler TLVsTlvDef::fill (TlvFill { variant, until })IS-IS Hello Padding TLVs
NUL-terminated stringcstring typeTFTP filename / mode
OSI address with length indicatornsap type (length octet is automatic)CLNP / ES-IS / IS-IS NSAP / NET
Demux on the source port tooBinding::alt_fieldUDP / TCP src_port
Demux on the first payload bitsBinding::peek (Peek { on, bits, table }; skipping(n) skips n bits before reading)MPLS, GTP-U, OSI (NLPID), IPv6 routing type (skip = 16)
Routing header that changes the destination of upper-layer checksumsProtocolDef::final_destination (FinalDestination { list, when }: element 0 of list becomes the pseudo-header destination while when is non-zero)SRv6 SRH
Messages that differ only in lengthBindingEntry::with_min_lenIGMPv3 / MLDv2 queries
Same number, different layoutBindingEntry::reparsingVRRPv2/v3, HSRPv1/v2, TFTP

The evaluation order is described under “次プロトコルの選択 (demux)” in the specification, docs/spec/02-packet-builder.md.

Reference docs

The protocol reference is generated from the definitions: run just docs-gen (cargo run -p wpg-cli -- docs gen) and commit the result. New protocols, fields, bindings and sample templates are picked up automatically; the field descriptions come from the desc = "..." Fluent keys (ja / en). Hand-written notes go in docs/{ja,en}/src/protocols/: mention the protocol ids in backticks (`isis_l1_lsp`) and the generator links them both ways. The test generated_docs_are_up_to_date (wpg-cli) fails while the committed pages are stale.

Adding i18n strings

User-facing text — in the server, the CLI and the web UI, error messages included — is never hard-coded; it is a Fluent key. Strings are handled by the wpg-i18n crate, which embeds the Fluent files locales/<lang>/main.ftl with include_str! (no file I/O, so it builds for the browser). Eight languages are supported: Japanese (ja), English (en), Simplified Chinese (zh-CN), Traditional Chinese (zh-TW), Korean (ko), German (de), French (fr) and Spanish (es).

The manual (mdBook), the references generated by wpg docs gen and the descriptions of the bundled templates (meta.descriptions) exist in Japanese and English only. When a template has no description in the UI language, the English one is shown.

Add a key

  1. Add one line with the same key to every locales/*/main.ftl (all eight languages). English is the base and the fallback. Keep placeholders ({ $name }) and backquoted code and ids untranslated.

    # locales/en/main.ftl
    send-done = Sent { $packets } packets in { $elapsed }
    
    # locales/ja/main.ftl
    send-done = { $packets } パケットを { $elapsed } で送信しました
    
    # locales/de/main.ftl (likewise zh-CN / zh-TW / ko / fr / es)
    send-done = { $packets } Pakete in { $elapsed } gesendet
    
  2. Reference it from code: t when there are no arguments, t_args when there are.

    #![allow(unused)]
    fn main() {
    use wpg_i18n::{t, t_args, FluentArgs, Locale};
    
    let s = t(locale, "error-not-found");
    
    let mut args = FluentArgs::new();
    args.set("packets", 1022);
    args.set("elapsed", "0.5s");
    let s = t_args(locale, "send-done", &args);
    }

A missing key falls back to English, then to the key name itself. The { $name } placeholder names are a contract with the caller — do not rename them in a translation.

Keep the key sets equal

The .ftl files of all languages must hold the same set of keys. A wpg-i18n unit test checks this and fails if a language lacks a key or has a key English does not have.

cargo test -p wpg-i18n

This is the “i18n parity lint” of the specification (docs/spec/11-risks.md); there is no separate wpg subcommand for it. The same test run also checks that every field-description key of the protocol catalog exists, and that no key is dead (no_unused_keys: a key that no source file mentions must be removed; keys built at run time from a prefix, docgen-* and rtcp-*, are exempt). In CI it runs as part of cargo test --workspace; the GUI end-to-end tests (just e2e, e2e/README.md) additionally switch the language in the browser.

Protocol names and field descriptions

The desc = "key" attached to a field in a protocol definition (wpg-protocols) is a Fluent key. When you add a protocol, add its desc keys to the .ftl files of every language (see “Adding a protocol” in CONTRIBUTING.md and Adding a protocol).

#![allow(unused)]
fn main() {
// crates/wpg-protocols/src/app.rs
op: enum(8) { 1 => boot_request, 2 => boot_reply } = 1, desc = "dhcp-op";
}
# locales/*/main.ftl
dhcp-op = ...

Diagnostic (diag-*) and lint (lint-*) messages work the same way. Their argument names ({ $field } and so on) are a contract with wpg-core’s diag::keys.

Add a language

  1. Create locales/<tag>/main.ftl and translate every key (<tag> is a BCP 47 language tag, e.g. pt-BR).
  2. Add a variant to wpg-i18n’s Locale and add it to Locale::ALL, as_str(), source() and from_langid (detection from Accept-Language or LANG); see the doc comment in crates/wpg-i18n/src/lib.rs.
  3. Add the language-name key ui-lang-<tag> (the language’s name in itself, e.g. ui-lang-pt-br = Português (Brasil)) to every .ftl, and map it in locale_label_key in crates/wpg-web/src/i18n.rs. The language menus of the header and of the settings page list it automatically.
  4. Run cargo test -p wpg-i18n -p wpg-web to confirm no key is missing.

The language is picked from the saved preference, else the browser’s navigator.languages in the web UI; from Accept-Language in the API; and from LC_ALL / LC_MESSAGES / LANG in the CLI. Chinese is split by script and region: zh-Hant, zh-TW, zh-HK and zh-MO give Traditional Chinese, any other zh Simplified Chinese. Unsupported languages get English.

Release process

Versioning

The workspace has a single version ([workspace.package] version in Cargo.toml; each crate uses version.workspace = true). It follows Semantic Versioning; breaking changes are possible until v1.0.

Release gates

Before tagging, make sure all of the following are green. On top of the usual pre-push checks (CLAUDE.md) there are protocol, security and documentation gates.

# Pre-push checks
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --no-fail-fast
cargo check -p wpg-core -p wpg-protocols -p wpg-i18n --target wasm32-unknown-unknown

# Protocols (golden pcaps and the tshark cross-check)
cargo test -p wpg-golden-tests
WPG_TSHARK=1 cargo test -p wpg-golden-tests -- --ignored

# Security (just audit / just deny)
cargo audit
cargo deny check

The v1.0 release gate (ROADMAP.md, M12) additionally requires:

  • All P0 + P1 protocol golden pcaps and tshark cross-checks green.
  • Build, start and pcap-backend transmission confirmed on all three OSes.
  • The web UI end-to-end tests (just e2e) green, and zero i18n gaps in every language (cargo test -p wpg-i18n).
  • The screenshots and the builder GIF in docs/{ja,en}/src/images/ regenerated with just screenshots when the UI changed (review them before committing).
  • Documentation complete in ja and en, with docs/build.sh passing.
  • CHANGELOG.md updated.

Steps

  1. Pass every gate above.
  2. Move the Unreleased entries of CHANGELOG.md into a section for the new version (## [X.Y.Z] - YYYY-MM-DD), adding anything since the last tag from the Conventional Commits. Call out upgrade notes (template schema, database or configuration changes, see Upgrading).
  3. Bump the workspace version in Cargo.toml (also the version of the internal wpg-* entries in [workspace.dependencies]) and update Cargo.lock (cargo check).
  4. Commit as release: vX.Y.Z and create an annotated tag vX.Y.Z (git tag -a vX.Y.Z -m "wpg X.Y.Z").
  5. Push the tag (git push origin vX.Y.Z). .github/workflows/release.yml builds the archives, writes SHA256SUMS and creates the GitHub Release with generated notes; edit the notes afterwards. Tags with a hyphen (v1.0.0-rc.1) become pre-releases. scripts/release.sh fails when the tag does not match the workspace version.

A manual run of the workflow (workflow_dispatch), or a pull request that touches the packaging (scripts/release.sh, scripts/smoke-archive.sh, scripts/build.ps1, packaging/, the Docker files, the workflow itself, or the Npcap loading code), builds and tests the archives and keeps them as workflow artifacts without publishing anything; use it to test the pipeline.

Binary distribution

Releases are built by .github/workflows/release.yml. Each target is built on its own runner by scripts/release.sh and checked by scripts/smoke-archive.sh; further jobs test the archives on their OS (below), and a final job publishes a GitHub Release with all archives and a SHA256SUMS file once every other job has passed. The release builds use a pinned trunk version (set in the workflow), so re-running a tag builds the same web UI.

Targets

ArchiveRunnerFeaturesNotes
wpg-<ver>-x86_64-unknown-linux-gnu.tar.gzubuntu-22.04(none)Built against glibc 2.35, so it runs on Ubuntu 22.04 / Debian 12 and newer. Sends with afpacket, so no libpcap is needed
wpg-<ver>-aarch64-apple-darwin.tar.gzmacos-14pcapApple silicon. libpcap ships with macOS
wpg-<ver>-x86_64-apple-darwin.tar.gzmacos-14 (cross)pcapIntel Macs
wpg-<ver>-x86_64-pc-windows-msvc.zipwindows-latestpcapStarts without Npcap; sending needs Npcap

Each archive holds wpg / wpg.exe (with the web UI embedded), README.md, README.ja.md, CHANGELOG.md, both licences, templates/ and packaging/ (systemd, launchd and Windows service samples). macOS and Windows can only send through libpcap / Npcap, so those binaries are built with the pcap feature. For Windows, release.sh downloads the Npcap SDK (version and SHA-256 pinned in the script, cached under target/) to link wpcap.lib; the SDK is not shipped. wpg.exe delay-loads wpcap.dll (crates/wpg-cli/build.rs), so it starts, and wpg doctor runs, on machines without Npcap. The binaries are not signed or notarised; see the macOS and Windows install pages for what users have to do.

What CI checks

JobChecks
build (<target>)scripts/smoke-archive.sh: the .sha256 file, the archive contents, wpg --version, wpg doctor --json, wpg render, and wpg serve answering /api/health with the embedded UI (contents only for the cross-built Intel macOS archive)
macOS (launchd, pcap)Installs the Apple silicon archive and the launchd daemon as in Running as a service, checks /api/health, removes it; then sends 16 frames with --backend pcap on a feth pair and receives them with wpg capture --backend pcap
Windows (scheduled task, no Npcap)wpg doctor fails the npcap check, wpg send --backend pcap stops with the “Npcap is not installed” message instead of crashing, and packaging\windows\wpg-service.ps1 installs, starts (checked through /api/health), stops and removes the task, with C:\ProgramData\wpg and wpg.toml not readable by BUILTIN\Users
Windows (build.ps1)scripts\build.ps1 with the Npcap SDK in C:\Npcap-SDK (so it adds pcap), then runs the result
Docker (compose)docker compose up --build --wait, /api/health and wpg doctor in the container

Npcap cannot be installed unattended on the runners (silent installation is limited to the OEM edition), so sending through Npcap is not covered by CI; check it by hand on a Windows machine before a release.

Building an archive locally

scripts/release.sh                                    # host target, into dist/
scripts/release.sh --target x86_64-apple-darwin       # cross target (needs its linker / SDK)
scripts/release.sh --skip-frontend --features pcap    # reuse crates/wpg-web/dist
scripts/smoke-archive.sh dist/wpg-*.tar.gz            # or: just smoke-archive <archive>
scripts/release.sh --checksums dist                   # SHA256SUMS of everything in dist/

It needs trunk (cargo install trunk --locked) unless --skip-frontend is given, and refuses to package without crates/wpg-web/dist/index.html so no release ships without the web UI. On Windows run it from Git Bash (it uses 7z or zip).

Why not cargo-dist

The roadmap planned cargo-dist. The pipeline uses a small script instead because wpg needs the Trunk front-end build before cargo build (the UI is embedded by rust-embed), and the archives carry templates and service files beside the binary. cargo-dist can do both through custom build-setup steps and include, but its generated workflow has to be regenerated whenever cargo-dist is upgraded. release.sh is the same script locally and in CI. Installers (shell / PowerShell / Homebrew / MSI) are not produced; revisit cargo-dist if they are wanted.

Signing

Not done yet. macOS users have to remove the quarantine attribute (Install on macOS); Windows SmartScreen may warn about the unknown publisher (Install on Windows). Signing and notarisation need an Apple Developer ID and a code-signing certificate, which the project does not have.

FAQ and troubleshooting

When something goes wrong, run wpg doctor first. It diagnoses privileges, interfaces, the kernel, hugepages and Npcap / libpcap one line at a time, and prints OS-specific fix commands. wpg doctor --json returns the same for scripts, and the exit status is non-zero when a check fails.

The wpg doctor checks

Check idState when unmetMeaning and fix
caps.raw_socketfail (Windows: per Npcap admin-only mode)Raw-socket privilege: CAP_NET_RAW / root on Linux, BPF access on macOS, an elevated terminal on Windows only when Npcap is in administrator-only mode. See Permissions
iface.any_upwarnA non-loopback interface is up with carrier. Check the cable / link
kernel.af_xdpwarnKernel 5.10+ for the AF_XDP backend
kernel.tpacket_v3warnKernel 3.2+; without it afpacket falls back to sendmmsg
hugepageswarnHugepages configured; needed only for the DPDK backend
npcapfail / warn (Windows only)Npcap installed and wpcap.dll present (System32\Npcap or System32); skipped on other OSes
backend.pcapfail (Windows, macOS)This wpg was built with the pcap backend (pcap feature), the only way to send on Windows and macOS. On Windows a build without the Npcap SDK fails here: unpack the SDK to C:\Npcap-SDK and run scripts\build.ps1 again (see Install on Windows); on macOS run scripts/build.sh again. Skipped on Linux
pcap_libwarnlibpcap found (needed for the pcap backend); skipped on Windows and when the backend is not built in
webui.embeddedwarnThe web UI was built before wpg; otherwise wpg serve shows a placeholder page. Run scripts/build.sh (scripts\build.ps1 on Windows) again

Each result is ok, warn, fail or skip (not applicable on this OS).

Common questions

Transmission is refused with “permission denied”

Raw-socket transmission needs privilege. Run wpg doctor and apply the command it prints on the caps.raw_socket line (on Linux, something like sudo setcap cap_net_raw,cap_net_admin+ep $(command -v wpg)). A file capability is lost when the binary is replaced. See Permissions.

The rate falls short of the target

  • When average is below the target and dropped is large, the backend cannot keep up. Try raising --burst, using --qdisc-bypass with afpacket, or adding --workers (one worker per core). See Performance tuning.
  • --rate 50% needs a real interface whose link speed is known. On lo it reports Cannot determine the link speed. Give an absolute rate such as 1Gbps.
  • unlimited on the null backend measures how fast frames are built, not a network figure.

I want to check without transmitting

Dry-run with --backend null (build and count only) or --backend pcapfile -i out.pcapng (write to a file). wpg render FILE -o out.pcapng also writes a pcapng without transmitting.

I want to catch template errors before sending

wpg template lint FILE reports unknown fields, out-of-range values, malformed generators and length / checksum mismatches. Deliberately broken templates (templates/malformed/) stay at the warning level (diag-*) and can still be sent.

Is an imported template identical to the original capture?

The wpg import → wpg render round-trip matches byte for byte (timestamps differ, since wpg assigns its own). Confirm with diff <(tshark -r a.pcapng -x) <(tshark -r b.pcapng -x).

I want to verify in Wireshark

The tshark cross-check of the golden pcaps is WPG_TSHARK=1 cargo test -p wpg-golden-tests -- --ignored. For your own capture, tshark -r out.pcapng -V shows, for instance, that checksums read [correct].

User-facing text is still in English

The language is set by the settings screen in the GUI, by the LANG / LC_MESSAGES / LC_ALL environment variables (POSIX precedence) for the CLI, and by the Accept-Language header for the API. Untranslated strings fall back to English. To add keys, see Adding i18n strings.

If your problem is not here, report it in an issue with the output of wpg doctor --json. Entries are added as issues come in.

Legal notice

Responsible use

wpg is a tool for verifying and testing networks. Use it only against networks you own, or that you have explicit authorization to test.

The tool sends arbitrary frames statelessly and at high speed, and can generate traffic that disrupts a live network — ARP / ND sweeps, SYN / MAC floods, malformed frames. Directing such traffic at networks or devices you do not control, without authorization, is illegal in many jurisdictions. You are solely responsible for how you use it.

  • Always dry-run a new template with a non-transmitting backend (--backend null, or pcapfile with -i out.pcapng) before sending it.
  • Test in a lab isolated from production networks (a virtual environment such as CML2 is useful; see CML2 notes).
  • The administrator settings [tx] max_rate and allowed_ifaces can cap the usable rate and interfaces (Configuration).

Changes intended to turn wpg into an attack tool are not accepted (see “Responsible use” in CONTRIBUTING.md).

License

This software is dual-licensed under MIT or Apache-2.0, at your option. Contributions are, unless stated otherwise, taken to be offered under the same dual license (Developer Certificate of Origin; sign off with git commit -s).

Third-party components

Dependency crates keep their own licenses. The set and the license policy are checked with cargo deny check (deny.toml).

The web terminal page bundles xterm.js and its fit / web-links / search add-ons (all MIT licensed). The copyright notices and license text are in crates/wpg-web/vendor/xterm/LICENSE and are served by wpg as /xterm/LICENSE.

Npcap, used for transmission on Windows, is not bundled with this software; you obtain it from npcap.com and install it under its own terms. Redistribution may require a separate license.

Disclaimer

The software is provided “as is”, without warranty of any kind, express or implied, as set out in the MIT / Apache-2.0 licenses.