From 1e108f2bca87b6e5029e0da1133c4ec95e9985ad Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 8 Mar 2002 11:10:40 +0000 Subject: Handle 64-bit mode in IRIX, where "snoop_timestamp" in a "struct snoopheader" is a "struct irix5_timeval" rather than a "struct timeval", by copying the "tv_sec" and "tv_usec" members of that structure to the time stamp in a "struct pcap_hdr". --- pcap-snoop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pcap-snoop.c') diff --git a/pcap-snoop.c b/pcap-snoop.c index 17c7ba7..94bd9d4 100644 --- a/pcap-snoop.c +++ b/pcap-snoop.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-snoop.c,v 1.34 2002-03-07 11:39:13 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-snoop.c,v 1.35 2002-03-08 11:10:40 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -92,7 +92,8 @@ again: bpf_filter(p->fcode.bf_insns, cp, datalen, caplen)) { struct pcap_pkthdr h; ++p->md.stat.ps_recv; - h.ts = sh->snoop_timestamp; + h.ts.tv_sec = sh->snoop_timestamp.tv_sec; + h.ts.tv_usec = sh->snoop_timestamp.tv_usec; h.len = datalen; h.caplen = caplen; (*callback)(user, &h, cp); -- cgit v1.2.3