aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
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 /extcap
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 'extcap')
-rw-r--r--extcap/androiddump.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index 5acc404dee..e782908a27 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -443,13 +443,14 @@ static struct extcap_dumper extcap_dumper_open(char *fifo, int encap) {
g_warning("Write to %s failed: %s", g_strerror(errno));
}
#else
- wtapng_dump_params params;
+ wtap_dump_params params = WTAP_DUMP_PARAMS_INIT;
int err = 0;
wtap_init(FALSE);
- wtap_dump_params_init(&params, NULL);
- extcap_dumper.dumper.wtap = wtap_dump_open(fifo, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC, encap, PACKET_LENGTH, FALSE, &params, &err);
+ params.encap = encap;
+ params.snaplen = PACKET_LENGTH;
+ extcap_dumper.dumper.wtap = wtap_dump_open(fifo, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC, FALSE, &params, &err);
if (!extcap_dumper.dumper.wtap) {
cfile_dump_open_failure_message("androiddump", fifo, err, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC);
exit(EXIT_CODE_CANNOT_SAVE_WIRETAP_DUMP);