Wireshark lua 包路径是什么?

What is the Wireshark lua package path?

我们的自定义 Wireshark 解析器,编码为 lua,开头为:

-- 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)

它工作正常,但我正在使用的 Visual Studio 代码 lua 扩展 (sumneko.lua) 报告说 Proto 和 ProtoField 是未定义的全局变量。我想我需要告诉扩展 lua 运行时包路径。

Wireshark 的包路径是什么?

我应该使用 require 在解析器中指定该路径吗?

我的问题在这里得到解答:https://github.com/sumneko/lua-language-server/issues/545