We're now a non-profit! Support open source packet analysis by making a donation.

Wireshark-users: [Wireshark-users] What is the Wireshark lua package path?

From: David Aldrich <david.aldrich.ntml@xxxxxxxxx>
Date: Tue, 25 May 2021 10:39:49 +0100
Our custom Wireshark dissector, coded in lua, starts with:

-- Create a protocol object
test_protocol = Proto("test",  "test protocol")

messageLength_F = ProtoField.uint32("test.messageLength", "messageLength", base.HEX)
requestID_F     = ProtoField.uint32("test.requestID"    , "requestID"    , base.HEX)
responseTo_F    = ProtoField.uint32("test.responseTo"   , "responseTo"   , base.HEX)
opCode_F        = ProtoField.uint32("test.opCode"       , "opCode"       , base.HEX)

It works fine but the Visual Studio Code lua extension that I am using (sumneko.lua) reports that Proto and ProtoField are undefined globals. I guess that I need to tell the extension the lua runtime package path.

What is the package path for Wireshark?

Should I specify that path in the dissector using require?