summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-30 16:30:19 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-01 00:31:03 +0000
commit846bb5394812c39359dfdbbf7e8755a7e3cf5326 (patch)
tree70dcf5a08a04abe66c1ef766ce15c634e87a6cf2 /tshark.c
parent35b1bc5ec61260bc1890a2c991cdb7218946ae1f (diff)
downloadwireshark-846bb5394812c39359dfdbbf7e8755a7e3cf5326.tar.gz
Add a Buffer to wtap_pkthdr to hold file-type-specific packet metadata.
For example, this can be used for pcap-ng options not mapped to file-type-independent metadata values. Change-Id: I398b324c62c1cc1cc61eb5e9631de00481b4aadc Reviewed-on: https://code.wireshark.org/review/5549 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index c3218244a8..d3f31f181d 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3072,7 +3072,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
Buffer buf;
epan_dissect_t *edt = NULL;
- memset(&phdr, 0, sizeof(struct wtap_pkthdr));
+ wtap_phdr_init(&phdr);
shb_hdr = wtap_file_get_shb_info(cf->wth);
idb_inf = wtap_file_get_idb_info(cf->wth);
@@ -3376,6 +3376,8 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
}
}
+ wtap_phdr_cleanup(&phdr);
+
if (err != 0) {
/*
* Print a message noting that the read failed somewhere along the line.