summaryrefslogtreecommitdiff
path: root/usr.bin/netstat
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/if.c4
-rw-r--r--usr.bin/netstat/inet.c5
-rw-r--r--usr.bin/netstat/inet6.c7
-rw-r--r--usr.bin/netstat/main.c4
-rw-r--r--usr.bin/netstat/mbuf.c4
-rw-r--r--usr.bin/netstat/mroute.c4
-rw-r--r--usr.bin/netstat/mroute6.c4
-rw-r--r--usr.bin/netstat/net80211.c4
-rw-r--r--usr.bin/netstat/route.c4
-rw-r--r--usr.bin/netstat/show.c8
-rw-r--r--usr.bin/netstat/unix.c4
11 files changed, 26 insertions, 26 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 90e392da783..675f33f3982 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.69 2014/11/21 17:49:00 mikeb Exp $ */
+/* $OpenBSD: if.c,v 1.70 2015/01/16 06:40:09 deraadt Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* roundup() */
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/protosw.h>
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c
index cfebd8fe33d..af3d0a76582 100644
--- a/usr.bin/netstat/inet.c
+++ b/usr.bin/netstat/inet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet.c,v 1.137 2014/11/03 17:20:46 bluhm Exp $ */
+/* $OpenBSD: inet.c,v 1.138 2015/01/16 06:40:09 deraadt Exp $ */
/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */
/*
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -802,7 +801,7 @@ inetname(struct in_addr *inp)
char *cp;
static char line[50];
struct hostent *hp;
- static char domain[MAXHOSTNAMELEN];
+ static char domain[HOST_NAME_MAX+1];
static int first = 1;
if (first && !nflag) {
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index a321ae369cc..124e28cd57a 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet6.c,v 1.46 2014/08/14 12:55:50 mpi Exp $ */
+/* $OpenBSD: inet6.c,v 1.47 2015/01/16 06:40:10 deraadt Exp $ */
/* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */
/*
* Copyright (c) 1983, 1988, 1993
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/ioctl.h>
@@ -60,6 +60,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "netstat.h"
struct socket sockb;
@@ -1113,7 +1114,7 @@ inet6name(struct in6_addr *in6p)
char *cp;
static char line[NI_MAXHOST];
struct hostent *hp;
- static char domain[MAXHOSTNAMELEN];
+ static char domain[HOST_NAME_MAX+1];
static int first = 1;
char hbuf[NI_MAXHOST];
struct sockaddr_in6 sin6;
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index f3074c99ef9..5b0eb1f0bec 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.102 2014/10/23 16:45:57 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.103 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c
index 38e784fb80b..5d19182215a 100644
--- a/usr.bin/netstat/mbuf.c
+++ b/usr.bin/netstat/mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbuf.c,v 1.33 2014/11/06 12:50:55 dlg Exp $ */
+/* $OpenBSD: mbuf.c,v 1.34 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: mbuf.c,v 1.9 1996/05/07 02:55:03 thorpej Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* MSIZE */
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/mbuf.h>
diff --git a/usr.bin/netstat/mroute.c b/usr.bin/netstat/mroute.c
index 97f9275f988..48d5bee3bae 100644
--- a/usr.bin/netstat/mroute.c
+++ b/usr.bin/netstat/mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mroute.c,v 1.22 2014/08/14 12:34:04 mpi Exp $ */
+/* $OpenBSD: mroute.c,v 1.23 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: mroute.c,v 1.10 1996/05/11 13:51:27 mycroft Exp $ */
/*
@@ -42,7 +42,7 @@
* MROUTING 1.0
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/protosw.h>
diff --git a/usr.bin/netstat/mroute6.c b/usr.bin/netstat/mroute6.c
index 438d04b17c7..79f824b8026 100644
--- a/usr.bin/netstat/mroute6.c
+++ b/usr.bin/netstat/mroute6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mroute6.c,v 1.14 2014/11/21 17:49:00 mikeb Exp $ */
+/* $OpenBSD: mroute6.c,v 1.15 2015/01/16 06:40:10 deraadt Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -64,7 +64,7 @@
* @(#)mroute.c 8.2 (Berkeley) 4/28/95
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/protosw.h>
diff --git a/usr.bin/netstat/net80211.c b/usr.bin/netstat/net80211.c
index 6cf8a4413f6..07129060b08 100644
--- a/usr.bin/netstat/net80211.c
+++ b/usr.bin/netstat/net80211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net80211.c,v 1.12 2014/11/21 17:49:00 mikeb Exp $ */
+/* $OpenBSD: net80211.c,v 1.13 2015/01/16 06:40:10 deraadt Exp $ */
/*
* Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org>
@@ -16,7 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/file.h>
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 004d2794410..dabfdcc0a9d 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.94 2014/12/26 05:47:23 tedu Exp $ */
+/* $OpenBSD: route.c,v 1.95 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/protosw.h>
#include <sys/socket.h>
diff --git a/usr.bin/netstat/show.c b/usr.bin/netstat/show.c
index e27e30198e1..8099bfcb182 100644
--- a/usr.bin/netstat/show.c
+++ b/usr.bin/netstat/show.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: show.c,v 1.43 2014/10/23 16:45:57 schwarze Exp $ */
+/* $OpenBSD: show.c,v 1.44 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */
/*
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
@@ -53,6 +52,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "netstat.h"
@@ -563,8 +563,8 @@ p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width)
}
}
-static char line[MAXHOSTNAMELEN];
-static char domain[MAXHOSTNAMELEN];
+static char line[HOST_NAME_MAX+1];
+static char domain[HOST_NAME_MAX+1];
void
p_sockaddr_mpls(struct sockaddr *in, struct sockaddr *out, int flags, int width)
diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c
index e92a88bf5f3..c422a30b6b6 100644
--- a/usr.bin/netstat/unix.c
+++ b/usr.bin/netstat/unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.c,v 1.23 2014/07/10 14:08:13 deraadt Exp $ */
+/* $OpenBSD: unix.c,v 1.24 2015/01/16 06:40:10 deraadt Exp $ */
/* $NetBSD: unix.c,v 1.13 1995/10/03 21:42:48 thorpej Exp $ */
/*-
@@ -33,7 +33,7 @@
/*
* Display protocol blocks in the unix domain.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* MSIZE */
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/socketvar.h>