diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2023-05-23 09:32:48 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2023-05-23 09:34:29 +0200 |
commit | eda974efc41fba64771f450678c64ef168c11a3c (patch) | |
tree | cd5ef26faebf9d549c23dee82b6d7aacf423282e /sf-pcap.c | |
parent | 1b5ddac906932f861aabddadd464e6f8a1bec030 (diff) |
Revert "pcap: Update the per-file header to use reserved1 and reserved2"
This reverts commit c2dfd817646d071bf62a3968a0454301e5395d18.
From a Denis remark: struct pcap_file_header is in a public header.
pcap-savefile.manfile.in will be updated separately.
Diffstat (limited to 'sf-pcap.c')
-rw-r--r-- | sf-pcap.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -206,8 +206,8 @@ pcap_check_header(const uint8_t *magic, FILE *fp, u_int precision, char *errbuf, if (swapped) { hdr.version_major = SWAPSHORT(hdr.version_major); hdr.version_minor = SWAPSHORT(hdr.version_minor); - hdr.reserved1 = SWAPLONG(hdr.reserved1); - hdr.reserved2 = SWAPLONG(hdr.reserved2); + hdr.thiszone = SWAPLONG(hdr.thiszone); + hdr.sigfigs = SWAPLONG(hdr.sigfigs); hdr.snaplen = SWAPLONG(hdr.snaplen); hdr.linktype = SWAPLONG(hdr.linktype); } @@ -731,11 +731,12 @@ sf_write_header(pcap_t *p, FILE *fp, int linktype, int snaplen) /* * https://www.tcpdump.org/manpages/pcap-savefile.5.txt states: - * reserved1: 4-byte not used - SHOULD be filled with 0 - * reserved2: 4-byte not used - SHOULD be filled with 0 + * thiszone: 4-byte time zone offset; this is always 0. + * sigfigs: 4-byte number giving the accuracy of time stamps + * in the file; this is always 0. */ - hdr.reserved1 = 0; - hdr.reserved2 = 0; + hdr.thiszone = 0; + hdr.sigfigs = 0; hdr.snaplen = snaplen; hdr.linktype = linktype; |