PERFORCE change 166847 for review
Gabor Pali
pgj at FreeBSD.org
Fri Jul 31 00:01:42 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166847
Change 166847 by pgj at 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 <netinet/udp.h>
#include <netinet/udp_var.h>
#include <netinet/tcp.h>
+#include <netinet/tcp_var.h>
#include <netinet/udp.h>
#include <netinet/ip6.h>
@@ -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 */
More information about the p4-projects
mailing list