summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-04-06 11:43:12 +0000
committerphk <phk@FreeBSD.org>1998-04-06 11:43:12 +0000
commit45ced96af00d374f2f52ea8cdd3bad9445fbc0af (patch)
tree4dfd4cd1f4eee1dc65f5c28652916ae2a1b4e160 /sys/net
parentfe94bc82888551c452b52083bbfe584035456bdc (diff)
downloadFreeBSD-src-45ced96af00d374f2f52ea8cdd3bad9445fbc0af.zip
FreeBSD-src-45ced96af00d374f2f52ea8cdd3bad9445fbc0af.tar.gz
Use getmicrotime() for if_lastchange, 10msec is plenty precision.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c20
-rw-r--r--sys/net/if_ppp.c4
-rw-r--r--sys/net/if_tun.c2
-rw-r--r--sys/net/ppp_tty.c4
4 files changed, 15 insertions, 15 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 665b90f..1bedc1d 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if.c 8.3 (Berkeley) 1/4/94
- * $Id: if.c,v 1.56 1997/10/28 15:58:30 bde Exp $
+ * $Id: if.c,v 1.57 1997/12/16 17:40:34 eivind Exp $
*/
#include "opt_compat.h"
@@ -128,7 +128,7 @@ if_attach(ifp)
*/
TAILQ_INIT(&ifp->if_addrhead);
LIST_INIT(&ifp->if_multiaddrs);
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
if (ifnet_addrs == 0 || if_index >= if_indexlim) {
unsigned n = (if_indexlim <<= 1) * sizeof(ifa);
struct ifaddr **q = (struct ifaddr **)
@@ -406,7 +406,7 @@ if_down(ifp)
register struct ifaddr *ifa;
ifp->if_flags &= ~IFF_UP;
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
for (ifa = ifp->if_addrhead.tqh_first; ifa;
ifa = ifa->ifa_link.tqe_next)
pfctlinput(PRC_IFDOWN, ifa->ifa_addr);
@@ -426,7 +426,7 @@ if_up(ifp)
register struct ifaddr *ifa;
ifp->if_flags |= IFF_UP;
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
for (ifa = ifp->if_addrhead.tqh_first; ifa;
ifa = ifa->ifa_link.tqe_next)
pfctlinput(PRC_IFUP, ifa->ifa_addr);
@@ -576,7 +576,7 @@ ifioctl(so, cmd, data, p)
(ifr->ifr_flags &~ IFF_CANTCHANGE);
if (ifp->if_ioctl)
(void) (*ifp->if_ioctl)(ifp, cmd, data);
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
break;
case SIOCSIFMETRIC:
@@ -584,7 +584,7 @@ ifioctl(so, cmd, data, p)
if (error)
return (error);
ifp->if_metric = ifr->ifr_metric;
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
break;
case SIOCSIFPHYS:
@@ -595,7 +595,7 @@ ifioctl(so, cmd, data, p)
return EOPNOTSUPP;
error = (*ifp->if_ioctl)(ifp, cmd, data);
if (error == 0)
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
return(error);
case SIOCSIFMTU:
@@ -612,7 +612,7 @@ ifioctl(so, cmd, data, p)
return (EINVAL);
error = (*ifp->if_ioctl)(ifp, cmd, data);
if (error == 0)
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
return(error);
case SIOCADDMULTI:
@@ -636,7 +636,7 @@ ifioctl(so, cmd, data, p)
error = if_delmulti(ifp, &ifr->ifr_addr);
}
if (error == 0)
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
return error;
case SIOCSIFMEDIA:
@@ -648,7 +648,7 @@ ifioctl(so, cmd, data, p)
return (EOPNOTSUPP);
error = (*ifp->if_ioctl)(ifp, cmd, data);
if (error == 0)
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
return error;
case SIOCGIFMEDIA:
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index fd194e1..8e65245 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.54 1998/03/22 06:51:54 peter Exp $ */
+/* $Id: if_ppp.c,v 1.55 1998/03/30 09:51:52 phk Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
@@ -291,7 +291,7 @@ pppdealloc(sc)
if_down(&sc->sc_if);
sc->sc_if.if_flags &= ~(IFF_UP|IFF_RUNNING);
- microtime(&sc->sc_if.if_lastchange);
+ getmicrotime(&sc->sc_if.if_lastchange);
sc->sc_devp = NULL;
sc->sc_xfer = 0;
for (;;) {
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index b80fdd5..f6097a7 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -229,7 +229,7 @@ tuninit(unit)
TUNDEBUG("%s%d: tuninit\n", ifp->if_name, ifp->if_unit);
ifp->if_flags |= IFF_UP | IFF_RUNNING;
- microtime(&ifp->if_lastchange);
+ getmicrotime(&ifp->if_lastchange);
for (ifa = ifp->if_addrhead.tqh_first; ifa;
ifa = ifa->ifa_link.tqe_next) {
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index 3a3a5da..e1da807 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -70,7 +70,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: ppp_tty.c,v 1.31 1998/03/28 10:33:12 bde Exp $ */
+/* $Id: ppp_tty.c,v 1.32 1998/03/30 09:52:14 phk Exp $ */
#include "ppp.h"
#if NPPP > 0
@@ -245,7 +245,7 @@ pppopen(dev, tp)
sc->sc_outm = NULL;
pppgetm(sc);
sc->sc_if.if_flags |= IFF_RUNNING;
- microtime(&sc->sc_if.if_lastchange);
+ getmicrotime(&sc->sc_if.if_lastchange);
sc->sc_if.if_baudrate = tp->t_ospeed;
tp->t_sc = (caddr_t) sc;
OpenPOWER on IntegriCloud