diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-09-09 23:44:25 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-09-10 06:45:08 +0000 |
commit | 4a6dde12d6fe6af05b05d4c06b10056f6508711a (patch) | |
tree | 0ec3e0c7fb77dc645366d6f7f02a2b77ef886cd4 /wiretap/wtap.h | |
parent | d1cacbb1463503999981637314310a0824d9f3fe (diff) | |
download | wireshark-4a6dde12d6fe6af05b05d4c06b10056f6508711a.tar.gz |
Have "All Capture Files" match only capture files.
We support reading some types of files that aren't capture files, in
case we have a dissector for that file format (because, for example,
it's often transported over HTTP). Don't include them in the set of
files "All Capture Files" matches; you can still look for them as they
have individual entries in the drop-down menu of file type patterns.
Ultimately, there should be Fileshark/TFileshark programs to read those
files - and other file types, and even capture files if the goal is to
look at the file structure rather than at the packets - and *that's* the
program that should offer the ability to load JPEGs and so on.
(No, this does not reduce the "All Capture Files" list down to a level
that makes the problem in bug 12837 go away. The right way to fix
*that* is to arrange, somehow, that the "All Capture Files" entry not
actually list all the suffixes it matches.)
Change-Id: I705bff5fcd0694c6c6a11892621a195aa7cd0264
Reviewed-on: https://code.wireshark.org/review/17619
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r-- | wiretap/wtap.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 20a3b188f3..7a8b1d94c2 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1359,23 +1359,29 @@ typedef struct wtap_wslua_file_info { } wtap_wslua_file_info_t; /* - * For registering extensions used for capture file formats. + * For registering extensions used for file formats. * * These items are used in dialogs for opening files, so that * the user can ask to see all capture files (as identified * by file extension) or particular types of capture files. * - * Each file type has a description and a list of extensions the file - * might have. Some file types aren't real file types, they're - * just generic types, such as "text file" or "XML file", that can - * be used for, among other things, captures we can read, or for - * extensions such as ".cap" that were unimaginatively chosen by - * several different sniffers for their file formats. + * Each file type has a description, a flag indicating whether it's + * a capture file or just some file whose contents we can dissect, + * and a list of extensions the file might have. + * + * Some file types aren't real file types, they're just generic types, + * such as "text file" or "XML file", that can be used for, among other + * things, captures we can read, or for extensions such as ".cap" that + * were unimaginatively chosen by several different sniffers for their + * file formats. */ struct file_extension_info { /* the file type name */ const char *name; + /* TRUE if this is a capture file type */ + gboolean is_capture_file; + /* a semicolon-separated list of file extensions used for this type */ const char *extensions; }; @@ -1897,7 +1903,7 @@ int wtap_short_string_to_file_type_subtype(const char *short_name); /*** various file extension functions ***/ WS_DLL_PUBLIC -GSList *wtap_get_all_file_extensions_list(void); +GSList *wtap_get_all_capture_file_extensions_list(void); WS_DLL_PUBLIC const char *wtap_default_file_extension(int filetype); WS_DLL_PUBLIC |