From 846bb5394812c39359dfdbbf7e8755a7e3cf5326 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 30 Nov 2014 16:30:19 -0800 Subject: 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 --- rawshark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rawshark.c') 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) { -- cgit v1.2.3