summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/arp/arp.c8
-rw-r--r--usr.sbin/ndp/ndp.c32
-rw-r--r--usr.sbin/rarpd/arptab.c8
3 files changed, 24 insertions, 24 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 8def2a88c97..1b1a594ec3a 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arp.c,v 1.53 2013/07/20 18:21:11 bluhm Exp $ */
+/* $OpenBSD: arp.c,v 1.54 2013/08/15 13:43:33 bluhm Exp $ */
/* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */
/*
@@ -286,10 +286,10 @@ set(int argc, char *argv[])
doing_proxy = flags = export_only = 0;
while (argc-- > 0) {
if (strncmp(argv[0], "temp", 4) == 0) {
- struct timeval time;
+ struct timeval now;
- gettimeofday(&time, 0);
- expire_time = time.tv_sec + 20 * 60;
+ gettimeofday(&now, 0);
+ expire_time = now.tv_sec + 20 * 60;
if (flags & RTF_PERMANENT_ARP) {
/* temp or permanent, not both */
usage();
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index cdfcb8b2d6e..177bdfb058f 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ndp.c,v 1.49 2013/08/09 17:52:12 bluhm Exp $ */
+/* $OpenBSD: ndp.c,v 1.50 2013/08/15 13:43:33 bluhm Exp $ */
/* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */
/*
@@ -382,10 +382,10 @@ set(int argc, char **argv)
flags = 0;
while (argc-- > 0) {
if (strncmp(argv[0], "temp", 4) == 0) {
- struct timeval time;
+ struct timeval now;
- gettimeofday(&time, 0);
- expire_time = time.tv_sec + 20 * 60;
+ gettimeofday(&now, 0);
+ expire_time = now.tv_sec + 20 * 60;
} else if (strncmp(argv[0], "proxy", 5) == 0)
flags |= RTF_ANNOUNCE;
argv++;
@@ -549,7 +549,7 @@ dump(struct in6_addr *addr, int cflag)
struct sockaddr_in6 *sin;
struct sockaddr_dl *sdl;
struct in6_nbrinfo *nbi;
- struct timeval time;
+ struct timeval now;
int addrwidth;
int llwidth;
int ifwidth;
@@ -636,9 +636,9 @@ again:;
delete(host_buf);
continue;
}
- gettimeofday(&time, 0);
+ gettimeofday(&now, 0);
if (tflag)
- ts_print(&time);
+ ts_print(&now);
addrwidth = strlen(host_buf);
if (addrwidth < W_ADDR)
@@ -659,9 +659,9 @@ again:;
/* Print neighbor discovery specific informations */
nbi = getnbrinfo(&sin->sin6_addr, sdl->sdl_index, 1);
if (nbi) {
- if (nbi->expire > time.tv_sec) {
+ if (nbi->expire > now.tv_sec) {
printf(" %-9.9s",
- sec2str(nbi->expire - time.tv_sec));
+ sec2str(nbi->expire - now.tv_sec));
} else if (nbi->expire == 0)
printf(" %-9.9s", "permanent");
else
@@ -956,7 +956,7 @@ rtrlist(void)
char *buf;
struct in6_defrouter *p, *ep;
size_t l;
- struct timeval time;
+ struct timeval now;
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) {
err(1, "sysctl(ICMPV6CTL_ND6_DRLIST)");
@@ -991,12 +991,12 @@ rtrlist(void)
rtpref = ((p->flags & ND_RA_FLAG_RTPREF_MASK) >> 3) & 0xff;
printf(", pref=%s", rtpref_str[rtpref]);
- gettimeofday(&time, 0);
+ gettimeofday(&now, 0);
if (p->expire == 0)
printf(", expire=Never\n");
else
printf(", expire=%s\n",
- sec2str(p->expire - time.tv_sec));
+ sec2str(p->expire - now.tv_sec));
}
free(buf);
}
@@ -1009,7 +1009,7 @@ plist(void)
struct in6_prefix *p, *ep, *n;
struct sockaddr_in6 *advrtr;
size_t l;
- struct timeval time;
+ struct timeval now;
const int niflags = NI_NUMERICHOST;
int ninflags = nflag ? NI_NUMERICHOST : 0;
char namebuf[NI_MAXHOST];
@@ -1040,7 +1040,7 @@ plist(void)
printf("%s/%d if=%s\n", namebuf, p->prefixlen,
if_indextoname(p->if_index, ifix_buf));
- gettimeofday(&time, 0);
+ gettimeofday(&now, 0);
/*
* meaning of fields, especially flags, is very different
* by origin. notify the difference to the users.
@@ -1062,9 +1062,9 @@ plist(void)
printf(", pltime=%lu", (unsigned long)p->pltime);
if (p->expire == 0)
printf(", expire=Never");
- else if (p->expire >= time.tv_sec)
+ else if (p->expire >= now.tv_sec)
printf(", expire=%s",
- sec2str(p->expire - time.tv_sec));
+ sec2str(p->expire - now.tv_sec));
else
printf(", expired");
printf(", ref=%d", p->refcnt);
diff --git a/usr.sbin/rarpd/arptab.c b/usr.sbin/rarpd/arptab.c
index 191e958e76f..b038cda0cfa 100644
--- a/usr.sbin/rarpd/arptab.c
+++ b/usr.sbin/rarpd/arptab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arptab.c,v 1.20 2013/07/20 18:25:34 bluhm Exp $ */
+/* $OpenBSD: arptab.c,v 1.21 2013/08/15 13:43:33 bluhm Exp $ */
/*
* Copyright (c) 1984, 1993
@@ -96,7 +96,7 @@ arptab_set(u_char *eaddr, u_int32_t host)
struct sockaddr_inarp *sin = &sin_m;
struct rt_msghdr *rtm = &(m_rtmsg.m_rtm);
struct sockaddr_dl *sdl;
- struct timeval time;
+ struct timeval now;
int rt;
getsocket();
@@ -109,8 +109,8 @@ arptab_set(u_char *eaddr, u_int32_t host)
sdl_m.sdl_alen = 6;
expire_time = 0;
doing_proxy = flags = export_only = 0;
- gettimeofday(&time, 0);
- expire_time = time.tv_sec + 20 * 60;
+ gettimeofday(&now, 0);
+ expire_time = now.tv_sec + 20 * 60;
tryagain:
if (rtmsg(RTM_GET) < 0) {