summaryrefslogtreecommitdiff
path: root/tfshark.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 /tfshark.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 'tfshark.c')
-rw-r--r--tfshark.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tfshark.c b/tfshark.c
index ea439d86b7..e41833a88e 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -1810,7 +1810,7 @@ load_cap_file(capture_file *cf, int max_packet_count, gint64 max_byte_count)
/* Get the union of the flags for all tap listeners. */
tap_flags = union_of_tap_listener_flags();
- memset(&file_phdr, 0, sizeof(file_phdr));
+ wtap_phdr_init(&file_phdr);
/* XXX - TEMPORARY HACK TO ELF DISSECTOR */
file_phdr.pkt_encap = 1234;
@@ -1945,6 +1945,8 @@ load_cap_file(capture_file *cf, int max_packet_count, gint64 max_byte_count)
}
}
+ wtap_phdr_cleanup(&phdr);
+
if (err != 0) {
/*
* Print a message noting that the read failed somewhere along the line.