From 2bd813507a5a42c298d09ac8d83ca1eebd8db277 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 17 Jun 2012 16:44:09 +0000 Subject: Export a wtap_dump_can_write_encaps() routine from Wiretap; it takes a file type and a GArray of encapsulation types and returns TRUE if a capture with all those encapsulation types can be written to a file in that file type and FALSE otherwise. Use it where appropriate. svn path=/trunk/; revision=43315 --- wiretap/wtap.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'wiretap/wtap.h') diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 7ef23fb308..f5cb8e4b1c 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1097,6 +1097,13 @@ void wtap_close(wtap *wth); /*** dump packets into a capture file ***/ gboolean wtap_dump_can_open(int filetype); gboolean wtap_dump_can_write_encap(int filetype, int encap); + +/** + * Return TRUE if a capture with a given GArray of WTAP_ENCAP_ types + * can be written in a specified format, and FALSE if it can't. + */ +gboolean wtap_dump_can_write_encaps(int ft, const GArray *file_encaps); + gboolean wtap_dump_can_compress(int filetype); gboolean wtap_dump_has_name_resolution(int filetype); -- cgit v1.2.1