Qt: import hexdump into a pcapng file

When creating the temporary capture file to store the imported data in
the file is created with the pcap format. To conform to the change to
using pcapng format by default it is only reasonable to generated a
temporary pcapng format file as well.

Change-Id: I842431c1449751f8f2f3b85a47cab731de794c8a
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/31066
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jaap Keuter 2018-12-16 22:00:45 +01:00 committed by Anders Broman
parent 74bd75baa5
commit 052d6a1d43
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ void ImportTextDialog::convertTextFile() {
params.encap = import_info_.encapsulation;
params.snaplen = import_info_.max_frame_length;
/* Use a random name for the temporary import buffer */
import_info_.wdh = wtap_dump_open_tempfile(&tmpname, "import", WTAP_FILE_TYPE_SUBTYPE_PCAP, WTAP_UNCOMPRESSED, &params, &err);
import_info_.wdh = wtap_dump_open_tempfile(&tmpname, "import", WTAP_FILE_TYPE_SUBTYPE_PCAPNG, WTAP_UNCOMPRESSED, &params, &err);
capfile_name_.append(tmpname ? tmpname : "temporary file");
qDebug() << capfile_name_ << ":" << import_info_.wdh << import_info_.encapsulation << import_info_.max_frame_length;
if (import_info_.wdh == NULL) {