ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: [Wireshark-users] Lua, all_field_infos

Date: Mon, 20 Jun 2011 16:00:03 +0300
Hello,

I'm trying to get the protocol tree while in a listener packet function.
I managed to figure out how to use all_field_infos (with my minimal Lua
knowledge and lacking documentation of the function):

-- Get a table of fields
fields = { all_fields_infos() }

-- Print the name of every field
for i, field in ipairs(fields) do
    print("name: ", field.name)
end


Now, this works but it only returns the top layer of the protocol tree,
and I can't figure out how to get further into the tree.

I wasn't able to figure it about by looking at the wireshark source
code.


Since many posts I found online about this function were either
unanswered or dismissed somehow, I have to ask if this was even intended
to be useful.


Thanks


-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow