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

local ffxiv_ipc_inventory_action_ack = Proto("ffxiv_ipc_inventory_action_ack", "FFXIV-IPC Inventory Action Ack")

local inventory_action_ack_fields = {
  sequence = ProtoField.uint32("ffxiv_ipc_inventory_action_ack.sequence", "Sequence", base.DEC),
  type     = ProtoField.uint32("ffxiv_ipc_inventory_action_ack.type", "Type", base.DEC),
  unknown1 = ProtoField.uint32("ffxiv_ipc_inventory_action_ack.unknown1", "Unknown1", base.DEC),
  unknown2 = ProtoField.uint32("ffxiv_ipc_inventory_action_ack.unknown2", "Unknown2", base.DEC),
}

ffxiv_ipc_inventory_action_ack.fields = inventory_action_ack_fields

function ffxiv_ipc_inventory_action_ack.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_inventory_action_ack, tvbuf)
  pktinfo.cols.info:set("Inventory Action Ack")

  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(inventory_action_ack_fields.sequence, sequence_tvbr, sequence_val)

  -- dissect the type field
  local type_tvbr = tvbuf:range(4, 4)
  local type_val  = type_tvbr:le_uint()
  tree:add_le(inventory_action_ack_fields.type, type_tvbr, type_val)

  -- dissect the unknown1 field
  local unknown1_tvbr = tvbuf:range(8, 4)
  local unknown1_val  = unknown1_tvbr:le_uint()
  tree:add_le(inventory_action_ack_fields.unknown1, unknown1_tvbr, unknown1_val)

  -- dissect the unknown2 field
  local unknown2_tvbr = tvbuf:range(12, 4)
  local unknown2_val  = unknown2_tvbr:le_uint()
  tree:add_le(inventory_action_ack_fields.unknown2, unknown2_tvbr, unknown2_val)

  return len
end