summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2007-12-13 20:00:53 +0000
committerreyk <reyk@openbsd.org>2007-12-13 20:00:53 +0000
commit5000ee89c8e051880c2651e17fd3b27aeb0c4917 (patch)
treee22d43093e0cb4920671131fd4e71aa5515b8201 /lib/libc
parentSync with the mvme188 codebase, various tweaks from the last 18 months which (diff)
downloadwireguard-openbsd-5000ee89c8e051880c2651e17fd3b27aeb0c4917.tar.xz
wireguard-openbsd-5000ee89c8e051880c2651e17fd3b27aeb0c4917.zip
implement sysctls to report IP, TCP, UDP, and ICMP statistics and
change netstat to use them instead of accessing kvm for it. more protocols will be added later. discussed with deraadt@ claudio@ gilles@ ok deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/sysctl.316
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 73f7efe7888..125814d387a 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.3,v 1.175 2007/09/25 16:12:27 jmc Exp $
+.\" $OpenBSD: sysctl.3,v 1.176 2007/12/13 20:00:53 reyk Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: September 25 2007 $
+.Dd $Mdocdate: December 13 2007 $
.Dt SYSCTL 3
.Os
.Sh NAME
@@ -1095,6 +1095,7 @@ The currently defined protocols and names are:
.It icmp maskrepl integer yes
.It icmp rediraccept integer yes
.It icmp redirtimeout integer yes
+.It icmp stats structure no
.It icmp tstamprepl integer yes
.It ip directed-broadcast integer yes
.It ip encdebug integer yes
@@ -1124,6 +1125,7 @@ The currently defined protocols and names are:
.It ip portlast integer yes
.It ip redirect integer yes
.It ip sourceroute integer yes
+.It ip stats structure no
.It ip ttl integer yes
.It ipcomp enable integer yes
.It ipip allow integer yes
@@ -1144,12 +1146,14 @@ The currently defined protocols and names are:
.It tcp sack integer yes
.It tcp sendspace integer yes
.It tcp slowhz integer no
+.It tcp stats structure no
.It tcp synbucketlimit integer yes
.It tcp syncachelimit integer yes
.It udp baddynamic array yes
.It udp checksum integer yes
.It udp recvspace integer yes
.It udp sendspace integer yes
+.It udp stats structure no
.El
.Pp
The variables are as follows:
@@ -1248,6 +1252,8 @@ and the variable is meaningful on IP hosts only.
This variable specifies the lifetime of routing entries generated by incoming
ICMP redirects.
The default timeout is 10 minutes.
+.It Li icmp.stats
+Returns the ICMP statistics in a struct icmpstat.
.It Li icmp.tstamprepl
If set to 1, reply to ICMP timestamp requests.
If set to 0, ignore timestamp requests.
@@ -1434,6 +1440,8 @@ the host.
As detailed in
.Xr securelevel 7 ,
this variable may not be changed if the securelevel is \*(Gt 0.
+.It Li ip.stats
+Returns the IP statistics in a struct ipstat.
.It Li ip.ttl
The maximum time-to-live (hop count) value for an
.Tn IP
@@ -1527,6 +1535,8 @@ The units for tcp.keepidle and tcp.keepintvl; those variables are in ticks
of a clock that ticks tcp.slowhz times per second.
(That is, their values must be divided by the tcp.slowhz value to get times
in seconds.)
+.It Li tcp.stats
+Returns the TCP statistics in a struct tcpstat.
.It Li tcp.synbucketlimit
The maximum number of entries allowed per hash bucket in the TCP SYN cache.
.It Li tcp.syncachelimit
@@ -1552,6 +1562,8 @@ receive buffer size.
Returns the default
.Tn UDP
send buffer size.
+.It Li udp.stats
+Returns the UDP statistics in a struct udpstat.
.El
.It Dv PF_INET6
Get or set various global information about IPv6