diff options
author | guy <guy> | 2002-03-08 11:10:40 +0000 |
---|---|---|
committer | guy <guy> | 2002-03-08 11:10:40 +0000 |
commit | 1e108f2bca87b6e5029e0da1133c4ec95e9985ad (patch) | |
tree | 4b92062c2d720c325a1f7a07c5e8840f3933fd28 /pcap-snoop.c | |
parent | 03550aa8e203396fd7a20f78bbd583a056af6943 (diff) |
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".
Diffstat (limited to 'pcap-snoop.c')
-rw-r--r-- | pcap-snoop.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |