From owner-p4-projects@FreeBSD.ORG Fri Jul 31 00:01:41 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25D291065673; Fri, 31 Jul 2009 00:01:41 +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 D852D106566C for ; Fri, 31 Jul 2009 00:01:40 +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 C67848FC12 for ; Fri, 31 Jul 2009 00:01:40 +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 n6V01erH050061 for ; Fri, 31 Jul 2009 00:01:40 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6V01ewh050059 for perforce@freebsd.org; Fri, 31 Jul 2009 00:01:40 GMT (envelope-from pgj@FreeBSD.org) Date: Fri, 31 Jul 2009 00:01:40 GMT Message-Id: <200907310001.n6V01ewh050059@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 166847 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: Fri, 31 Jul 2009 00:01:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=166847 Change 166847 by pgj@petymeg-current on 2009/07/31 00:00:46 Add header for IPsec statistics. Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ipsec.c#3 edit .. //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ipsec.h#3 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ipsec.c#3 (text+ko) ==== @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,10 @@ #ifdef VIMAGE_GLOBALS /* NB: name changed so netstat doesn't use it. */ +struct stat_header ipsecstat_header = { + .sth_version = IPSECSTAT_VERSION, + .sth_len = sizeof(struct ipsecstat) +}; struct ipsecstat ipsec4stat; struct secpolicy ip4_def_policy; int ipsec_debug; @@ -165,8 +170,11 @@ crypto_support, CTLFLAG_RW, crypto_support,0, "Crypto driver selection."); SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ipsec, OID_AUTO, - ipsecstats, CTLFLAG_RD, ipsec4stat, ipsecstat, + ipsecstats, CTLFLAG_RW, ipsec4stat, ipsecstat, "IPsec IPv4 statistics."); +SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ipsec, OID_AUTO, + ipsecstats_header, CTLFLAG_RD, ipsecstat_header, stat_header, + "IPsec IPv4 statistics header."); SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ipsec, OID_AUTO, filtertunnel, CTLFLAG_RW, ip4_ipsec_filtertunnel, 0, "If set filter packets from an IPsec tunnel."); ==== //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ipsec.h#3 (text+ko) ==== @@ -212,36 +212,38 @@ #define IPSEC_REPLAYWSIZE 32 /* statistics for ipsec processing */ +#define IPSECSTAT_VERSION 0x00000001 + struct ipsecstat { - u_quad_t in_success; /* succeeded inbound process */ - u_quad_t in_polvio; + u_int64_t in_success; /* succeeded inbound process */ + u_int64_t in_polvio; /* security policy violation for inbound process */ - u_quad_t in_nosa; /* inbound SA is unavailable */ - u_quad_t in_inval; /* inbound processing failed due to EINVAL */ - u_quad_t in_nomem; /* inbound processing failed due to ENOBUFS */ - u_quad_t in_badspi; /* failed getting a SPI */ - u_quad_t in_ahreplay; /* AH replay check failed */ - u_quad_t in_espreplay; /* ESP replay check failed */ - u_quad_t in_ahauthsucc; /* AH authentication success */ - u_quad_t in_ahauthfail; /* AH authentication failure */ - u_quad_t in_espauthsucc; /* ESP authentication success */ - u_quad_t in_espauthfail; /* ESP authentication failure */ - u_quad_t in_esphist[256]; - u_quad_t in_ahhist[256]; - u_quad_t in_comphist[256]; - u_quad_t out_success; /* succeeded outbound process */ - u_quad_t out_polvio; + u_int64_t in_nosa; /* inbound SA is unavailable */ + u_int64_t in_inval; /* inbound processing failed due to EINVAL */ + u_int64_t in_nomem; /* inbound processing failed due to ENOBUFS */ + u_int64_t in_badspi; /* failed getting a SPI */ + u_int64_t in_ahreplay; /* AH replay check failed */ + u_int64_t in_espreplay; /* ESP replay check failed */ + u_int64_t in_ahauthsucc; /* AH authentication success */ + u_int64_t in_ahauthfail; /* AH authentication failure */ + u_int64_t in_espauthsucc; /* ESP authentication success */ + u_int64_t in_espauthfail; /* ESP authentication failure */ + u_int64_t in_esphist[256]; + u_int64_t in_ahhist[256]; + u_int64_t in_comphist[256]; + u_int64_t out_success; /* succeeded outbound process */ + u_int64_t out_polvio; /* security policy violation for outbound process */ - u_quad_t out_nosa; /* outbound SA is unavailable */ - u_quad_t out_inval; /* outbound process failed due to EINVAL */ - u_quad_t out_nomem; /* inbound processing failed due to ENOBUFS */ - u_quad_t out_noroute; /* there is no route */ - u_quad_t out_esphist[256]; - u_quad_t out_ahhist[256]; - u_quad_t out_comphist[256]; + u_int64_t out_nosa; /* outbound SA is unavailable */ + u_int64_t out_inval; /* outbound process failed due to EINVAL */ + u_int64_t out_nomem; /* inbound processing failed due to ENOBUFS */ + u_int64_t out_noroute; /* there is no route */ + u_int64_t out_esphist[256]; + u_int64_t out_ahhist[256]; + u_int64_t out_comphist[256]; - u_quad_t spdcachelookup; - u_quad_t spdcachemiss; + u_int64_t spdcachelookup; + u_int64_t spdcachemiss; u_int32_t ips_in_polvio; /* input: sec policy violation */ u_int32_t ips_out_polvio; /* output: sec policy violation */