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] TCP Reassembly in wireshark

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 11 Feb 2014 01:19:34 -0800
On Feb 10, 2014, at 10:19 PM, Vishnu Bhatt <vishnu.bhatt@xxxxxxxxxxx> wrote:

> << get_sabp_pdu_len(), that looks at the first few bytes of the message (using a routine to do so for ASN.1 PER)>>
> 
> Actually I was asking for some help in this regard only. How does it look at the first few bytes of the message?

I assume by "it" you mean the get_sabp_pdu_len() routine.  Given that, it (get_sabp_pdu_len()) looks at the first few bytes of the message by calling dissect_per_length_determinant().  Other "get_pdu_len" routines do so by doing whatever is appropriate for the protocol in question; there is no general mechanism, for *all* protocols running atop TCP, to get the packet length - that's why tcp_dissect_pdus() has to take a pointer to a function as an argument, so each protocol's dissector can supply a "get the PDU length" routine (and a "minimum length needed to find out the PDU length) appropriate to the protocol.

> Where the procedure is mentioned (not asking in the code)?

tcp_dissect_pdus() is mentioned in the doc/README.dissector file.

get_sabp_pdu_len() is mentioned *only* in the code; we don't document every single procedure in every dissector.