This is our old Q&A Site. Please post any new questions and answers at

I have created the customise protocol in Lua and I want to display the subtree info on the same line of main tree ( which display the name of my customise protocol).

please find the code below and let me know what should I do .

function cus_proto.dissector(tvbuf, pktinfo, root)
    dprint2("cus_proto.dissector called")
    -- reset the save Tvbs
    tvbs = {}

    -- get the length of the packet buffer (Tvb).
    local pktlen = tvbuf:len()

    --local bytes_consumed = 0
    if pklen==0 then return end

    --create subtree for cus proto

    -- add protocol fields to subtree
    subtree:add(hdr_fields.msg_data_length, tvbuf(0,4))
    subtree:add(hdr_fields.msg_id, tvbuf(4,1))
    subtree:add(hdr_fields.msg_type, tvbuf(5,1))
    subtree:add(hdr_fields.msg_method_id, tvbuf(6,1))

asked 04 Dec '15, 03:41

Tony_2013's gravatar image

accept rate: 0%

edited 04 Dec '15, 03:50

grahamb's gravatar image

grahamb ♦

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Dec '15, 03:41

question was seen: 1,170 times

last updated: 04 Dec '15, 03:50

p​o​w​e​r​e​d by O​S​Q​A