diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-01-24 04:33:23 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-01-24 04:33:23 +0000 |
commit | c8854a7a5fd5e61a9a0d65a9b61a372432ef6f9a (patch) | |
tree | e68777472dfc00ecf7ff3de03939646adbcc2f7d /wiretap/wtap.h | |
parent | a2c21a2b53ea64532b3a451c9569be8fde85aacf (diff) |
Add a routine to Wiretap that takes a file type value and an
encapsulation value and returns a GArray containing all the file types
that could be used to save a file of that file type and that
encapsulation value (which could be WTAP_ENCAP_PER_PACKET), with the
input file type first if that can be used and pcap or pcap-ng first if
not and if one of them can be used, and with pcap and pcap-ng clustered
together if they're among the file types that can be used.
Use that routine for the GTK+ file save dialog.
svn path=/trunk/; revision=40685
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r-- | wiretap/wtap.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h index cd3ddfa81f..7227d3aa7f 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -951,14 +951,21 @@ struct addrinfo; gboolean wtap_dump_set_addrinfo_list(wtap_dumper *wdh, struct addrinfo *addrinfo_list); gboolean wtap_dump_close(wtap_dumper *, int *); +/* + * Get a GArray of WTAP_FILE_ values for file types that can be used + * to save a file of a given type with a given WTAP_ENCAP_ type. + */ +GArray *wtap_get_savable_file_types(int file_type, int file_encap); + /*** various string converter functions ***/ const char *wtap_file_type_string(int filetype); const char *wtap_file_type_short_string(int filetype); int wtap_short_string_to_file_type(const char *short_name); +/*** various file extension functions ***/ +const char *wtap_default_file_extension(int filetype); GSList *wtap_get_file_extensions_list(int filetype); void wtap_free_file_extensions_list(GSList *extensions); -const char *wtap_default_file_extension(int filetype); const char *wtap_encap_string(int encap); const char *wtap_encap_short_string(int encap); |