summaryrefslogtreecommitdiff
path: root/sys/netinet/udp_var.h
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2007-12-13 20:00:54 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2007-12-13 20:00:54 +0000
commit90654a32a12cd0e30f6adb846ff6e9e5e6682a28 (patch)
treee8f59de8c6fe04c760d9e46528cb22f1da0c1cfc /sys/netinet/udp_var.h
parentb03a990aaf0a66e97ca7dd68b5f8b065d05e4b95 (diff)
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 'sys/netinet/udp_var.h')
-rw-r--r--sys/netinet/udp_var.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h
index 8c385683949..943711bf1e6 100644
--- a/sys/netinet/udp_var.h
+++ b/sys/netinet/udp_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_var.h,v 1.16 2004/02/17 12:07:45 markus Exp $ */
+/* $OpenBSD: udp_var.h,v 1.17 2007/12/13 20:00:53 reyk Exp $ */
/* $NetBSD: udp_var.h,v 1.12 1996/02/13 23:44:41 christos Exp $ */
/*
@@ -77,7 +77,8 @@ struct udpstat {
#define UDPCTL_BADDYNAMIC 2 /* return bad dynamic port bitmap */
#define UDPCTL_RECVSPACE 3 /* receive buffer space */
#define UDPCTL_SENDSPACE 4 /* send buffer space */
-#define UDPCTL_MAXID 5
+#define UDPCTL_STATS 5 /* UDP statistics */
+#define UDPCTL_MAXID 6
#define UDPCTL_NAMES { \
{ 0, 0 }, \
@@ -85,6 +86,7 @@ struct udpstat {
{ "baddynamic", CTLTYPE_STRUCT }, \
{ "recvspace", CTLTYPE_INT }, \
{ "sendspace", CTLTYPE_INT }, \
+ { "stats", CTLTYPE_STRUCT } \
}
#define UDPCTL_VARS { \
@@ -93,6 +95,7 @@ struct udpstat {
NULL, \
&udp_recvspace, \
&udp_sendspace, \
+ NULL \
}
#ifdef _KERNEL