启发式注册函数中如何获取总包长度?

时间:2019-05-01 13:45:13

标签: lua wireshark-dissector

我如何在启发式寄存器函数is_ixia_trailer中获得总包长度

ixia_trailer_proto:register_heuristic("eth.trailer", is_ixia_trailer)

使用buffer:len(),我可以获取预告片的长度,但不能获取完整的消息长度

local function is_ixia_trailer(buffer,pinfo,tree)
    local length = buffer:len()

1 个答案:

答案 0 :(得分:0)

您似乎对帧长度和/或捕获的帧长度感兴趣吗?

var passwords = ["pass1", "pass2", "pass3", "pass4", "pass5"];
var input = document.getElementById("input1");
var button = document.getElementById("button");

button.addEventListener("click", function () {
  if (passwords.some(password => password === input.value)) {
    document.write("welcome");
  } else {
    alert("wrong");
  }
});

使用这些字段的简单示例:

local f_frame_len = Field.new("frame.len")
local f_frame_cap_len = Field.new("frame.cap_len")
相关问题