ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] Stop dissection in get_pdu_len

From: Tobias Weiss <tweiss@xxxxxxxxxxxxxxx>
Date: Thu, 24 May 2012 11:35:34 -0400
Hi,

I'm using tcp_dissect_pdus() to reassemble packets in my dissector. One of
my functions will calculate the length of the real message based on a
header with a fixed length (get_pdu_len function pointer). But what is the
best way to stop the dissection in get_pdu_len if I figured out that the
header is invalid? I could just return 0 which would result in a call to
show_reported_bounds_error(), but is that the best way to report the error?

Thanks!

Tobi