Wireshark-dev: Re: [Wireshark-dev] problem in adding message in wireshark tree
From: Stig Bjørlykke <[email protected]>
Date: Wed, 28 Oct 2009 22:14:22 +0100
On 28. okt. 2009, at 18.15, Beth wrote:

I just installed 1.2.3, and I'm seeing the same problem. My 1.3.x install works fine.
Do you have a sample lua script to show this?  I'm using the following  
test script, which works as expected in version 1.2.3.  I think we may  
have an issue with the new packet list in 1.3.x, because this script  
does not work correctly in 1.3.x when building with the new packet  
list.  The old packet list still works.

udp_len_f = Field.new("udp.length")
test_proto = Proto ("test", "Test Protocol")

function test_proto.dissector (buffer, pinfo, tree)
  pinfo.cols.info = "Test"

  local udp_len = udp_len_f()
  if udp_len then
    pinfo.cols.info = "UDP length: " .. udp_len.value
  end
end

register_postdissector(test_proto)


--
Stig Bjørlykke