Ask Your Question

L. Qin's profile - activity

2020-02-19 06:52:09 +0000 received badge  Popular Question (source)
2020-02-19 00:49:13 +0000 received badge  Popular Question (source)
2019-02-23 12:27:34 +0000 marked best answer Lua dissector: Field extractor to get the last matched userdata

I want to create a Lua Dissector for LLDP TLV.

Pseudocode:

local subtype_f = Field.new("lldp.ieee.802_1.subtype")

local myproto = Proto("myproto", "My Proto")

function myproto.dissector(buf, pinfo, treeitem)
    local subtype = subtype_f()
    if subtype.value == A_SUBTYPE then
        do_something
    end
end

register_postdissector(myproto)

In one packet, there are 3 TLVs containing "lldp.ieee.802_1.subtype" field,

but the code local subtype = subtype_f() only get the first one FieldInfo,

How can I get the last one or retrieve the return value of subtype_f()

2019-02-23 12:27:34 +0000 received badge  Scholar (source)
2019-02-22 12:24:05 +0000 commented answer Lua dissector: Field extractor to get the last matched userdata

Thank you for your answer. But, this is a post dissector, I want to read the field lldp.ieee.802_1.subtype to check if

2019-02-22 12:05:26 +0000 edited question Lua dissector: Field extractor to get the last matched userdata

Lua dissector: Field extractor to get the last matched userdata I want to create a Lua Dissector for LLDP TLV. Pseudoc

2019-02-22 12:03:50 +0000 received badge  Editor (source)
2019-02-22 12:03:50 +0000 edited question Lua dissector: Field extractor to get the last matched userdata

Lua dissector: Field extractor to get the last matched userdata I want to create a Lua Dissector for LLDP TLV. Pseudoc

2019-02-22 11:07:51 +0000 asked a question Lua dissector: Field extractor to get the last matched userdata

Lua dissector: Field extractor to get the last matched userdata I want to create a Lua Dissector for LLDP TLV. Pseudoc

2019-02-19 15:33:22 +0000 asked a question How to call the original dissector in chained dissectors?

How to call the original dissector in chained dissectors? I'm working on a Lua Dissector for my own arp protocol. do