summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/netipsec/ah_var.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/netipsec/ah_var.h')
-rw-r--r--freebsd/sys/netipsec/ah_var.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/freebsd/sys/netipsec/ah_var.h b/freebsd/sys/netipsec/ah_var.h
index 812fe2dc..9b992c07 100644
--- a/freebsd/sys/netipsec/ah_var.h
+++ b/freebsd/sys/netipsec/ah_var.h
@@ -48,37 +48,39 @@
#define AH_ALG_MAX 16
struct ahstat {
- u_int32_t ahs_hdrops; /* Packet shorter than header shows */
- u_int32_t ahs_nopf; /* Protocol family not supported */
- u_int32_t ahs_notdb;
- u_int32_t ahs_badkcr;
- u_int32_t ahs_badauth;
- u_int32_t ahs_noxform;
- u_int32_t ahs_qfull;
- u_int32_t ahs_wrap;
- u_int32_t ahs_replay;
- u_int32_t ahs_badauthl; /* Bad authenticator length */
- u_int32_t ahs_input; /* Input AH packets */
- u_int32_t ahs_output; /* Output AH packets */
- u_int32_t ahs_invalid; /* Trying to use an invalid TDB */
- u_int64_t ahs_ibytes; /* Input bytes */
- u_int64_t ahs_obytes; /* Output bytes */
- u_int32_t ahs_toobig; /* Packet got larger than IP_MAXPACKET */
- u_int32_t ahs_pdrops; /* Packet blocked due to policy */
- u_int32_t ahs_crypto; /* Crypto processing failure */
- u_int32_t ahs_tunnel; /* Tunnel sanity check failure */
- u_int32_t ahs_hist[AH_ALG_MAX]; /* Per-algorithm op count */
+ uint64_t ahs_hdrops; /* Packet shorter than header shows */
+ uint64_t ahs_nopf; /* Protocol family not supported */
+ uint64_t ahs_notdb;
+ uint64_t ahs_badkcr;
+ uint64_t ahs_badauth;
+ uint64_t ahs_noxform;
+ uint64_t ahs_qfull;
+ uint64_t ahs_wrap;
+ uint64_t ahs_replay;
+ uint64_t ahs_badauthl; /* Bad authenticator length */
+ uint64_t ahs_input; /* Input AH packets */
+ uint64_t ahs_output; /* Output AH packets */
+ uint64_t ahs_invalid; /* Trying to use an invalid TDB */
+ uint64_t ahs_ibytes; /* Input bytes */
+ uint64_t ahs_obytes; /* Output bytes */
+ uint64_t ahs_toobig; /* Packet got larger than IP_MAXPACKET */
+ uint64_t ahs_pdrops; /* Packet blocked due to policy */
+ uint64_t ahs_crypto; /* Crypto processing failure */
+ uint64_t ahs_tunnel; /* Tunnel sanity check failure */
+ uint64_t ahs_hist[AH_ALG_MAX]; /* Per-algorithm op count */
};
#ifdef _KERNEL
+#include <sys/counter.h>
+
VNET_DECLARE(int, ah_enable);
VNET_DECLARE(int, ah_cleartos);
-VNET_DECLARE(struct ahstat, ahstat);
+VNET_PCPUSTAT_DECLARE(struct ahstat, ahstat);
-#define AHSTAT_ADD(name, val) V_ahstat.name += (val)
+#define AHSTAT_ADD(name, val) \
+ VNET_PCPUSTAT_ADD(struct ahstat, ahstat, name , (val))
#define AHSTAT_INC(name) AHSTAT_ADD(name, 1)
#define V_ah_enable VNET(ah_enable)
#define V_ah_cleartos VNET(ah_cleartos)
-#define V_ahstat VNET(ahstat)
#endif /* _KERNEL */
#endif /*_NETIPSEC_AH_VAR_H_*/