diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-01-16 09:53:20 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-01-16 09:53:20 +0000 |
commit | 755d4dafe0f20cb1e5e9d8ddd929b465f60bfa6d (patch) | |
tree | ca2e75dc9af0cdeebe57d322b638c48a4e54c6c2 /sys/net/if_pflow.c | |
parent | 199c174cf33d9569734d7c7375041ed360c4289c (diff) |
switch from using softclock ticks to getnanotime when putting time on the
wire for v5 packets.
ok (and lots of gentle prodding from) florian@
Diffstat (limited to 'sys/net/if_pflow.c')
-rw-r--r-- | sys/net/if_pflow.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c index 89976e65647..e8e94d23d7d 100644 --- a/sys/net/if_pflow.c +++ b/sys/net/if_pflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflow.c,v 1.22 2012/11/08 18:06:49 gsoares Exp $ */ +/* $OpenBSD: if_pflow.c,v 1.23 2013/01/16 09:53:19 dlg Exp $ */ /* * Copyright (c) 2011 Florian Obser <florian@narrans.de> @@ -113,9 +113,6 @@ extern int ipport_hilastauto; /* from udp_usrreq.c */ extern int udpcksum; -/* from kern/kern_clock.c; incremented each clock tick. */ -extern int ticks; - void pflowattach(int npflow) { @@ -925,6 +922,7 @@ pflow_sendout_v5(struct pflow_softc *sc) struct mbuf *m = sc->sc_mbuf; struct pflow_header *h; struct ifnet *ifp = &sc->sc_if; + struct timespec tv; timeout_del(&sc->sc_tmo); @@ -943,8 +941,10 @@ pflow_sendout_v5(struct pflow_softc *sc) /* populate pflow_header */ h->uptime_ms = htonl(time_uptime * 1000); - h->time_sec = htonl(time_second); - h->time_nanosec = htonl(ticks); + + getnanotime(&tv); + h->time_sec = htonl(tv.tv_sec); + h->time_nanosec = htonl(tv.tv_nsec); return (pflow_sendout_mbuf(sc, m)); } |