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

local ffxiv_ipc_server_notice_short = Proto("ffxiv_ipc_server_notice_short", "FFXIV-IPC Server Notice Short")

local server_notice_short_fields = {
  padding = ProtoField.uint8("ffxiv_ipc_server_notice_short.padding", "padding", base.DEC),
  content = ProtoField.string("ffxiv_ipc_server_notice_short.content", "Content", base.UNICODE),
}

ffxiv_ipc_server_notice_short.fields = server_notice_short_fields

function ffxiv_ipc_server_notice_short.dissector(tvbuf, pktinfo, root)
  local tree = root:add(ffxiv_ipc_server_notice_short, tvbuf)
  pktinfo.cols.info:set("Server Notice Short")

  local len = tvbuf:len()

  -- dissect the padding field
  local padding_tvbr = tvbuf:range(0, 1)
  local padding_val  = padding_tvbr:le_uint()
  tree:add_le(server_notice_short_fields.padding, padding_tvbr, padding_val)

  -- dissect the content field
  if tvbuf:len() >= 1 then
    local content_tvbr = tvbuf:range(1)
    local content_val  = content_tvbr:string(ENC_UTF_8)
    tree:add(server_notice_short_fields.content, content_tvbr, content_val)
  end

  return len
end