diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-03 04:44:51 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-03 04:44:51 +0000 |
commit | aff56f0a2e7df244af239043b4216063dfddfcaf (patch) | |
tree | e9f20a138bb2a34c63e0a3e3504ce89c66b60c70 /usr.sbin | |
parent | 3c98413876a24000ed07ee054d5c8fbe1ef2c161 (diff) |
more nroff/KNF. from deraadt
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ndp/ndp.8 | 47 | ||||
-rw-r--r-- | usr.sbin/ndp/ndp.c | 27 |
2 files changed, 33 insertions, 41 deletions
diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8 index 72822571f85..be50b23ff95 100644 --- a/usr.sbin/ndp/ndp.8 +++ b/usr.sbin/ndp/ndp.8 @@ -1,5 +1,5 @@ -.\" $OpenBSD: ndp.8,v 1.13 2002/06/03 04:32:14 itojun Exp $ -.\" $KAME: ndp.8,v 1.25 2002/06/03 03:30:16 itojun Exp $ +.\" $OpenBSD: ndp.8,v 1.14 2002/06/03 04:44:50 itojun Exp $ +.\" $KAME: ndp.8,v 1.26 2002/06/03 04:39:03 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. .\" All rights reserved. @@ -39,40 +39,39 @@ .Sh SYNOPSIS .Nm ndp .Op Fl nt -.Fl a +.Ar hostname .Nm ndp .Op Fl nt -.Fl A Ar wait +.Fl a | Fl c | Fl p .Nm ndp .Op Fl nt -.Fl c +.Fl r .Nm ndp .Op Fl nt -.Fl d Ar hostname +.Fl H | Fl P | Fl R .Nm ndp .Op Fl nt -.Fl f Ar filename -.Nm ndp -.Fl H +.Fl A Ar wait .Nm ndp -.Fl I Ar interface +.Op Fl nt +.Fl d Ar hostname .Nm ndp -.Fl I Li delete +.Op Fl nt +.Fl f Ar filename .Nm ndp +.Op Fl nt .Fl i .Ar interface .Op Ar flags ... .Nm ndp -.Fl p -.Nm ndp -.Fl P -.Nm ndp -.Fl r +.Op Fl nt +.Fl I Ar interface .Nm ndp -.Fl R +.Op Fl nt +.Fl I Li delete .Nm ndp .Op Fl nt -.Fl s Ar nodename ether_addr +.Fl s Ar nodename etheraddr .Op Li temp .Op Li proxy .\" @@ -102,8 +101,8 @@ The entry could become in which case it will never expire. .It S State of the neighbor cache entry, as a single letter: -.Bl -tag -width indent -compact .Pp +.Bl -tag -width indent -compact .It N Nostate .It W @@ -115,7 +114,7 @@ Reachable .It S Stale .It D -Deay +Delay .It P Probe .It ? @@ -175,13 +174,13 @@ which means the flag should be cleared. .It Xo .Ic nud .Xc -turn on or off NUD (Neighbor Unreachability Detection) on the +Turn on or off NUD (Neighbor Unreachability Detection) on the interface. NUD is usually turned on by default. .It Xo .Ic accept_rtadv .Xc -specify whether or not to accept Router Advertisement messages +Specify whether or not to accept Router Advertisement messages received on the .Ar interface . Note that the kernel does not accept Router Advertisement messages @@ -192,7 +191,7 @@ This flag is set to 1 by default. .It Xo .Ic prefer_source .Xc -prefer addresses on the +Prefer addresses on the .Ar interface as candidates of the source address for outgoing packets. The default value of this flag is off. @@ -212,7 +211,7 @@ Show default router list. .It Fl R Flush all the entries in the default router list. .It Fl s -Register an NDP entry for a node. +Register a NDP entry for a node. The entry will be permanent unless the word .Ic temp is given in the command. diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index cac4fc8f6d0..1a5e98c45c6 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,5 +1,5 @@ -/* $OpenBSD: ndp.c,v 1.22 2002/06/03 04:32:14 itojun Exp $ */ -/* $KAME: ndp.c,v 1.97 2002/06/03 03:31:25 itojun Exp $ */ +/* $OpenBSD: ndp.c,v 1.23 2002/06/03 04:44:50 itojun Exp $ */ +/* $KAME: ndp.c,v 1.99 2002/06/03 04:39:03 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. @@ -128,7 +128,6 @@ char ntop_buf[INET6_ADDRSTRLEN]; /* inet_ntop() */ char host_buf[NI_MAXHOST]; /* getnameinfo() */ char ifix_buf[IFNAMSIZ]; /* if_indextoname() */ -int main(int, char **); int file(char *); void getsocket(void); int set(int, char **); @@ -333,7 +332,7 @@ file(name) args[3] = &arg[3][0]; args[4] = &arg[4][0]; retval = 0; - while(fgets(line, 100, fp) != NULL) { + while (fgets(line, 100, fp) != NULL) { i = sscanf(line, "%s %s %s %s %s", arg[0], arg[1], arg[2], arg[3], arg[4]); if (i < 2) { @@ -833,7 +832,7 @@ ndp_ether_aton(a, n) fprintf(stderr, "ndp: invalid Ethernet address '%s'\n", a); return (1); } - for (i=0; i<6; i++) + for (i = 0; i < 6; i++) n[i] = o[i]; return (0); } @@ -841,23 +840,17 @@ ndp_ether_aton(a, n) void usage() { - printf("usage: ndp hostname\n"); - printf(" ndp [-nt] -a\n"); + printf("usage: ndp [-nt] hostname\n"); + printf(" ndp [-nt] -a | -c | -p | -r | -H | -P | -R\n"); printf(" ndp [-nt] -A wait\n"); - printf(" ndp [-nt] -c\n"); printf(" ndp [-nt] -d hostname\n"); printf(" ndp [-nt] -f filename\n"); - printf(" ndp -i interface [flags...]\n"); + printf(" ndp [-nt] -i interface [flags...]\n"); #ifdef SIOCSDEFIFACE_IN6 - printf(" ndp -I interface\n"); - printf(" ndp -I delete\n"); + printf(" ndp [-nt] -I interface\n"); + printf(" ndp [-nt] -I delete\n"); #endif - printf(" ndp -p\n"); - printf(" ndp -r\n"); - printf(" ndp -s hostname ether_addr [temp] [proxy]\n"); - printf(" ndp -H\n"); - printf(" ndp -P\n"); - printf(" ndp -R\n"); + printf(" ndp [-nt] -s nodename etheraddr [temp] [proxy]\n"); exit(1); } |