From owner-p4-projects@FreeBSD.ORG Thu Jul 30 23:01:35 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2323E1065674; Thu, 30 Jul 2009 23:01:35 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D47691065672 for ; Thu, 30 Jul 2009 23:01:34 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C256D8FC12 for ; Thu, 30 Jul 2009 23:01:34 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6UN1YXX043207 for ; Thu, 30 Jul 2009 23:01:34 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6UN1Yma043205 for perforce@freebsd.org; Thu, 30 Jul 2009 23:01:34 GMT (envelope-from pgj@FreeBSD.org) Date: Thu, 30 Jul 2009 23:01:34 GMT Message-Id: <200907302301.n6UN1Yma043205@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 166844 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 23:01:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=166844 Change 166844 by pgj@petymeg-current on 2009/07/30 23:01:24 Add header for IPcomp statistics. Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ipcomp_var.h#2 edit .. //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/xform_ipcomp.c#2 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ipcomp_var.h#2 (text+ko) ==== @@ -41,6 +41,8 @@ */ #define IPCOMP_ALG_MAX 8 +#define IPCOMPSTAT_VERSION 0x00000001 + struct ipcompstat { u_int32_t ipcomps_hdrops; /* Packet shorter than header shows */ u_int32_t ipcomps_nopf; /* Protocol family not supported */ ==== //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/xform_ipcomp.c#2 (text+ko) ==== @@ -42,11 +42,13 @@ #include #include #include +#include #include #include #include #include +#include #include #include @@ -69,14 +71,22 @@ #ifdef VIMAGE_GLOBALS int ipcomp_enable; +struct stat_header ipcompstat_header = { + .sth_version = IPCOMPSTAT_VERSION, + .sth_len = sizeof(struct ipcompstat) +}; struct ipcompstat ipcompstat; #endif SYSCTL_DECL(_net_inet_ipcomp); SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ipcomp, OID_AUTO, ipcomp_enable, CTLFLAG_RW, ipcomp_enable, 0, ""); + SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ipcomp, IPSECCTL_STATS, - stats, CTLFLAG_RD, ipcompstat, ipcompstat, ""); + stats, CTLFLAG_RW, ipcompstat, ipcompstat, ""); + +SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ipcomp, OID_AUTO, + stats_header, CTLFLAG_RD, ipcompstat_header, stat_header, ""); static int ipcomp_input_cb(struct cryptop *crp); static int ipcomp_output_cb(struct cryptop *crp);