Wireshark-users: Re: [Wireshark-users] Using Lua Field Extractors
Date: Sun, 29 Nov 2009 12:27:56 +0000
Hi,
Field extractor returns table of messges if there's more then one,
but you have to assign table to your variable rather than first
element so it should look something like:


local isup_messages  = { isup_extractor() }

for i, isup_single_msg in ipairs(isup_messages)
do
   -- process your single isup message here
end



regards
m





On Sun, Nov 22, 2009 at 12:22 AM, Markus Pilz <markus@xxxxxxxxx> wrote:
> Hi all,
>
> I am using a Lua to obtain data from an SCTP stream. In this scenario, a
> single SCTP packet can contain the same field type multiple times.
> Although Wireshark displays this correctly, I don't know how to access
> these fields via Lua.
>
> Example packet figure:
> ...[SCTP [M3UA [ ISUP ] ] [ M3UA [ ISUP 2 ] ] ]...
>
> A field extractor only gets the info from the first M3UA/ISUP part. Even
> if the listener is set to M3UA or ISUP packets (local tap =
> Listener.new( "isup" )).
>
> Is there a way to extract a list of all fields (from the same type) via Lua?
>
> Best Regards
> Markus
>
> P.S.: This is maybe is Wireshark+Lua newbie question.
>
> ___________________________________________________________________________
> Sent via:    Wireshark-users mailing list <wireshark-users@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-users
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
>             mailto:wireshark-users-request@xxxxxxxxxxxxx?subject=unsubscribe
>