PERFORCE change 166844 for review
Gabor Pali
pgj at FreeBSD.org
Thu Jul 30 23:01:36 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166844
Change 166844 by pgj at 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 <sys/protosw.h>
#include <sys/sysctl.h>
#include <sys/vimage.h>
+#include <sys/sockopt.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
+#include <netinet/tcp_var.h>
#include <net/route.h>
#include <netipsec/ipsec.h>
@@ -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);
More information about the p4-projects
mailing list