Wireshark lua 包路径是什么?

问题描述

我们的自定义 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 Code lua 扩展 (sumneko.lua) 报告 Proto 和 protofield 是未定义的全局变量。我想我需要告诉扩展lua运行时包路径。

Wireshark 的包路径是什么?

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

解决方法

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