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 /tshark.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 'tshark.c')
-rw-r--r-- | tshark.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. |