path: root/captype.c
diff options
authorMichal Labedzki <michal.labedzki@tieto.com>2014-01-18 15:20:02 +0100
committerEvan Huus <eapache@gmail.com>2014-02-25 17:43:13 +0000
commit579e7e19ce8e5f1a6e16b75f130ad4b001157ca5 (patch)
tree423547b0256e93647f98710cf14e15e112f7f73f /captype.c
parentb6aae8d5c470aa681b70f33cad064dbb7045b3b7 (diff)
Wireshark: Add option to choose format type of capture file
The best heuristic can fail, so add possibility to manually choose capture file format type, so not correctly recognize file format can be loaded in Wireshark. On the other side now it is possible to open capture file as file format to be dissected. Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a Reviewed-on: https://code.wireshark.org/review/16 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'captype.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/captype.c b/captype.c
index 885cff4d18..42341e7b4f 100644
--- a/captype.c
+++ b/captype.c
@@ -112,6 +112,7 @@ main(int argc, char *argv[])
* Get credential information for later use.
+ init_open_routines();
if ((init_progfile_dir_error = init_progfile_dir(argv[0], main))) {
@@ -143,7 +144,7 @@ main(int argc, char *argv[])
overall_error_status = 0;
for (i = 1; i < argc; i++) {
- wth = wtap_open_offline(argv[i], &err, &err_info, FALSE);
+ wth = wtap_open_offline(argv[i], WTAP_TYPE_AUTO, &err, &err_info, FALSE);
if(wth) {
printf("%s: %s\n", argv[i], wtap_file_type_subtype_short_string(wtap_file_type_subtype(wth)));