Ethereal-dev: [Ethereal-dev] RFC: move packet count code (capture info dialog) from capture_lo
Hi List!
While looking at the capture_loop.c code, I'm asking myself if it's such
a good idea to that the capture info dialog (packet counters) is
implemented there.
I think it's better to move this functionality into main.c (and
implement it much the same way as the current "update list of packet in
real time" is done.
This has some advantages:
- removing possible security risks from the actual capturing code
- the capture loop don't need to handle any GUI related code e.g.
"main_update()", (slightly?) increasing it's performance
- no dependencies of capture_loop.c to the epan library (I've tried,
it's true)!!!
- simplifies capture_loop.c
and some disadvantages:
- some overhead of opening/loading the capture file content if the
capture info dialog is actually used (which is currently not needed, as
the required data is present in the capture loop).
- slightly increasing complexity in main.c (however, will be similar to
the code used for "update list of packets ...", or probably even share
some code)
Summary:
the actual capture code will be simplified, it will be more secure and
the capture performance will increase (packet drops may decrease).
Comments on not doing this?
Regards, ULFL