Wireshark-dev: Re: [Wireshark-dev] Question for LUA dissection
From: Roland Knall <rknall@xxxxxxxxx>
Date: Wed, 7 Feb 2018 19:40:52 +0100


On Wed, Feb 7, 2018 at 7:32 PM, Peter Wu <peter@xxxxxxxxxxxxx> wrote:
Hey Roland,


The problem with dissect_tcp_pdus (and desegment_offset/desegment_len)
is that it prevents the dissection from displaying until everything is
available.

In C, the reassembly API (epan/reassemble.h) could potentially be used
for more control over when the dissection is displayed, but the API can
be hard to use. This API is not exposed to Lua, I guess that in Lua the
best you can do now given the current API limitations is to store
fragments in a global variable (register a cleanup routine to clear this
variable when a packet capture file closes).
--


Yeah, thought as much. Is there a document on how Lua dissection works in general?

In C you cannot rely on the "right" order of dissecting packets, as dissectors are called multiple times and not necessarily in-order.

Or does Lua work more closely to the tap-interface, where you can rely that the order is always "right"

regards
Roland