Ethereal-users: Re: [Ethereal-users] Custom 802.1q tag type

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 31 Oct 2003 10:18:03 -0800

On Oct 31, 2003, at 4:15 AM, Adalberto Lins wrote:

Can you point me to the reference on how I can write a dissector?

Various of the README files in the "doc" directory of the Ethereal source.

The 0x9100 headers are identical to the 0x8100!

If by "identical" you mean that Ethernet packets with a type of 0x9100 have the same VLAN header as Ethernet packets with a type of 0x8100, i.e. that those packets should be dissected in *exactly* the same way as 0x8100 802.1q packets, you don't write a dissector - you just add the line

	dissector_add("ethertype", 0x9100, vlan_handle);

to the end of the "proto_reg_handoff_vlan()" routine in "packet-vlan.c".