THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.

Revision history  [back]

Wireshark LUA use field from previous/lower dissector

I have written an custom LUA dissector for ERSPAN. But to apply different header based on the ERSPAN Type indicated by gre.proto field in GRE header, I would like to use the value of gre.proto field in my dissector.

I have already searched and saw methods using post dissector but I am doing something wrong and it is not working for me.

So I would like to have something like this within my custom dissector:

if greprotocolversion == 0x22eb then

...
...

elseif gregreprotocolversion == 0x88be then

..
..

end

What would be the most simple method to accomplish this? Thank you.

Wireshark LUA use field from previous/lower dissector

I have written an custom LUA dissector for ERSPAN. But to apply different header based on the ERSPAN Type indicated by gre.proto field in GRE header, I would like to use the value of gre.proto field in my dissector.

I have already searched and saw methods using post dissector but I am doing something wrong and it is not working for me.

So I would like to have something like this within my custom dissector:

if greprotocolversion == 0x22eb then then

... ... ...

elseif gregreprotocolversion == 0x88be then then

.. .. ..

end

end

What would be the most simple method to accomplish this? Thank you.