PERFORCE change 166841 for review
Gabor Pali
pgj at FreeBSD.org
Thu Jul 30 22:34:06 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166841
Change 166841 by pgj at petymeg-current on 2009/07/30 22:33:27
Add header for AH statistics.
Affected files ...
.. //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ah_var.h#2 edit
.. //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/xform_ah.c#2 edit
Differences ...
==== //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/ah_var.h#2 (text+ko) ====
@@ -47,6 +47,8 @@
*/
#define AH_ALG_MAX 16
+#define AHSTAT_VERSION 0x00000001
+
struct ahstat {
u_int32_t ahs_hdrops; /* Packet shorter than header shows */
u_int32_t ahs_nopf; /* Protocol family not supported */
==== //depot/projects/soc2009/pgj_libstat/src/sys/netipsec/xform_ah.c#2 (text+ko) ====
@@ -47,6 +47,7 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/vimage.h>
+#include <sys/sockopt.h>
#include <net/if.h>
@@ -55,6 +56,7 @@
#include <netinet/ip.h>
#include <netinet/ip_ecn.h>
#include <netinet/ip6.h>
+#include <netinet/tcp_var.h>
#include <net/route.h>
#include <netipsec/ipsec.h>
@@ -102,6 +104,10 @@
#ifdef VIMAGE_GLOBALS
int ah_enable;
int ah_cleartos;
+struct stat_header ahstat_header = {
+ .sth_version = AHSTAT_VERSION,
+ .sth_len = sizeof(struct ahstat)
+};
struct ahstat ahstat;
#endif
@@ -110,8 +116,12 @@
ah_enable, CTLFLAG_RW, ah_enable, 0, "");
SYSCTL_V_INT(V_NET, vnet_ipsec, _net_inet_ah, OID_AUTO,
ah_cleartos, CTLFLAG_RW, ah_cleartos, 0, "");
+
SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ah, IPSECCTL_STATS,
- stats, CTLFLAG_RD, ahstat, ahstat, "");
+ stats, CTLFLAG_RW, ahstat, ahstat, "");
+
+SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_inet_ah, OID_AUTO,
+ stats_header, CTLFLAG_RD, ahstat_header, stat_header, "");
static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */
More information about the p4-projects
mailing list