Ask Your Question

Revision history [back]

The "official" documentation is in the code so "use the source Luke", e.g. tvbuff.h where the comments will guide you. You can also look at README.dissector, Section 1.7 "Calling other dissectors".

In the current development branch there is no function tvb_new_subset(), so it appears that you're working with older code, can you specify which version?

The parameters for tvb_new_subset_length_caplen() are in the header comment. As can be seen in the comments for the subsequent functions, tvb_new_subset_length() and tvb_new_subset_remaining() the backing_length and reported_length arguments can be set to -1 to consume the rest of the source buffer.

For your 2nd query, have you put a breakpoint in the dissector making the call_dissector() call to see what it's doing, e.g. find_handle() might be returning null.

There are may examples of producing a subset tvb to hand off to another dissector, e.g. packet-udp.c in the function decode_udp_ports().