aboutsummaryrefslogtreecommitdiffstats
path: root/reordercap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-11-13 16:10:53 -0800
committerPeter Wu <peter@lekensteyn.nl>2018-11-16 02:18:26 +0000
commit4e17bd6229a09c149c4e0ac7e5a090febfc15c10 (patch)
tree3a389fbe89a5ee12abfe6d3ab1a770c830643d03 /reordercap.c
parent658c30dc4b98c7afd1f0a7a5f8380a9399cbb082 (diff)
Use the dump parameters structure for non-pcapng-specific stuff.
Use it for all the per-file information, including the per-file link-layer type and the per-file snapshot length. Change-Id: Id75687c7faa6418a2bfcf7f8198206a9f95db629 Reviewed-on: https://code.wireshark.org/review/30616 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'reordercap.c')
-rw-r--r--reordercap.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/reordercap.c b/reordercap.c
index 8b5710d019..90c57f7ac1 100644
--- a/reordercap.c
+++ b/reordercap.c
@@ -177,7 +177,7 @@ main(int argc, char *argv[])
guint wrong_order_count = 0;
gboolean write_output_regardless = TRUE;
guint i;
- wtapng_dump_params ng_params;
+ wtap_dump_params params;
int ret = EXIT_SUCCESS;
GPtrArray *frames;
@@ -283,23 +283,21 @@ main(int argc, char *argv[])
}
DEBUG_PRINT("file_type_subtype is %d\n", wtap_file_type_subtype(wth));
- wtap_dump_params_init(&ng_params, wth);
+ wtap_dump_params_init(&params, wth);
/* Open outfile (same filetype/encap as input file) */
if (strcmp(outfile, "-") == 0) {
- pdh = wtap_dump_open_stdout(wtap_file_type_subtype(wth), wtap_file_encap(wth),
- wtap_snapshot_length(wth), FALSE, &ng_params, &err);
+ pdh = wtap_dump_open_stdout(wtap_file_type_subtype(wth), FALSE, &params, &err);
} else {
- pdh = wtap_dump_open(outfile, wtap_file_type_subtype(wth), wtap_file_encap(wth),
- wtap_snapshot_length(wth), FALSE, &ng_params, &err);
+ pdh = wtap_dump_open(outfile, wtap_file_type_subtype(wth), FALSE, &params, &err);
}
- g_free(ng_params.idb_inf);
- ng_params.idb_inf = NULL;
+ g_free(params.idb_inf);
+ params.idb_inf = NULL;
if (pdh == NULL) {
cfile_dump_open_failure_message("reordercap", outfile, err,
wtap_file_type_subtype(wth));
- wtap_dump_params_cleanup(&ng_params);
+ wtap_dump_params_cleanup(&params);
ret = OUTPUT_FILE_ERROR;
goto clean_exit;
}
@@ -366,11 +364,11 @@ main(int argc, char *argv[])
/* Close outfile */
if (!wtap_dump_close(pdh, &err)) {
cfile_close_failure_message(outfile, err);
- wtap_dump_params_cleanup(&ng_params);
+ wtap_dump_params_cleanup(&params);
ret = OUTPUT_FILE_ERROR;
goto clean_exit;
}
- wtap_dump_params_cleanup(&ng_params);
+ wtap_dump_params_cleanup(&params);
/* Finally, close infile and release resources. */
wtap_close(wth);