This patch introduces the "-U tap_name[,filter]" tshark option and
is similar to the "Export PDUs as file" option in Wireshark.
Wireshark implements this feature by reopening a capture file, applying
a tap and finally opening the temporary file. Since tshark knows
in advance that a PDU export is needed, it can optimize by not creating
the temporary file and perform the export at the first opportunity.
This patch splits the opening/tapping functionality from error reporting
since tshark does not need a temp file and has no dialogs.
The capture file comment is now specified explicitly as there is no
"current file" anymore if the tap is running without active file.
- Review whether it is acceptable to overwrite save_file in tshark.
- Add documentation (tshark manpage).
Petri-Dish: Anders Broman <firstname.lastname@example.org>
Tested-by: Petri Dish Buildbot <email@example.com>
Reviewed-by: Anders Broman <firstname.lastname@example.org>