CVS commit: [netbsd-8] src/usr.bin/netstat

2023-01-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jan 19 10:55:47 UTC 2023

Modified Files:
src/usr.bin/netstat [netbsd-8]: netstat.1

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1785):

usr.bin/netstat/netstat.1: revision 1.76

Add note about "netstat -mssv".


To generate a diff of this commit:
cvs rdiff -u -r1.73.8.1 -r1.73.8.2 src/usr.bin/netstat/netstat.1

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/netstat.1
diff -u src/usr.bin/netstat/netstat.1:1.73.8.1 src/usr.bin/netstat/netstat.1:1.73.8.2
--- src/usr.bin/netstat/netstat.1:1.73.8.1	Mon Sep 12 14:29:19 2022
+++ src/usr.bin/netstat/netstat.1	Thu Jan 19 10:55:47 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: netstat.1,v 1.73.8.1 2022/09/12 14:29:19 martin Exp $
+.\"	$NetBSD: netstat.1,v 1.73.8.2 2023/01/19 10:55:47 martin Exp $
 .\"
 .\" Copyright (c) 1983, 1990, 1992, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)netstat.1	8.8 (Berkeley) 4/18/94
 .\"
-.Dd July 21, 2020
+.Dd December 21, 2022
 .Dt NETSTAT 1
 .Os
 .Sh NAME
@@ -239,6 +239,12 @@ is used.
 .It Fl m
 Show statistics recorded by the mbuf memory management routines
 (the network manages a private pool of memory buffers).
+If the kernel option
+.Cd options MBUFTRACE
+is set, extra info can be retrieved with
+.Fl mssv .
+See also
+.Xr options 4 .
 .It Fl N Ar system
 Use
 .Xr kvm 3
@@ -436,6 +442,7 @@ And the fifth character shows the header
 .Xr kvm_openfiles 3 ,
 .Xr sysctl 3 ,
 .Xr bpf 4 ,
+.Xr options 4 ,
 .Xr route 4 ,
 .Xr hosts 5 ,
 .Xr networks 5 ,



CVS commit: [netbsd-8] src/usr.bin/netstat

2023-01-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jan 19 10:55:47 UTC 2023

Modified Files:
src/usr.bin/netstat [netbsd-8]: netstat.1

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1785):

usr.bin/netstat/netstat.1: revision 1.76

Add note about "netstat -mssv".


To generate a diff of this commit:
cvs rdiff -u -r1.73.8.1 -r1.73.8.2 src/usr.bin/netstat/netstat.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/usr.bin/netstat

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:29:20 UTC 2022

Modified Files:
src/usr.bin/netstat [netbsd-8]: atalk.c bpf.c fast_ipsec.c if.c inet.c
inet6.c main.c mbuf.c mroute.c mroute6.c netstat.1 netstat.h
pfkey.c pfsync.c route.c unix.c vtw.c

Log Message:
Pull up the following, requested by msaitoh in ticket #1762:

usr.bin/netstat/atalk.c 1.18,1.20-1.21
usr.bin/netstat/bpf.c   1.16 via patch
usr.bin/netstat/fast_ipsec.c1.24 via patch
usr.bin/netstat/if.c1.97-1.99,1.101-1.104 via patch
usr.bin/netstat/inet.c  1.111,1.115-1.116 via patch
usr.bin/netstat/inet6.c 1.70,1.74-1.75,1.80-1.81 via patch
usr.bin/netstat/main.c  1.100,1.102-1.103
usr.bin/netstat/mbuf.c  1.34-1.35
usr.bin/netstat/mroute.c1.26-1.27
usr.bin/netstat/mroute6.c   1.16
usr.bin/netstat/netstat.h   1.52-1.53
usr.bin/netstat/pfkey.c 1.4-1.5 via patch
usr.bin/netstat/pfsync.c1.4-1.5 via patch
usr.bin/netstat/route.c 1.87-1.88
usr.bin/netstat/unix.c  1.36-1.37
usr.bin/netstat/vtw.c   1.11,1.13

- Add names of a few more ICMPv6 messages.
  Also make the array be explicitly 256 entries long.
- sprintf() -> snprintf(), and adjust a buffer size to avoid any
  potential for overflow.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
  if the feature isn't enabled.
- Print oqdrops correctly.
- netstat.1: Add various xrefs present in the body to "See Also".
- Limit maximum owner name to appease gcc.
- KNF. Style fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.8.1 src/usr.bin/netstat/atalk.c
cvs rdiff -u -r1.11 -r1.11.22.1 src/usr.bin/netstat/bpf.c
cvs rdiff -u -r1.21.4.1 -r1.21.4.2 src/usr.bin/netstat/fast_ipsec.c
cvs rdiff -u -r1.94.4.1 -r1.94.4.2 src/usr.bin/netstat/if.c
cvs rdiff -u -r1.107 -r1.107.6.1 src/usr.bin/netstat/inet.c
cvs rdiff -u -r1.69 -r1.69.6.1 src/usr.bin/netstat/inet6.c
cvs rdiff -u -r1.99 -r1.99.8.1 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.33 -r1.33.8.1 src/usr.bin/netstat/mbuf.c
cvs rdiff -u -r1.25 -r1.25.8.1 src/usr.bin/netstat/mroute.c
cvs rdiff -u -r1.15 -r1.15.8.1 src/usr.bin/netstat/mroute6.c
cvs rdiff -u -r1.73 -r1.73.8.1 src/usr.bin/netstat/netstat.1
cvs rdiff -u -r1.51 -r1.51.8.1 src/usr.bin/netstat/netstat.h
cvs rdiff -u -r1.1 -r1.1.34.1 src/usr.bin/netstat/pfkey.c
cvs rdiff -u -r1.1 -r1.1.38.1 src/usr.bin/netstat/pfsync.c
cvs rdiff -u -r1.85 -r1.85.8.1 src/usr.bin/netstat/route.c
cvs rdiff -u -r1.35 -r1.35.6.1 src/usr.bin/netstat/unix.c
cvs rdiff -u -r1.9 -r1.9.8.1 src/usr.bin/netstat/vtw.c

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/atalk.c
diff -u src/usr.bin/netstat/atalk.c:1.16 src/usr.bin/netstat/atalk.c:1.16.8.1
--- src/usr.bin/netstat/atalk.c:1.16	Sat Jun  6 13:08:31 2015
+++ src/usr.bin/netstat/atalk.c	Mon Sep 12 14:29:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: atalk.c,v 1.16 2015/06/06 13:08:31 joerg Exp $	*/
+/*	$NetBSD: atalk.c,v 1.16.8.1 2022/09/12 14:29:19 martin Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from @(#)atalk.c	1.1 (Whistle) 6/6/96";
 #else
-__RCSID("$NetBSD: atalk.c,v 1.16 2015/06/06 13:08:31 joerg Exp $");
+__RCSID("$NetBSD: atalk.c,v 1.16.8.1 2022/09/12 14:29:19 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -62,9 +62,6 @@ __RCSID("$NetBSD: atalk.c,v 1.16 2015/06
 #include 
 #include "netstat.h"
 
-struct ddpcbddpcb;
-struct socket   sockb;
-
 static int first = 1;
 
 /*
@@ -84,11 +81,12 @@ at_pr_net(const struct sockaddr_at *sat,
 		case 0x:
 			return "";
 		case ATADDR_ANYNET:
-			return ("*");
+			return "*";
 		}
 	}
-	(void)snprintf(mybuf, sizeof(mybuf), "%hu", ntohs(sat->sat_addr.s_net));
-	return (mybuf);
+	(void)snprintf(mybuf, sizeof(mybuf), "%hu",
+	ntohs(sat->sat_addr.s_net));
+	return mybuf;
 }
 
 static const char *
@@ -101,12 +99,12 @@ at_pr_host(const struct sockaddr_at *sat
 		case ATADDR_BCAST:
 			return "bcast";
 		case ATADDR_ANYNODE:
-			return ("*");
+			return "*";
 		}
 	}
-	(void)snprintf(mybuf, sizeof(mybuf), "%d", 
+	(void)snprintf(mybuf, sizeof(mybuf), "%d",
 	(unsigned int)sat->sat_addr.s_node);
-	return (mybuf);
+	return mybuf;
 }
 
 static const char *
@@ -116,13 +114,13 @@ at_pr_port(const struct sockaddr_at *sat
 
 	switch (sat->sat_port) {
 	case ATADDR_ANYPORT:
-		return ("*");
+		return "*";
 	case 0xff:
 		return "";
 	default:
 		(void)snprintf(mybuf, sizeof(mybuf), "%d",
 		(unsigned int)sat->sat_port);
-		return (mybuf);
+		return mybuf;
 	}
 }
 
@@ -140,7 +138,7 @@ at_pr_range(const struct sockaddr_at *sa
 		(void)snprintf(mybuf, sizeof(mybuf), "%d",
 			

CVS commit: [netbsd-8] src/usr.bin/netstat

2022-09-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 12 14:29:20 UTC 2022

Modified Files:
src/usr.bin/netstat [netbsd-8]: atalk.c bpf.c fast_ipsec.c if.c inet.c
inet6.c main.c mbuf.c mroute.c mroute6.c netstat.1 netstat.h
pfkey.c pfsync.c route.c unix.c vtw.c

Log Message:
Pull up the following, requested by msaitoh in ticket #1762:

usr.bin/netstat/atalk.c 1.18,1.20-1.21
usr.bin/netstat/bpf.c   1.16 via patch
usr.bin/netstat/fast_ipsec.c1.24 via patch
usr.bin/netstat/if.c1.97-1.99,1.101-1.104 via patch
usr.bin/netstat/inet.c  1.111,1.115-1.116 via patch
usr.bin/netstat/inet6.c 1.70,1.74-1.75,1.80-1.81 via patch
usr.bin/netstat/main.c  1.100,1.102-1.103
usr.bin/netstat/mbuf.c  1.34-1.35
usr.bin/netstat/mroute.c1.26-1.27
usr.bin/netstat/mroute6.c   1.16
usr.bin/netstat/netstat.h   1.52-1.53
usr.bin/netstat/pfkey.c 1.4-1.5 via patch
usr.bin/netstat/pfsync.c1.4-1.5 via patch
usr.bin/netstat/route.c 1.87-1.88
usr.bin/netstat/unix.c  1.36-1.37
usr.bin/netstat/vtw.c   1.11,1.13

- Add names of a few more ICMPv6 messages.
  Also make the array be explicitly 256 entries long.
- sprintf() -> snprintf(), and adjust a buffer size to avoid any
  potential for overflow.
- Add missing {IP,IP6}_STAT_NOIPSEC to netstat.
- Don't show any of the completely and utterly undocumented VTW info
  if the feature isn't enabled.
- Print oqdrops correctly.
- netstat.1: Add various xrefs present in the body to "See Also".
- Limit maximum owner name to appease gcc.
- KNF. Style fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.8.1 src/usr.bin/netstat/atalk.c
cvs rdiff -u -r1.11 -r1.11.22.1 src/usr.bin/netstat/bpf.c
cvs rdiff -u -r1.21.4.1 -r1.21.4.2 src/usr.bin/netstat/fast_ipsec.c
cvs rdiff -u -r1.94.4.1 -r1.94.4.2 src/usr.bin/netstat/if.c
cvs rdiff -u -r1.107 -r1.107.6.1 src/usr.bin/netstat/inet.c
cvs rdiff -u -r1.69 -r1.69.6.1 src/usr.bin/netstat/inet6.c
cvs rdiff -u -r1.99 -r1.99.8.1 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.33 -r1.33.8.1 src/usr.bin/netstat/mbuf.c
cvs rdiff -u -r1.25 -r1.25.8.1 src/usr.bin/netstat/mroute.c
cvs rdiff -u -r1.15 -r1.15.8.1 src/usr.bin/netstat/mroute6.c
cvs rdiff -u -r1.73 -r1.73.8.1 src/usr.bin/netstat/netstat.1
cvs rdiff -u -r1.51 -r1.51.8.1 src/usr.bin/netstat/netstat.h
cvs rdiff -u -r1.1 -r1.1.34.1 src/usr.bin/netstat/pfkey.c
cvs rdiff -u -r1.1 -r1.1.38.1 src/usr.bin/netstat/pfsync.c
cvs rdiff -u -r1.85 -r1.85.8.1 src/usr.bin/netstat/route.c
cvs rdiff -u -r1.35 -r1.35.6.1 src/usr.bin/netstat/unix.c
cvs rdiff -u -r1.9 -r1.9.8.1 src/usr.bin/netstat/vtw.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.