- if (linktype != WTAP_ENCAP_PER_PACKET &&
- out_file_type == WTAP_FILE_TYPE_SUBTYPE_PCAP) {
- tshark_debug("tshark: writing PCAP format to %s", save_file);
- if (strcmp(save_file, "-") == 0) {
- /* Write to the standard output. */
- pdh = wtap_dump_open_stdout(out_file_type, linktype,
- snapshot_length, FALSE /* compressed */, &err);
- } else {
- pdh = wtap_dump_open(save_file, out_file_type, linktype,
- snapshot_length, FALSE /* compressed */, &err);
- }
- }
- else {
- tshark_debug("tshark: writing format type %d, to %s", out_file_type, save_file);
- if (strcmp(save_file, "-") == 0) {
- /* Write to the standard output. */
- pdh = wtap_dump_open_stdout_ng(out_file_type, linktype,
- snapshot_length, FALSE /* compressed */, shb_hdrs, idb_inf, nrb_hdrs, &err);
- } else {
- pdh = wtap_dump_open_ng(save_file, out_file_type, linktype,
- snapshot_length, FALSE /* compressed */, shb_hdrs, idb_inf, nrb_hdrs, &err);
- }
+ tshark_debug("tshark: writing format type %d, to %s", out_file_type, save_file);
+ if (strcmp(save_file, "-") == 0) {
+ /* Write to the standard output. */
+ pdh = wtap_dump_open_stdout(out_file_type, WTAP_UNCOMPRESSED, ¶ms,
+ &err);
+ } else {
+ pdh = wtap_dump_open(save_file, out_file_type, WTAP_UNCOMPRESSED, ¶ms,
+ &err);