Module Name: src
Committed By: joerg
Date: Thu Apr 23 00:24:50 UTC 2020
Modified Files:
src/usr.bin/netstat: main.c netstat.h
Log Message:
Avoid common symbol definitions.
To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.51 -r1.52 src/usr.bin/netstat/netstat.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/netstat/main.c
diff -u src/usr.bin/netstat/main.c:1.99 src/usr.bin/netstat/main.c:1.100
--- src/usr.bin/netstat/main.c:1.99 Thu Jul 14 20:13:10 2016
+++ src/usr.bin/netstat/main.c Thu Apr 23 00:24:50 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.99 2016/07/14 20:13:10 christos Exp $ */
+/* $NetBSD: main.c,v 1.100 2020/04/23 00:24:50 joerg Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
#if 0
static char sccsid[] = "from: @(#)main.c 8.4 (Berkeley) 3/1/94";
#else
-__RCSID("$NetBSD: main.c,v 1.99 2016/07/14 20:13:10 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.100 2020/04/23 00:24:50 joerg Exp $");
#endif
#endif /* not lint */
@@ -67,6 +67,38 @@ __RCSID("$NetBSD: main.c,v 1.99 2016/07/
#include "rtutil.h"
#include "prog_ops.h"
+int Aflag;
+int aflag;
+int Bflag;
+int bflag;
+int dflag;
+#ifndef SMALL
+int gflag;
+#endif
+int hflag;
+int iflag;
+int Lflag;
+int lflag;
+int mflag;
+int numeric_addr;
+int numeric_port;
+int nflag;
+int Pflag;
+int pflag;
+int qflag;
+int rflag;
+int sflag;
+int tagflag;
+int tflag;
+int Vflag;
+int vflag;
+
+char *interface;
+
+int af;
+int use_sysctl;
+int force_sysctl;
+
struct nlist nl[] = {
#define N_MBSTAT 0
{ "_mbstat", 0, 0, 0, 0 },
Index: src/usr.bin/netstat/netstat.h
diff -u src/usr.bin/netstat/netstat.h:1.51 src/usr.bin/netstat/netstat.h:1.52
--- src/usr.bin/netstat/netstat.h:1.51 Thu Nov 6 21:30:09 2014
+++ src/usr.bin/netstat/netstat.h Thu Apr 23 00:24:50 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: netstat.h,v 1.51 2014/11/06 21:30:09 christos Exp $ */
+/* $NetBSD: netstat.h,v 1.52 2020/04/23 00:24:50 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -34,37 +34,37 @@
#include <sys/cdefs.h>
#include <kvm.h>
-int Aflag; /* show addresses of protocol control block */
-int aflag; /* show all sockets (including servers) */
-int Bflag; /* show Berkeley Packet Filter information */
-int bflag; /* show i/f byte stats */
-int dflag; /* show i/f dropped packets */
+extern int Aflag; /* show addresses of protocol control block */
+extern int aflag; /* show all sockets (including servers) */
+extern int Bflag; /* show Berkeley Packet Filter information */
+extern int bflag; /* show i/f byte stats */
+extern int dflag; /* show i/f dropped packets */
#ifndef SMALL
-int gflag; /* show group (multicast) routing or stats */
+extern int gflag; /* show group (multicast) routing or stats */
#endif
-int hflag; /* humanize byte counts */
-int iflag; /* show interfaces */
-int Lflag; /* don't show LLINFO entries */
-int lflag; /* show routing table with use and ref */
-int mflag; /* show memory stats */
-int numeric_addr; /* show addresses numerically */
-int numeric_port; /* show ports numerically */
-int nflag; /* same as above, for show.c compat */
-int Pflag; /* dump a PCB */
-int pflag; /* show given protocol */
-int qflag; /* show softintrq */
-int rflag; /* show routing tables (or routing stats) */
-int sflag; /* show protocol statistics */
-int tagflag; /* show route tags */
-int tflag; /* show i/f watchdog timers */
-int Vflag; /* show Vestigial TIME_WAIT (VTW) information */
-int vflag; /* verbose route information or don't truncate names */
-
-char *interface; /* desired i/f for stats, or NULL for all i/fs */
-
-int af; /* address family */
-int use_sysctl; /* use sysctl instead of kmem */
-int force_sysctl; /* force use of sysctl (or exit) - for testing */
+extern int hflag; /* humanize byte counts */
+extern int iflag; /* show interfaces */
+extern int Lflag; /* don't show LLINFO entries */
+extern int lflag; /* show routing table with use and ref */
+extern int mflag; /* show memory stats */
+extern int numeric_addr; /* show addresses numerically */
+extern int numeric_port; /* show ports numerically */
+extern int nflag; /* same as above, for show.c compat */
+extern int Pflag; /* dump a PCB */
+extern int pflag; /* show given protocol */
+extern int qflag; /* show softintrq */
+extern int rflag; /* show routing tables (or routing stats) */
+extern int sflag; /* show protocol statistics */
+extern int tagflag; /* show route tags */
+extern int tflag; /* show i/f watchdog timers */
+extern int Vflag; /* show Vestigial TIME_WAIT (VTW) information */
+extern int vflag; /* verbose route information or don't truncate names */
+
+extern char *interface; /* desired i/f for stats, or NULL for all i/fs */
+
+extern int af; /* address family */
+extern int use_sysctl; /* use sysctl instead of kmem */
+extern int force_sysctl; /* force use of sysctl (or exit) - for testing */
int kread(u_long addr, char *buf, int size);