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

Wireshark-dev: [Wireshark-dev] Dissector for link layer to run before ethernet one

From: Mihai Cîrîc <mihai.ciric@xxxxxxxxx>
Date: Thu, 20 Jul 2017 11:47:17 +0000 (UTC)
Hello all,

I have some capture files with packets encapsulated under ethernet. But
these packets have a short header before the mac addresses and I am
trying to write a dissector that would run before the ethernet one,
parse the header and then call the ethernet dissector to continue parsing
the rest of the packet.

I was not able to find any example of this being done and I guess it would
involve changing the entry in the wtap_encap table to replace the eth
dissector.

Any ideas on how this could be done?

All the best,

Mihai