diff options
Diffstat (limited to 'wireshark/pcmeta.lua')
-rw-r--r-- | wireshark/pcmeta.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/wireshark/pcmeta.lua b/wireshark/pcmeta.lua index 0541823..5d35ab4 100644 --- a/wireshark/pcmeta.lua +++ b/wireshark/pcmeta.lua @@ -2,7 +2,7 @@ require "util" local p = Proto("pcmeta", "PictoChat Meta") -local pictochat_dissector = Dissector.get("pictochat") +local message_dissector = Dissector.get("pcmsg") function p.init() local dt = DissectorTable.get("dslmp") @@ -173,12 +173,14 @@ function p.dissector(buffer, pinfo, tree) end -- prefix info field with message ID - pinfo.cols.info = string.format("[%08x] %s", pc_global.pid_mid_map[pinfo.number] or 0, pinfo.cols.info) + local mid = pc_global.pid_mid_map[pinfo.number] or 0 + pinfo.cols.info = string.format("[%08x] %s", mid, pinfo.cols.info) - local reassembly = pc_global.msg[pc_global.pid_mid_map[pinfo.number]] + -- add reassembly to current frame if current frame is part of the complete message + local reassembly = pc_global.msg[mid] if reassembly ~= nil then - local tvb = ByteArray.tvb(reassembly, "Reassembly") - pictochat_dissector:call(tvb, pinfo, tree) + local tvb = ByteArray.tvb(reassembly, string.format("msg %08x", mid)) + message_dissector:call(tvb, pinfo, tree) end return buffer_len |