Wireshark-dev: Re: [Wireshark-dev] Retrieving dissection result from another dissector
From: Dario Lombardo <lomato@xxxxxxxxx>
Date: Wed, 4 Jul 2018 11:27:05 +0200


On Tue, Jul 3, 2018 at 8:49 PM Guy Harris <guy@xxxxxxxxxxxx> wrote:

Should we, instead, get rid of the scope arguments to those functions and, instead, have separate functions, one of which serves the original purpose, using file scope, and one of which serves this new purpose, using pinfo->pool scope?


It looks neat, but I see 2 issues:

1) grep -r  "p_\(add\|get\|remove\)_proto_data" ../epan/dissectors/* | wc -l gives me 881 calls to those functions. It could be harsh to change all of them as well as breaking compatibility with existing code outside wireshark (plugins?).

2) are we sure that a call to (eg.) p_proto_add_data_with_file_scope_or_another_name() is more meaningful than p_proto_add_data(wmem_file_scope(), ...)? How could those 2 functions be named to recall the actual goal?