diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-11-30 16:30:19 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-01 00:31:03 +0000 |
commit | 846bb5394812c39359dfdbbf7e8755a7e3cf5326 (patch) | |
tree | 70dcf5a08a04abe66c1ef766ce15c634e87a6cf2 /tfshark.c | |
parent | 35b1bc5ec61260bc1890a2c991cdb7218946ae1f (diff) | |
download | wireshark-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. |