Implement net.inet6.udp6.stats.

Reviewed by Elad Efrat.
This commit is contained in:
rpaulo 2005-08-28 21:01:02 +00:00
parent f4a3f04cb2
commit 151760f5d2
2 changed files with 14 additions and 5 deletions

View File

@ -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_SETUP(sysctl_net_inet6_udp6_setup, "sysctl net.inet6.udp6 subtree setup")
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);
}

View File

@ -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 @@ struct udp6stat {
};
/*
* 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