diff options
| author | 2001-10-02 18:04:35 +0000 | |
|---|---|---|
| committer | 2001-10-02 18:04:35 +0000 | |
| commit | eb867ec1df850542d95c56dba90ab9d554f18a8d (patch) | |
| tree | d612fefdd4ca466ef4af130b93b34d3f34e54704 /sys/net/bpf.c | |
| parent | Typo fixes (thanks gwyllion@ace.ulyssis.org) (diff) | |
| download | wireguard-openbsd-eb867ec1df850542d95c56dba90ab9d554f18a8d.tar.xz wireguard-openbsd-eb867ec1df850542d95c56dba90ab9d554f18a8d.zip | |
change timeval to bpf_timeval; 32 bit in size, permitting much greater portability
Diffstat (limited to 'sys/net/bpf.c')
| -rw-r--r-- | sys/net/bpf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 702bf43047a..7d44697c2b3 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.29 2001/09/15 20:40:46 frantzen Exp $ */ +/* $OpenBSD: bpf.c,v 1.30 2001/10/02 18:04:35 deraadt Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1069,6 +1069,8 @@ bpf_catchpacket(d, pkt, pktlen, snaplen, cpfn) register struct bpf_hdr *hp; register int totlen, curlen; register int hdrlen = d->bd_bif->bif_hdrlen; + struct timeval tv; + /* * Figure out how many bytes to move. If the packet is * greater or equal to the snapshot length, transfer that @@ -1113,7 +1115,9 @@ bpf_catchpacket(d, pkt, pktlen, snaplen, cpfn) * Append the bpf header. */ hp = (struct bpf_hdr *)(d->bd_sbuf + curlen); - microtime(&hp->bh_tstamp); + microtime(&tv); + hp->bh_tstamp.tv_sec = tv.tv_sec; + hp->bh_tstamp.tv_usec = tv.tv_usec; hp->bh_datalen = pktlen; hp->bh_hdrlen = hdrlen; /* |
