Add an API to let a postdissector specify fields whose values it needs.
authorGuy Harris <guy@alum.mit.edu>
Wed, 12 Apr 2017 02:53:48 +0000 (19:53 -0700)
committerGuy Harris <guy@alum.mit.edu>
Wed, 12 Apr 2017 04:31:19 +0000 (04:31 +0000)
commitc0792555392f234ab96917e784d365b5de053836
tree02c053696f2fbd0a6b05ae239b5460d1c551a64f
parentaa9a0b3bf831395dc1cfbaea7f467faed952dbf9
Add an API to let a postdissector specify fields whose values it needs.

Currently, this is only used to determine whether a protocol tree needs
to be built on the first pass or not - if there are postdissectors that
need fields, it does - but eventually we should be able to use it to
prime the dissection to deliver those fields in cases where we don't
need the *entire* protocol tree (rather than using a hack such as
cooking up a fake tap with a fake filter to do that).

Update MATE and TRANSUM to use it.

Clean up code to check whether we need a protocol tree, and add comments
before that code indicating, in each case, what the criteria are.

The array of postdissectors includes a length, so we don't need to
separately keep track of the number of postdissectors.

Clean up indentation while we're at it.

Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7
Reviewed-on: https://code.wireshark.org/review/21029
Reviewed-by: Guy Harris <guy@alum.mit.edu>
14 files changed:
debian/libwireshark0.symbols
epan/packet.c
epan/packet.h
epan/wslua/wslua_proto.c
file.c
plugins/mate/mate.h
plugins/mate/mate_setup.c
plugins/mate/packet-mate.c
plugins/transum/packet-transum.c
sharkd.c
tfshark.c
tshark.c
ui/gtk/packet_list_store.c
ui/qt/packet_list_record.cpp