aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.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 /wiretap/wtap.c
parent658c30dc4b98c7afd1f0a7a5f8380a9399cbb082 (diff)
downloadwireshark-4e17bd6229a09c149c4e0ac7e5a090febfc15c10.tar.gz
wireshark-4e17bd6229a09c149c4e0ac7e5a090febfc15c10.tar.bz2
wireshark-4e17bd6229a09c149c4e0ac7e5a090febfc15c10.zip
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 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index 3b7ac5610d..4f73628393 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -316,20 +316,21 @@ wtap_file_get_nrb_for_new_file(wtap *wth)
}
void
-wtap_dump_params_init(wtapng_dump_params *params, wtap *wth)
+wtap_dump_params_init(wtap_dump_params *params, wtap *wth)
{
memset(params, 0, sizeof(*params));
-
if (wth == NULL)
return;
+ params->encap = wtap_file_encap(wth);
+ params->snaplen = wtap_snapshot_length(wth);
params->shb_hdrs = wtap_file_get_shb_for_new_file(wth);
params->idb_inf = wtap_file_get_idb_info(wth);
params->nrb_hdrs = wtap_file_get_nrb_for_new_file(wth);
}
void
-wtap_dump_params_cleanup(wtapng_dump_params *params)
+wtap_dump_params_cleanup(wtap_dump_params *params)
{
wtap_block_array_free(params->shb_hdrs);
/* params->idb_inf is currently expected to be freed by the caller. */