Wireshark Lua 解析器插件 table 错误
Wireshark Lua dissector plugin table error
我在 ixia 时间戳尾部的数据包之后有一个带有尾部数据的数据包。
我正在尝试为 Wireshark 编写一个与 ixia-packet_trailer 插件完全相同的解析器。
https://raw.githubusercontent.com/boundary/wireshark/master/epan/dissectors/packet-ixiatrailer.c
但是我想写成Lua,所以最容易改。
所以我更换了 C 线
heur_dissector_add("eth.trailer", dissect_ixiatrailer, proto_ixiatrailer);
通过以下在Lua
eth_table = DissectorTable.get("eth.trailer")
但是我收到 Wireshark 的错误 "bad argument to get (DissectorTable_get no such dissector table)"
由于 "eth.trailer"
已注册为启发式列表(请参阅 packet-eth.c), I think you'll probably need to follow the example provided here: https://mika-s.github.io/wireshark/lua/dissector/2018/12/30/creating-port-independent-wireshark-dissectors-in-lua.html
基本上,我认为您需要执行以下操作:
your_protocol:register_heuristic("eth.trailer", heuristic_checker)
... 其中 heuristic_checker
是检查预告片是否真的适合您的解析器的函数。
我在 ixia 时间戳尾部的数据包之后有一个带有尾部数据的数据包。 我正在尝试为 Wireshark 编写一个与 ixia-packet_trailer 插件完全相同的解析器。 https://raw.githubusercontent.com/boundary/wireshark/master/epan/dissectors/packet-ixiatrailer.c
但是我想写成Lua,所以最容易改。 所以我更换了 C 线
heur_dissector_add("eth.trailer", dissect_ixiatrailer, proto_ixiatrailer);
通过以下在Lua
eth_table = DissectorTable.get("eth.trailer")
但是我收到 Wireshark 的错误 "bad argument to get (DissectorTable_get no such dissector table)"
由于 "eth.trailer"
已注册为启发式列表(请参阅 packet-eth.c), I think you'll probably need to follow the example provided here: https://mika-s.github.io/wireshark/lua/dissector/2018/12/30/creating-port-independent-wireshark-dissectors-in-lua.html
基本上,我认为您需要执行以下操作:
your_protocol:register_heuristic("eth.trailer", heuristic_checker)
... 其中 heuristic_checker
是检查预告片是否真的适合您的解析器的函数。