Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi,

I think your problem lies in

local subtree = tree:add(bgNotificationData, btMsgData, "Message Data")

Let me explain:

bgNotificationData is the proto

msgData * is a field extractor which gets called and its actual data is then transferred into *btMsgData

Now, thing is like this, when you call TreeItem:add, your 1st arg is a Proto. This means that 2nd arg is either a tvb range, or a value.

If the 2nd arg is a tvb range, then the 3rd one is the value (if given)

If the 2nd arg is not a tvb range, then it is automatically the value of the field.

In your code, since the 2nd arg is not a tvb range, but a value from the field extractor, that's actually the value of the field, rendering the 3rd argument useless.

You might want to try something like

local subtree = tree:add(bgNotificationData,tvb:range([offset],[length]),tostring(btMsgData)):append_text("Message Data")

or something similar

Then, you can

subtree:add(rawMessage,tostring(btMsgData))

Hi,

I think your problem lies in

local subtree = tree:add(bgNotificationData, btMsgData, "Message Data")

Let me explain:

bgNotificationData is the proto

msgData * msgData is a field extractor which gets called and its actual data is then transferred into *btMsgDatabtMsgData

Now, thing is like this, when you call TreeItem:add, your 1st arg is a Proto. This means that 2nd arg is either a tvb range, or a value.

If the 2nd arg is a tvb range, then the 3rd one is the value (if given)

If the 2nd arg is not a tvb range, then it is automatically the value of the field.

In your code, since the 2nd arg is not a tvb range, but a value from the field extractor, that's actually the value of the field, rendering the 3rd argument useless.

You might want to try something like

local subtree = tree:add(bgNotificationData,tvb:range([offset],[length]),tostring(btMsgData)):append_text("Message Data")

or something similar

Then, you can

subtree:add(rawMessage,tostring(btMsgData))