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] How to add a wtap encapsulation?

From: Yo Mismo <iokeze@xxxxxxxxxxx>
Date: Tue, 12 Oct 2010 21:04:27 +0000
I want to add a wtap encapsulation for a new link layer protocol. I have added the name and abrev to encap_type_info encap_table_base in wtap.c and also in wtap.h I have added it (#define WTAP_ENCAP_XXX   127)
 
The dissector reg handoff calls
dissector_add(
"wtap_encap", WTAP_ENCAP_XXX , xxx_handle);
 
But when I open a captured file, the dissector don't works and it shows WTAP ENCAP = 0 in the info column
 
 
 
When I use for example
dissector_add("wtap_encap", 0 , xxx_handle);
 the dissector works fine, so I think it's a problem with the definition for encapsulation. What I'm doing wrong?
 
Thx