From: Lev Stipakov Date: Wed, 14 Dec 2022 13:28:35 +0000 (+0200) Subject: Rename dco_get_peer_stats to dco_get_peer_stats_multi X-Git-Tag: v2.7_alpha1~649 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dbf8352ef2151dfdee7f02ccbdd9560b3e2be75;p=thirdparty%2Fopenvpn.git Rename dco_get_peer_stats to dco_get_peer_stats_multi Existing API and implementation (FreeBSD only) are designed for server usage. Rename it to *_multi to indicate that and not to mix with upcoming client API/implementation. Signed-off-by: Lev Stipakov Acked-by: Gert Doering Message-Id: <20221214132835.1010-1-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25690.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/dco.h b/src/openvpn/dco.h index 701bbea12..9a34d5b6c 100644 --- a/src/openvpn/dco.h +++ b/src/openvpn/dco.h @@ -233,7 +233,7 @@ void dco_delete_iroutes(struct multi_context *m, struct multi_instance *mi); * @param dco DCO device context * @param m the server context **/ -int dco_get_peer_stats(dco_context_t *dco, struct multi_context *m); +int dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m); /** * Retrieve the list of ciphers supported by the current platform @@ -357,7 +357,7 @@ dco_delete_iroutes(struct multi_context *m, struct multi_instance *mi) } static inline int -dco_get_peer_stats(dco_context_t *dco, struct multi_context *m) +dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m) { return 0; } diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index 329b0d8b7..d7e373d76 100644 --- a/src/openvpn/dco_freebsd.c +++ b/src/openvpn/dco_freebsd.c @@ -691,7 +691,7 @@ dco_update_peer_stat(struct multi_context *m, uint32_t peerid, const nvlist_t *n } int -dco_get_peer_stats(dco_context_t *dco, struct multi_context *m) +dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m) { struct ifdrv drv; diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 03c3dd64d..200d0b194 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -918,7 +918,7 @@ nla_put_failure: } int -dco_get_peer_stats(dco_context_t *dco, struct multi_context *m) +dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m) { /* Not implemented. */ return 0; diff --git a/src/openvpn/dco_win.c b/src/openvpn/dco_win.c index 68ec931c5..675dece2e 100644 --- a/src/openvpn/dco_win.c +++ b/src/openvpn/dco_win.c @@ -400,7 +400,7 @@ dco_do_write(dco_context_t *dco, int peer_id, struct buffer *buf) } int -dco_get_peer_stats(dco_context_t *dco, struct multi_context *m) +dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m) { /* Not implemented. */ return 0; diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 746713030..870e3fa61 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -540,7 +540,7 @@ multi_del_iroutes(struct multi_context *m, static void setenv_stats(struct multi_context *m, struct context *c) { - dco_get_peer_stats(&m->top.c1.tuntap->dco, m); + dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, m); setenv_counter(c->c2.es, "bytes_received", c->c2.link_read_bytes + c->c2.dco_read_bytes); setenv_counter(c->c2.es, "bytes_sent", c->c2.link_write_bytes + c->c2.dco_write_bytes); @@ -839,7 +839,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const int status_reset(so); - dco_get_peer_stats(&m->top.c1.tuntap->dco, m); + dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, m); if (version == 1) {