Ask Your Question

Revision history [back]

How to call dissector for IPv6 next header

I am working on a Lua dissector for a new IPv6 hop-by-hop extension header we are developing in the IETF. See: https://tools.ietf.org/html/draft-hinden-6man-mtu-option-01

I have gotten it to work to parse and display the header, but I don't know how to call the next dissector. It can be any IP protocol (TCP/UDP/etc.) as defined in https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml.

I can get it to work in a test case for UDP by using a static value:

     Dissector.get("udp"):call(buffer(aoptionlen):tvb(), pinfo, tree)

inside the function. How do I do this for the general case? I have the next header value in a variable.

Thanks in advance.

Bob