Skip to content

Commit

Permalink
wireshark/lwp3_dissector: implement parse_fw_boot_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dlech committed Sep 6, 2021
1 parent 7799ec5 commit f8c46b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wireshark/lwp3_dissector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ lwp3_proto.fields.hub_io_sw_ver = ProtoField.string("lwp3.hub_io.sw_ver", "Softw
lwp3_proto.fields.hub_io_port_id_a = ProtoField.uint8("lwp3.hub_io.port_id_a", "Port ID A", base.HEX)
lwp3_proto.fields.hub_io_port_id_b = ProtoField.uint8("lwp3.hub_io.port_id_b", "Port ID B", base.HEX)

-- Firmware commands
lwp3_proto.fields.safety_string = ProtoField.string("lwp3.safety_string", "Safety String")

-- Port commands
lwp3_proto.fields.port_id = ProtoField.uint8("lwp3.port_id", "Port ID", base.DEC)
lwp3_proto.fields.port_mode = ProtoField.uint8("lwp3.port_mode", "Mode", base.DEC)
Expand Down Expand Up @@ -597,6 +600,11 @@ function parse_hub_attached_io(range, subtree)
end
end

-- Parses a Go Into Boot Mode (0x10) message
function parse_fw_boot_mode(range, subtree)
parse_string(range, 0, subtree, lwp3_proto.fields.safety_string)
end

-- Parses a Port Information Request (0x21) message
function parse_port_info_req(range, subtree)
parse_port_id(range, 0, subtree, lwp3_proto.fields.port_id)
Expand Down

0 comments on commit f8c46b7

Please sign in to comment.