This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I am developing a custom dissector in Lua that decodes a proprietary protocol developed by my company. The dissector should process the payload of Ethernet II frames that have a VLAN tag (as defined by IEEE 802.1Q). How can I tell Wireshark that?

I tried the following:

original_vlan_dissector = DissectorTable.get("ethertype"):get_dissector(0x8100)
[...]
function my_protocol.dissector(buffer, packet_info, tree)
    original_vlan_dissector:call(buffer, packet_info, tree)
    [...]
end

local eth_table = DissectorTable.get("ethertype")
eth_table:add(0x8100, my_protocol)

Is there a better place to register my dissector? There is no TCP or UDP involved here, so I have no idea which DissectorTable and port are suitable.

asked 16 Aug '16, 07:19

patrick_oppermann's gravatar image

patrick_oppe...
466611
accept rate: 0%


Yes, this is the right way to do it.

permanent link

answered 16 Aug '16, 07:42

sindy's gravatar image

sindy
6.0k4851
accept rate: 24%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×431
×87

question asked: 16 Aug '16, 07:19

question was seen: 2,002 times

last updated: 16 Aug '16, 07:42

p​o​w​e​r​e​d by O​S​Q​A