wireshark_dissector
Generate a Wireshark Lua dissector for an inferred USB protocol, labeling commands, decoding values and checksums, and flagging checksum errors in packet captures.
Instructions
Generate a Wireshark Lua dissector for the inferred protocol.
Read-only: returns Lua source as text. Labels commands, decodes values/counters/lookups,
and verifies checksums (usbrea.checksum_ok + expert warning). Load with
wireshark -X lua_script:<file>.lua capture.pcapng or the same flag on tshark. Prefer
scaffold_driver for a pyusb driver; prefer hid_descriptor to inspect HID report layouts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"capture": "<capture>"
},
"name": "wireshark_dissector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Wireshark protocol/filter prefix (fields become <name>.command, <name>.checksum_ok, …) | usbrea |
| device | No | USB device address to analyse; default = bus address with the most host→device payloads | |
| labels | No | Marker-free mode: ';'-separated labels in click order, or a text file path (one label per line) | |
| capture | Yes | Path to a usbmon or USBPcap pcap/pcapng file | |
| markers | No | Markers JSON path; default <capture>.actions.json. Ignored when labels is set |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |