Submitter: Guy Harris (g...@alum.mit.edu)
Changed: branch: master
b812193 by Guy Harris (g...@alum.mit.edu):
Have block read routines indicate whether the block should be returned.
Some blocks should be returned by wtap_read(), others are just processed
internally. Add a Boolean flag to wtapng_block_t, have the routines
that read particular block types set it appropriately, and have the read
and seek-read routines check that flag rather than checking for the
block types that should be returned. Pass a pointer to the
wtapng_block_t to packet type plugin read routines, rather than passing
it some members of the wtapng_block_t.
This means that 1) for new block types, we don't have to update any
tests and 2) plugin handlers for block types can indicate whether they
processed the block internally and the caller shouldn't see it or 2) the
block should be provided to the caller.
Reviewed-by: Guy Harris <g...@alum.mit.edu>
from 8556f65 pcapng_read_block() should just return a Boolean.
adds b812193 Have block read routines indicate whether the block should
Summary of changes:
wiretap/pcapng.c | 98 ++++++++++++++++++++++++++++++-------------------
wiretap/pcapng_module.h | 22 ++++++++++-
2 files changed, 81 insertions(+), 39 deletions(-)
Sent via: Wireshark-commits mailing list <email@example.com>