@@ -300,18 +300,23 @@
* Triggered by SIGUSR2 or F2 on Windows.
*/
void
-print_status(const struct context *c, struct status_output *so)
+print_status(struct context *c, struct status_output *so)
{
struct gc_arena gc = gc_new();
status_reset(so);
+ if (dco_enabled(&c->options))
+ {
+ dco_get_peer_stats(c);
+ }
+
status_printf(so, "OpenVPN STATISTICS");
status_printf(so, "Updated,%s", time_string(0, 0, false, &gc));
status_printf(so, "TUN/TAP read bytes," counter_format, c->c2.tun_read_bytes);
status_printf(so, "TUN/TAP write bytes," counter_format, c->c2.tun_write_bytes);
- status_printf(so, "TCP/UDP read bytes," counter_format, c->c2.link_read_bytes);
- status_printf(so, "TCP/UDP write bytes," counter_format, c->c2.link_write_bytes);
+ status_printf(so, "TCP/UDP read bytes," counter_format, c->c2.link_read_bytes + c->c2.dco_read_bytes);
+ status_printf(so, "TCP/UDP write bytes," counter_format, c->c2.link_write_bytes + c->c2.dco_write_bytes);
status_printf(so, "Auth read bytes," counter_format, c->c2.link_read_bytes_auth);
#ifdef USE_COMP
if (c->c2.comp_context)
@@ -402,7 +407,7 @@
}
static void
-process_sigusr2(const struct context *c)
+process_sigusr2(struct context *c)
{
struct status_output *so = status_open(NULL, 0, M_INFO, NULL, 0);
print_status(c, so);
@@ -69,7 +69,7 @@
void print_signal(const struct signal_info *si, const char *title, int msglevel);
-void print_status(const struct context *c, struct status_output *so);
+void print_status(struct context *c, struct status_output *so);
void remap_signal(struct context *c);