Wireshark-dev: Re: [Wireshark-dev] ATM over Ethernet
From: Evan Huus <eapache@xxxxxxxxx>
Date: Tue, 6 Nov 2012 13:48:54 -0500
On Tue, Nov 6, 2012 at 12:47 PM, Alex Bennée <kernel-hacker@xxxxxxxxxx> wrote:
On 6 November 2012 10:13, Alex Bennée <kernel-hacker@xxxxxxxxxx> wrote:
> On 5 November 2012 18:53, Guy Harris <guy@xxxxxxxxxxxx> wrote:
>> On Nov 5, 2012, at 4:14 AM, Alex Bennee <kernel-hacker@xxxxxxxxxx> wrote:
>>
>> No, you need to implement a dissector for your ATM-over-Ethernet encapsulation that repeatedly calls the ATM dissector for each cell.  Multiple cells encapsulated in an Ethernet packet is a characteristic of your encapsulation, not of ATM, so the code to handle that should be part of the dissector for your encapsulation, not the dissector for ATM.

Ahh it makes more sense now. I've attached the re-worked patch which
adds an explicit atmoe dissector which seems to work.

Just something to note - you shouldn't be calling other dissectors inside an if (tree) block. All dissectors down the stack need to be run even if tree is NULL so that conversations, expert info and other non-tree data still gets populated.

The various proto_* functions all handle NULL trees and behave correctly, so the easiest way to fix this would be to simply remove the if (tree) check and leave everything else the way it is.

Also, (since I'm feeling super picky today) you don't need to #include <epan/prefs.h> :)

Cheers,
Evan