Ask Your Question

Revision history [back]

WebSocket has support for a number of protocols running on top of it, and has dissector tables to allow registration of these protocols, (in decreasing order of preference):

  • Negotiated protocols, use table "ws.protocol", providing the negotiated protocol name.
  • TCP Port dissectors, use table "ws.port", providing the port.
  • Heuristic dissectors, use table "ws".

So, if MQTT over WebSocket isn't negotiated, but port-based, then I think you should use something like:

local mqtt_dissector = Dissector.get("mqtt")
local ws_dissector_table = DissectorTable.get("ws.port")
ws_dissector_table:add(8083, mqtt_dissector)