summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2017-11-07 16:51:23 +0000
committervisa <visa@openbsd.org>2017-11-07 16:51:23 +0000
commit56b63e1c0470fca8f47d1937a90f3402a2527fb3 (patch)
tree57f81f6656d02c190f02b7af8b36c1a59d8bc45c /sys/netinet
parentSerialize access to the IPv6 reassembly queue with a mutex. (diff)
downloadwireguard-openbsd-56b63e1c0470fca8f47d1937a90f3402a2527fb3.tar.xz
wireguard-openbsd-56b63e1c0470fca8f47d1937a90f3402a2527fb3.zip
Convert all the fields of {ah,esp,ipcomp}stat to uint64.
This is a preliminary step for using percpu counters with the data. OK mpi@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_ah.h41
-rw-r--r--sys/netinet/ip_esp.h52
-rw-r--r--sys/netinet/ip_ipcomp.h36
3 files changed, 66 insertions, 63 deletions
diff --git a/sys/netinet/ip_ah.h b/sys/netinet/ip_ah.h
index 61ce7afa4fc..c3dd6cfd795 100644
--- a/sys/netinet/ip_ah.h
+++ b/sys/netinet/ip_ah.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.h,v 1.34 2017/02/07 18:18:16 bluhm Exp $ */
+/* $OpenBSD: ip_ah.h,v 1.35 2017/11/07 16:51:23 visa Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -39,25 +39,26 @@
#define _NETINET_IP_AH_H_
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_outfail; /* Packet output failure */
+ 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_outfail; /* Packet output failure */
};
struct ah {
diff --git a/sys/netinet/ip_esp.h b/sys/netinet/ip_esp.h
index 3ff93422939..7a4f15eefaf 100644
--- a/sys/netinet/ip_esp.h
+++ b/sys/netinet/ip_esp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.h,v 1.44 2017/02/07 18:18:16 bluhm Exp $ */
+/* $OpenBSD: ip_esp.h,v 1.45 2017/11/07 16:51:23 visa Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -39,30 +39,32 @@
#define _NETINET_IP_ESP_H_
struct espstat {
- u_int32_t esps_hdrops; /* Packet shorter than header shows */
- u_int32_t esps_nopf; /* Protocol family not supported */
- u_int32_t esps_notdb;
- u_int32_t esps_badkcr;
- u_int32_t esps_qfull;
- u_int32_t esps_noxform;
- u_int32_t esps_badilen;
- u_int32_t esps_wrap; /* Replay counter wrapped around */
- u_int32_t esps_badenc; /* Bad encryption detected */
- u_int32_t esps_badauth; /* Only valid for transforms with auth */
- u_int32_t esps_replay; /* Possible packet replay detected */
- u_int32_t esps_input; /* Input ESP packets */
- u_int32_t esps_output; /* Output ESP packets */
- u_int32_t esps_invalid; /* Trying to use an invalid TDB */
- u_int64_t esps_ibytes; /* Input bytes */
- u_int64_t esps_obytes; /* Output bytes */
- u_int32_t esps_toobig; /* Packet got larger than IP_MAXPACKET */
- u_int32_t esps_pdrops; /* Packet blocked due to policy */
- u_int32_t esps_crypto; /* Crypto processing failure */
- u_int32_t esps_udpencin; /* Input ESP-in-UDP packets */
- u_int32_t esps_udpencout; /* Output ESP-in-UDP packets */
- u_int32_t esps_udpinval; /* Invalid input ESP-in-UDP packets */
- u_int32_t esps_udpneeded; /* Trying to use a ESP-in-UDP TDB */
- u_int32_t esps_outfail; /* Packet output failure */
+ uint64_t esps_hdrops; /* Packet shorter than header shows */
+ uint64_t esps_nopf; /* Protocol family not supported */
+ uint64_t esps_notdb;
+ uint64_t esps_badkcr;
+ uint64_t esps_qfull;
+ uint64_t esps_noxform;
+ uint64_t esps_badilen;
+ uint64_t esps_wrap; /* Replay counter wrapped around */
+ uint64_t esps_badenc; /* Bad encryption detected */
+ uint64_t esps_badauth; /* Only valid for transforms
+ * with auth */
+ uint64_t esps_replay; /* Possible packet replay detected */
+ uint64_t esps_input; /* Input ESP packets */
+ uint64_t esps_output; /* Output ESP packets */
+ uint64_t esps_invalid; /* Trying to use an invalid TDB */
+ uint64_t esps_ibytes; /* Input bytes */
+ uint64_t esps_obytes; /* Output bytes */
+ uint64_t esps_toobig; /* Packet got larger than
+ * IP_MAXPACKET */
+ uint64_t esps_pdrops; /* Packet blocked due to policy */
+ uint64_t esps_crypto; /* Crypto processing failure */
+ uint64_t esps_udpencin; /* Input ESP-in-UDP packets */
+ uint64_t esps_udpencout; /* Output ESP-in-UDP packets */
+ uint64_t esps_udpinval; /* Invalid input ESP-in-UDP packets */
+ uint64_t esps_udpneeded; /* Trying to use a ESP-in-UDP TDB */
+ uint64_t esps_outfail; /* Packet output failure */
};
/*
diff --git a/sys/netinet/ip_ipcomp.h b/sys/netinet/ip_ipcomp.h
index 0ebd45d2edc..730e8712a70 100644
--- a/sys/netinet/ip_ipcomp.h
+++ b/sys/netinet/ip_ipcomp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.h,v 1.8 2017/02/07 18:18:16 bluhm Exp $ */
+/* $OpenBSD: ip_ipcomp.h,v 1.9 2017/11/07 16:51:23 visa Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -33,25 +33,25 @@
#define _NETINET_IP_IPCOMP_H_
struct ipcompstat {
- u_int32_t ipcomps_hdrops; /* Packet shorter than header shows */
- u_int32_t ipcomps_nopf; /* Protocol family not supported */
- u_int32_t ipcomps_notdb;
- u_int32_t ipcomps_badkcr;
- u_int32_t ipcomps_qfull;
- u_int32_t ipcomps_noxform;
- u_int32_t ipcomps_wrap;
- u_int32_t ipcomps_input; /* Input IPcomp packets */
- u_int32_t ipcomps_output; /* Output IPcomp packets */
- u_int32_t ipcomps_invalid; /* Trying to use an invalid
+ uint64_t ipcomps_hdrops; /* Packet shorter than header shows */
+ uint64_t ipcomps_nopf; /* Protocol family not supported */
+ uint64_t ipcomps_notdb;
+ uint64_t ipcomps_badkcr;
+ uint64_t ipcomps_qfull;
+ uint64_t ipcomps_noxform;
+ uint64_t ipcomps_wrap;
+ uint64_t ipcomps_input; /* Input IPcomp packets */
+ uint64_t ipcomps_output; /* Output IPcomp packets */
+ uint64_t ipcomps_invalid; /* Trying to use an invalid
* TDB */
- u_int64_t ipcomps_ibytes; /* Input bytes */
- u_int64_t ipcomps_obytes; /* Output bytes */
- u_int32_t ipcomps_toobig; /* Packet got larger than
+ uint64_t ipcomps_ibytes; /* Input bytes */
+ uint64_t ipcomps_obytes; /* Output bytes */
+ uint64_t ipcomps_toobig; /* Packet got larger than
* IP_MAXPACKET */
- u_int32_t ipcomps_pdrops; /* Packet blocked due to policy */
- u_int32_t ipcomps_crypto; /* "Crypto" processing failure */
- u_int32_t ipcomps_minlen; /* packets too short for compress */
- u_int32_t ipcomps_outfail; /* Packet output failure */
+ uint64_t ipcomps_pdrops; /* Packet blocked due to policy */
+ uint64_t ipcomps_crypto; /* "Crypto" processing failure */
+ uint64_t ipcomps_minlen; /* packets too short for compress */
+ uint64_t ipcomps_outfail; /* Packet output failure */
};
/* IPCOMP header */