aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.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 /rawshark.c
parent35b1bc5ec61260bc1890a2c991cdb7218946ae1f (diff)
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 'rawshark.c')
-rw-r--r--rawshark.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rawshark.c b/rawshark.c
index 8d29f34574..b1e484544b 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -990,7 +990,7 @@ load_cap_file(capture_file *cf)
struct wtap_pkthdr phdr;
epan_dissect_t edt;
- memset(&phdr, 0, sizeof(phdr));
+ wtap_phdr_init(&phdr);
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
@@ -1000,6 +1000,8 @@ load_cap_file(capture_file *cf)
epan_dissect_cleanup(&edt);
+ wtap_phdr_cleanup(&phdr);
+
if (err != 0) {
/* Print a message noting that the read failed somewhere along the line. */
switch (err) {