Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't know how to do #1, "Pass PayloadLength to the lower level dissector", but to do #2, I think you can just generate a TvbRange from the original Tvb, and then make a new Tvb from the TvbRange, like so:

xran_dissector_table:try(ecpriMessage, buffer:range(8, PayloadLength):tvb(),pinfo,tree)

Refs:

  • Tvb: https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Tvb.html#lua_class_Tvb
  • TvbRange: https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Tvb.html#lua_class_TvbRange