Export ipstat via sysctl. Don't understand why this wasn't done before.

This commit is contained in:
Garrett Wollman 1997-09-25 00:34:35 +00:00
parent dc7d1ba0c0
commit 6fce01c990
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29838
2 changed files with 7 additions and 3 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.h 8.3 (Berkeley) 1/3/94
* $Id$
* $Id: in.h,v 1.26 1997/02/22 09:41:28 peter Exp $
*/
#ifndef _NETINET_IN_H_
@ -302,7 +302,8 @@ struct ip_mreq {
#define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */
#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */
#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */
#define IPCTL_MAXID 12
#define IPCTL_STATS 12 /* ipstat structure */
#define IPCTL_MAXID 13
#define IPCTL_NAMES { \
{ 0, 0 }, \
@ -317,6 +318,7 @@ struct ip_mreq {
{ "directed-broadcast", CTLTYPE_INT }, \
{ "intr-queue-maxlen", CTLTYPE_INT }, \
{ "intr-queue-drops", CTLTYPE_INT }, \
{ "stats", CTLTYPE_STRUCT }, \
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
* $Id: ip_input.c,v 1.64 1997/07/25 03:58:21 brian Exp $
* $Id: ip_input.c,v 1.65 1997/09/15 23:07:01 ache Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@ -110,6 +110,8 @@ SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, CTLFLAG_RD,
&ipintrq.ifq_drops, 0, "");
struct ipstat ipstat;
SYSCTL_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RD,
&ipstat, ipstat, "");
/* Packet reassembly stuff */
#define IPREASS_NHASH_LOG2 6