Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] accessing field in IP header from L2TP dissector

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 18 Jul 2008 09:55:48 -0700

On Jul 18, 2008, at 9:47 AM, alex volinsky wrote:

DEPI works in two modes: D-MPT and PSP. In D-MPT mode, DOCSIS packets are encapsulated into MPEG2-TS fixed-size frames of 188 bytes. In one L2TPv3 payload, there could be from 1 to 7 MPEG2-TS frames. There is no length information in L2TPv3, so I'm looking into IP header.

As per other mail, the tvbuff that your dissector is handed has its own length information - in your dissector, call tvb_reported_length(tvb) to find out how much data is in the portion of the packet that your dissector is supposed to dissect.