Wireshark mailing list archives

Re: Unable to detect custom protocol dissector


From: Anders Broman via Wireshark-dev <wireshark-dev () wireshark org>
Date: Thu, 13 Feb 2020 12:03:32 +0000

 

 

From: Wireshark-dev <wireshark-dev-bounces () wireshark org> On Behalf Of Graham Bloice
Sent: den 13 februari 2020 11:09
To: Developer support list for Wireshark <wireshark-dev () wireshark org>
Subject: Re: [Wireshark-dev] Unable to detect custom protocol dissector

 

Does your custom build of Wireshark include Lua?  What does the Help | About Wireshark | Wireshark info show?

 

On Wed, 12 Feb 2020 at 21:46, sandip gangakhedkar <sandipfloyd () gmail com <mailto:sandipfloyd () gmail com> > wrote:

Hi,

 

I am using a Custom protocol dissector (Lua script) for the GeoNetworking header. I have build wireshark 3.2.1 from 
source on Ubuntu 18.04 and placed the Lua script in the Global plugins directory. However, the script fails when to 
find the Geonetworking protocol when I invoke it in the script:

 

  Dissector.get("gnw"):call(newTvb, pkt, root)

 

So I tried another approach:

 

  gnw_dissector = DissectorTable.get("ethertype"):get_dissector(35143)

 

The protocol gnw (GeoNetworking) corresponds to an EtherType of 35143 in my Wireshark protocols configuration. However, 
this also fails to find the "gnw" protocol.

 

How can I get wireshark to detect the GeoNetworking protocol from my custom Lua script?

 

Thanks in advance.

 

 


The function DissectorTable.get("ethertype"):get_dissector(35143)

 <https://wiki.wireshark.org/LuaAPI/Dissector#dissectortable:get_dissector.28pattern.29> 
https://wiki.wireshark.org/LuaAPI/Dissector#dissectortable:get_dissector.28pattern.29

gets the handle of the built in GNW dissector as far as I can tell. Is that what you want? Why do you want to replace 
the existing dissector? (If that’s what you are trying to do).

 

Regards

Anders

 

Attachment: smime.p7s
Description:

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

Current thread: