]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch some more narrowing warnings.
authorGuy Harris <[email protected]>
Thu, 13 Sep 2018 04:58:34 +0000 (21:58 -0700)
committerGuy Harris <[email protected]>
Thu, 13 Sep 2018 04:58:34 +0000 (21:58 -0700)
And drop in another Y2.038K note.

rpcap-protocol.h
rpcapd/daemon.c

index 8b12277203f61aa4a0511cacca767215a025cf54..7598a0aea8c2cb2c2eaeb36a72006cdc2a6ec45e 100644 (file)
@@ -326,6 +326,10 @@ struct rpcap_startcapreply
  */
 struct rpcap_pkthdr
 {
+       /*
+        * This protocol needs to be updated with a new version before
+        * 2038-01-19 03:14:07 UTC.
+        */
        uint32 timestamp_sec;   /* 'struct timeval' compatible, it represents the 'tv_sec' field */
        uint32 timestamp_usec;  /* 'struct timeval' compatible, it represents the 'tv_usec' field */
        uint32 caplen;          /* Length of portion present in the capture */
index 27662fd5cd156af1563a3b2931587e73ac95e03d..4502e084a921ca8082728d5504ea6068fe42280f 100644 (file)
@@ -2355,8 +2355,12 @@ daemon_thrdatamain(void *ptr)
                net_pkt_header->caplen = htonl(pkt_header->caplen);
                net_pkt_header->len = htonl(pkt_header->len);
                net_pkt_header->npkt = htonl(++(session->TotCapt));
-               net_pkt_header->timestamp_sec = htonl(pkt_header->ts.tv_sec);
-               net_pkt_header->timestamp_usec = htonl(pkt_header->ts.tv_usec);
+               //
+               // This protocol needs to be updated with a new version
+               // before 2038-01-19 03:14:07 UTC.
+               //
+               net_pkt_header->timestamp_sec = (uint32)htonl(pkt_header->ts.tv_sec);
+               net_pkt_header->timestamp_usec = (uint32)htonl(pkt_header->ts.tv_usec);
 
                // Bufferize the pkt data
                if (sock_bufferize((char *) pkt_data, pkt_header->caplen,