【问题标题】:Wireshark Lua dissector plugin table errorWireshark Lua 解析器插件表错误
【发布时间】:2019-04-01 00:24:21
【问题描述】:

我在 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 得到错误“获取错误的参数(DissectorTable_get no such dissector table)”

【问题讨论】:

  • 你想要解剖器还是解剖器表?也许尝试Dissector.get 而不是DissectorTable.get
  • @Piglet 在示例中是 DissectorTable,我尝试了您的建议,但它也给出了错误 No such dissector

标签: lua wireshark


【解决方案1】:

由于"eth.trailer" 已注册为启发式列表(请参阅packet-eth.c),我认为您可能需要遵循此处提供的示例: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 是检查预告片是否真的适合您的解剖器的函数。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-08-14
  • 2015-09-30
  • 1970-01-01
  • 1970-01-01
  • 2012-05-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多