On Wed, Mar 6, 2013 at 7:02 AM, Cristian Constantin <
[email protected]> wrote:
> hi!
>
> some protocols are structured in chunks which have the same structure
> but differ in content.
>
> examples:
>
> - diameter (avps)
> - sigtran suite (parameters)
> - sctp (data chunks)
>
> how to access with lua a certain field in such a chunk? NOT necessarly
> the first.
>
> for example, using:
>
> local param_len = Field.new("m3ua.parameter_length")
>
> and later on in the tap.packet():
>
> local len = param_len()
>
> will get me only the length of whatever is the first m3ua parameter. how
> to get the length of the second, third aso??
>
>
Try this Lua:
function tap.packet()
local lengths = { param_len() }
for i,len in ipairs( lengths ) do
print( '['..i..']', len )
end
end
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <[email protected]>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:[email protected]?subject=unsubscribe