aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/openvpn.h
diff options
context:
space:
mode:
authorKristof Provost2022-12-05 17:41:00 +0100
committerGert Doering2022-12-13 20:03:09 +0100
commitce2b459dabc29d071be28b8ddaa0512f8c8143ec (patch)
tree9d9375e751c85a37c9baa94c273baaead4bb2966 /src/openvpn/openvpn.h
parent7d0a90335fe79a352456f262ce42ea501796ae87 (diff)
downloadopenvpn-ce2b459dabc29d071be28b8ddaa0512f8c8143ec.zip
openvpn-ce2b459dabc29d071be28b8ddaa0512f8c8143ec.tar.gz
Read DCO traffic stats from the kernel
When DCO is active userspace doesn't see all of the traffic, so when we access these stats we must update them. Retrieve kernel statistics every time we access the link_(read|write)_bytes values. Introduce a dco_(read|write)_bytes so that we don't clobber the existing statistics, which still count control packets, sent or received directly through the socket. Signed-off-by: Kristof Provost <kprovost@netgate.com> Acked-by: Antonio Quartulli <antonio@openvpn.net> Message-Id: <20221205164103.9190-2-kprovost@netgate.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25618.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/openvpn.h')
-rw-r--r--src/openvpn/openvpn.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/openvpn/openvpn.h b/src/openvpn/openvpn.h
index c543cbf..5981e4d 100644
--- a/src/openvpn/openvpn.h
+++ b/src/openvpn/openvpn.h
@@ -267,8 +267,10 @@ struct context_2
counter_type tun_read_bytes;
counter_type tun_write_bytes;
counter_type link_read_bytes;
+ counter_type dco_read_bytes;
counter_type link_read_bytes_auth;
counter_type link_write_bytes;
+ counter_type dco_write_bytes;
#ifdef PACKET_TRUNCATION_CHECK
counter_type n_trunc_tun_read;
counter_type n_trunc_tun_write;