Dissector: Put message info in Info column

This commit is contained in:
George Hilliard committed 2020-07-04 12:03:45 -05:00
1 parent 7d337c86cb
commit 085c59d355
1 file changed
+3
+3
View File
@@ -102,6 +102,7 @@ function bc_protocol.dissector(buffer, pinfo, tree)
end
-- bin_offset is either nil (no binary data) or nonzero
-- TODO: bin_offset is actually stateful!
local bin_offset = nil
if header_len == 24 then
bin_offset = buffer(20, 4):le_uint()
@@ -113,6 +114,8 @@ function bc_protocol.dissector(buffer, pinfo, tree)
local header = bc_subtree:add(bc_protocol, buffer(0, header_len),
"Baichuan Message Header, length: " .. header_len)
pinfo.cols['info'] = msg_type_str .. ", type " .. msg_type .. ", " .. msg_len .. " bytes"
header:add_le(magic_bytes, buffer(0, 4))
header:add_le(message_id, buffer(4, 4))
:append_text(" (" .. msg_type_str .. ")")