-- This file is generated by tools/json2lua.js

local ffxiv_ipc_ping = Proto("ffxiv_ipc_ping", "FFXIV-IPC Ping")

local ping_fields = {
  sequence = ProtoField.uint32("ffxiv_ipc_ping.sequence", "Sequence", base.DEC),
  unknown  = ProtoField.uint32("ffxiv_ipc_ping.unknown", "Unknown", base.DEC),
}

ffxiv_ipc_ping.fields = ping_fields

function ffxiv_ipc_ping.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_ping, tvbuf)
  pktinfo.cols.info:set("Ping")

  local len = tvbuf:len()

  -- dissect the sequence field
  local sequence_tvbr = tvbuf:range(0, 4)
  local sequence_val  = sequence_tvbr:le_uint()
  tree:add_le(ping_fields.sequence, sequence_tvbr, sequence_val)

  -- dissect the unknown field
  local unknown_tvbr = tvbuf:range(4, 4)
  local unknown_val  = unknown_tvbr:le_uint()
  tree:add_le(ping_fields.unknown, unknown_tvbr, unknown_val)

  return len
end