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

local ffxiv_ipc_fellowship_message_board_query = Proto("ffxiv_ipc_fellowship_message_board_query", "FFXIV-IPC FellowshipMessageBoardQuery")

local fellowship_message_board_query_fields = {
  id1      = ProtoField.uint32("ffxiv_ipc_fellowship_message_board_query.id1", "ID1", base.DEC),
  id2      = ProtoField.uint32("ffxiv_ipc_fellowship_message_board_query.id2", "ID2", base.DEC),
  unknown1 = ProtoField.uint32("ffxiv_ipc_fellowship_message_board_query.unknown1", "Unknown1", base.DEC),
  offset   = ProtoField.uint16("ffxiv_ipc_fellowship_message_board_query.offset", "Offset", base.DEC),
  unknown2 = ProtoField.uint16("ffxiv_ipc_fellowship_message_board_query.unknown2", "Unknown2", base.DEC),
}

ffxiv_ipc_fellowship_message_board_query.fields = fellowship_message_board_query_fields

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

  local len = tvbuf:len()

  -- dissect the id1 field
  local id1_tvbr = tvbuf:range(0, 4)
  local id1_val  = id1_tvbr:le_uint()
  tree:add_le(fellowship_message_board_query_fields.id1, id1_tvbr, id1_val)

  -- dissect the id2 field
  local id2_tvbr = tvbuf:range(4, 4)
  local id2_val  = id2_tvbr:le_uint()
  tree:add_le(fellowship_message_board_query_fields.id2, id2_tvbr, id2_val)

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

  -- dissect the offset field
  local offset_tvbr = tvbuf:range(12, 2)
  local offset_val  = offset_tvbr:le_uint()
  tree:add_le(fellowship_message_board_query_fields.offset, offset_tvbr, offset_val)

  -- dissect the unknown2 field
  local unknown2_tvbr = tvbuf:range(14, 2)
  local unknown2_val  = unknown2_tvbr:le_uint()
  tree:add_le(fellowship_message_board_query_fields.unknown2, unknown2_tvbr, unknown2_val)

  return len
end