Hello, I'm writing a LUA dissector, and I have it basically working (the tree shows OK in Wireshark). Now I would like to add into the "Info" column some information that I have already parsed, and that I have already added to my tree. The problem is that I'm using some ProtoFields in order to extract information from the buffer and to populate my tree. Unfortunately I read that there is no way to use ProtoFields to extract information storing it into locals, and that the only purpose they can be used for is passing them to "add" (or "add_le" in my case) TreeItem's methods.. that is what I'm doing in fact.. (is this right?). For this reason, I'm wondering whether is there any method to extract information fields from the tree itself (after I got them added to the tree by using "add_le" and the protofield). Does it ? I know I could re-parse the buffer and re-extract information without using ProtoField in order to be able to store my information in locals, but indeed what I would like to do is exactly trying to avoid this "duplicated parsing"... Thanks Andrea asked 02 May '14, 06:27 Andrea edited 02 May '14, 11:48 Hadriel |
One Answer:
Not true - well... I should say that's not the whole story. A There is currently only one return value for the " This is in fact done in the tutorial dissector script - the script at the top of the wiki Lua examples page. If you download that script, you'll find there are four
Each of those are later used during dissection, to retrieve the field data previously parsed from " I should note that this is slowly changing in release 1.11.4: the " answered 02 May '14, 11:46 Hadriel |
Thank you for your reply! It seems a nice and clean method to do what I'd like to do. I like it :)
Unfortunately this is not suitable for me, as would like to target stable wireshark releases (1.10.7 right now).. As the comment in the example script suggests, it is not possible to create a Field for a just-registered ProtoField :(
Any workaround or other suggestion while waiting for code in 1.11 to become stable?
Thank you Andrea