diff options
author | Philippe Charnier <charnier@FreeBSD.org> | 1997-07-30 06:52:06 +0000 |
---|---|---|
committer | Philippe Charnier <charnier@FreeBSD.org> | 1997-07-30 06:52:06 +0000 |
commit | 5e043c9b64daf604ab4f4e3f0dba3fc821c5a83a (patch) | |
tree | 618af39e84725a7908ca0ec027e373091fd28f20 | |
parent | 1d6b7f4f37ce636a46d8fb0ddb28e412b6640774 (diff) |
Notes
-rw-r--r-- | usr.bin/netstat/atalk.c | 4 | ||||
-rw-r--r-- | usr.bin/netstat/ipx.c | 3 | ||||
-rw-r--r-- | usr.bin/netstat/main.c | 28 | ||||
-rw-r--r-- | usr.bin/netstat/mbuf.c | 5 | ||||
-rw-r--r-- | usr.bin/netstat/netstat.h | 3 | ||||
-rw-r--r-- | usr.bin/netstat/route.c | 5 | ||||
-rw-r--r-- | usr.bin/netstat/unix.c | 4 |
7 files changed, 23 insertions, 29 deletions
diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c index 3087426d0f329..49717e68299db 100644 --- a/usr.bin/netstat/atalk.c +++ b/usr.bin/netstat/atalk.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)atalk.c 1.1 (Whistle) 6/6/96"; */ static const char rcsid[] = - "$Id$"; + "$Id: atalk.c,v 1.6 1996/10/28 18:56:31 wollman Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -62,8 +62,6 @@ static const char rcsid[] = struct ddpcb ddpcb; struct socket sockb; -static void atalk_erputil __P((int, int)); - static int first = 1; /* diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c index 81d97a199f64c..7ce9c9ee76ffe 100644 --- a/usr.bin/netstat/ipx.c +++ b/usr.bin/netstat/ipx.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)ns.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id: ipx.c,v 1.4 1996/10/28 18:56:39 wollman Exp $"; + "$Id: ipx.c,v 1.4.2.1 1997/06/28 09:23:50 jhay Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -73,7 +73,6 @@ struct spxpcb spxpcb; struct socket sockb; static char *ipx_prpr __P((struct ipx_addr *)); -static void ipx_erputil __P((int, int)); static int first = 1; diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index dd63d61f6d7c1..95ad2f3043a81 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -32,13 +32,17 @@ */ #ifndef lint -char copyright[] = +char const copyright[] = "@(#) Copyright (c) 1983, 1988, 1993\n\ Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/param.h> @@ -49,6 +53,7 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #include <netinet/in.h> #include <ctype.h> +#include <err.h> #include <errno.h> #include <kvm.h> #include <limits.h> @@ -59,7 +64,6 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 3/1/94"; #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <err.h> #include "netstat.h" struct nlist nl[] = { @@ -231,19 +235,12 @@ main(argc, argv) int argc; char *argv[]; { - extern char *optarg; - extern int optind; register struct protoent *p; register struct protox *tp; /* for printing cblocks & stats */ - register char *cp; int ch; char *nlistf = NULL, *memf = NULL; char buf[_POSIX2_LINE_MAX]; - if ((cp = rindex(argv[0], '/'))) - prog = cp + 1; - else - prog = argv[0]; af = AF_UNSPEC; while ((ch = getopt(argc, argv, "Aabdf:ghI:iM:mN:np:rstuw:")) != EOF) @@ -569,14 +566,11 @@ name2protox(name) static void usage() { - (void)fprintf(stderr, -"usage: %s [-Aan] [-f address_family] [-M core] [-N system]\n", prog); - (void)fprintf(stderr, -" %s [-bdghimnrs] [-f address_family] [-M core] [-N system]\n", prog); - (void)fprintf(stderr, -" %s [-bdn] [-I interface] [-M core] [-N system] [-w wait]\n", prog); - (void)fprintf(stderr, -" %s [-M core] [-N system] [-p protocol]\n", prog); + (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", +"usage: netstat [-Aan] [-f address_family] [-M core] [-N system]", +" netstat [-bdghimnrs] [-f address_family] [-M core] [-N system]", +" netstat [-bdn] [-I interface] [-M core] [-N system] [-w wait]", +" netstat [-M core] [-N system] [-p protocol]"); exit(1); } diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c index 54d48b67782ef..e689f6f05ea36 100644 --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/param.h> @@ -40,6 +44,7 @@ static char sccsid[] = "@(#)mbuf.c 8.1 (Berkeley) 6/6/93"; #include <sys/socket.h> #include <sys/mbuf.h> +#include <err.h> #include <stdio.h> #include "netstat.h" diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index 708094f1bdac1..30e049c21d4be 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -55,9 +55,6 @@ int unit; /* unit number for above */ int af; /* address family */ -char *prog; /* program name */ - - int kread __P((u_long addr, char *buf, int size)); char *plural __P((int)); char *plurales __P((int)); diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index bc5e56f44c6cc..6ed4c004e1b86 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -36,7 +36,7 @@ static char sccsid[] = "From: @(#)route.c 8.6 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id: route.c,v 1.21 1996/10/28 18:56:44 wollman Exp $"; + "$Id: route.c,v 1.21.2.1 1997/06/28 09:23:54 jhay Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -721,8 +721,6 @@ ipx_print(sa) register struct sockaddr *sa; { u_short port; - struct netent *np = 0; - struct hostent *hp = 0; struct servent *sp = 0; char *net = "", *host = ""; register char *p; register u_char *q; @@ -789,7 +787,6 @@ ipx_phost(sa) static union ipx_net ipx_zeronet; char *p; struct ipx_addr in; - struct hostent *hp; work = *sipx; in = work.sipx_addr; diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c index 0309d1c30a477..a37da93002fcb 100644 --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)unix.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ /* |