Wireshark-dev: Re: [Wireshark-dev] ATM over Ethernet

From: Anders Broman <a.broman@xxxxxxxxxxxx>
Date: Tue, 06 Nov 2012 20:57:50 +0100
Evan Huus skrev 2012-11-06 19:48:
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

I've committed  the ETHERTYPE_ATMOE change.
Anders

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe