Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 Implement net.inet6.udp6.stats.



details:   https://anonhg.NetBSD.org/src/rev/b3fbb74ccaa3
branches:  trunk
changeset: 583907:b3fbb74ccaa3
user:      rpaulo <rpaulo%NetBSD.org@localhost>
date:      Sun Aug 28 21:01:02 2005 +0000

description:
Implement net.inet6.udp6.stats.

Reviewed by Elad Efrat.

diffstat:

 sys/netinet6/udp6_usrreq.c |  11 +++++++++--
 sys/netinet6/udp6_var.h    |   8 +++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diffs (62 lines):

diff -r c8d83eec888b -r b3fbb74ccaa3 sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c        Sun Aug 28 20:58:14 2005 +0000
+++ b/sys/netinet6/udp6_usrreq.c        Sun Aug 28 21:01:02 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udp6_usrreq.c,v 1.69 2005/08/10 13:06:49 yamt Exp $    */
+/*     $NetBSD: udp6_usrreq.c,v 1.70 2005/08/28 21:01:02 rpaulo Exp $  */
 /*     $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $    */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.69 2005/08/10 13:06:49 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.70 2005/08/28 21:01:02 rpaulo Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -460,4 +460,11 @@
                       sysctl_inpcblist, 0, &udbtable, 0,
                       CTL_NET, PF_INET6, IPPROTO_UDP, CTL_CREATE,
                       CTL_EOL);
+       sysctl_createv(clog, 0, NULL, NULL,
+                      CTLFLAG_PERMANENT,
+                      CTLTYPE_STRUCT, "stats",
+                      SYSCTL_DESCR("UDPv6 statistics"),
+                      NULL, 0, &udp6stat, sizeof(udp6stat),
+                      CTL_NET, PF_INET6, IPPROTO_UDP, UDP6CTL_STATS,
+                      CTL_EOL);
 }
diff -r c8d83eec888b -r b3fbb74ccaa3 sys/netinet6/udp6_var.h
--- a/sys/netinet6/udp6_var.h   Sun Aug 28 20:58:14 2005 +0000
+++ b/sys/netinet6/udp6_var.h   Sun Aug 28 21:01:02 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udp6_var.h,v 1.16 2004/12/15 04:25:21 thorpej Exp $    */
+/*     $NetBSD: udp6_var.h,v 1.17 2005/08/28 21:01:02 rpaulo Exp $     */
 /*     $KAME: udp6_var.h,v 1.11 2000/06/05 00:14:31 itojun Exp $       */
 
 /*
@@ -83,18 +83,20 @@
 };
 
 /*
- * Names for UDP sysctl objects
+ * Names for UDP6 sysctl objects
  */
 #define UDP6CTL_SENDSPACE      1       /* default send buffer */
 #define UDP6CTL_RECVSPACE      2       /* default recv buffer */
 #define        UDP6CTL_LOOPBACKCKSUM   3       /* do UDP checksum on loopback? */
-#define UDP6CTL_MAXID          4
+#define UDP6CTL_STATS          4       /* udp6 statistics */
+#define UDP6CTL_MAXID          5
 
 #define UDP6CTL_NAMES { \
        { 0, 0 }, \
        { "sendspace", CTLTYPE_INT }, \
        { "recvspace", CTLTYPE_INT }, \
        { "do_loopback_cksum", CTLTYPE_INT }, \
+       { "stats", CTLTYPE_STRUCT }, \
 }
 
 #ifdef _KERNEL



Home | Main Index | Thread Index | Old Index