Wireshark mailing list archives
Re: What is the Wireshark lua package path?
From: chuck c <bubbasnmp () gmail com>
Date: Tue, 25 May 2021 10:08:25 -0500
Recently asked here: https://ask.wireshark.org/question/22911/is-there-a-lua-file-that-defines-the-wireshark-api-globals/ Answer on the sumneko github: https://github.com/sumneko/lua-language-server/issues/545 Question: "Undefined globals" in plugin environment like Wireshark #545 On Tue, May 25, 2021 at 4:40 AM David Aldrich <david.aldrich.ntml () gmail com> wrote:
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? ___________________________________________________________________________ Sent via: Wireshark-users mailing list <wireshark-users () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-users Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-users mailto:wireshark-users-request () wireshark org ?subject=unsubscribe
___________________________________________________________________________ Sent via: Wireshark-users mailing list <wireshark-users () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-users Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-users mailto:wireshark-users-request () wireshark org?subject=unsubscribe
Current thread:
- What is the Wireshark lua package path? David Aldrich (May 25)
- Re: What is the Wireshark lua package path? chuck c (May 25)