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.ip6.stats sysctl.



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

description:
Implement net.inet6.ip6.stats sysctl.

Reviewed by Elad Efrat.

diffstat:

 sys/netinet6/in6.h       |   4 ++--
 sys/netinet6/ip6_input.c |  17 +++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

diffs (61 lines):

diff -r b3fbb74ccaa3 -r 054eaadd6781 sys/netinet6/in6.h
--- a/sys/netinet6/in6.h        Sun Aug 28 21:01:02 2005 +0000
+++ b/sys/netinet6/in6.h        Sun Aug 28 21:01:53 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6.h,v 1.46 2005/08/10 12:58:37 yamt Exp $    */
+/*     $NetBSD: in6.h,v 1.47 2005/08/28 21:01:53 rpaulo Exp $  */
 /*     $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $    */
 
 /*
@@ -551,7 +551,7 @@
        { "hlim", CTLTYPE_INT }, \
        { "mtu", CTLTYPE_INT }, \
        { "forwsrcrt", CTLTYPE_INT }, \
-       { 0, 0 }, \
+       { "stats", CTLTYPE_STRUCT }, \
        { 0, 0 }, \
        { "mrtproto", CTLTYPE_INT }, \
        { "maxfragpackets", CTLTYPE_INT }, \
diff -r b3fbb74ccaa3 -r 054eaadd6781 sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c  Sun Aug 28 21:01:02 2005 +0000
+++ b/sys/netinet6/ip6_input.c  Sun Aug 28 21:01:53 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_input.c,v 1.78 2005/05/29 21:43:51 christos Exp $  */
+/*     $NetBSD: ip6_input.c,v 1.79 2005/08/28 21:01:53 rpaulo Exp $    */
 /*     $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $     */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.78 2005/05/29 21:43:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.79 2005/08/28 21:01:53 rpaulo Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1477,12 +1477,6 @@
                       IPV6CTL_FORWSRCRT, CTL_EOL);
        sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
-                      CTLTYPE_STRUCT, "stats", NULL,
-                      NULL, 0, &?, sizeof(?),
-                      CTL_NET, PF_INET6, IPPROTO_IPV6,
-                      IPV6CTL_STATS, CTL_EOL);
-       sysctl_createv(clog, 0, NULL, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
                       CTLTYPE_STRUCT, "mrtstats", NULL,
                       NULL, 0, &?, sizeof(?),
                       CTL_NET, PF_INET6, IPPROTO_IPV6,
@@ -1647,4 +1641,11 @@
                       NULL, 0, &ip6_maxfrags, 0,
                       CTL_NET, PF_INET6, IPPROTO_IPV6,
                       IPV6CTL_MAXFRAGS, CTL_EOL);
+       sysctl_createv(clog, 0, NULL, NULL,
+                      CTLFLAG_PERMANENT,
+                      CTLTYPE_STRUCT, "stats",
+                      SYSCTL_DESCR("IPv6 statistics"),
+                      NULL, 0, &ip6stat, sizeof(ip6stat),
+                      CTL_NET, PF_INET6, IPPROTO_IPV6,
+                      IPV6CTL_STATS, CTL_EOL);
 }



Home | Main Index | Thread Index | Old Index