Rename dco_get_peer_stats to dco_get_peer_stats_multi
PATCH 1/1 Rename dco_get_peer_stats to dco_get_peer_stats_multi
From: Lev Stipakov <[email protected]...>
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 <[email protected]...>
--- src/openvpn/dco.h | 4 ++-- src/openvpn/dco_freebsd.c | 2 +- src/openvpn/dco_linux.c | 2 +- src/openvpn/dco_win.c | 2 +- src/openvpn/multi.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-)
src/openvpn/dco.h +2 -2
@@ -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 ; }
src/openvpn/dco_freebsd.c +1 -1
@@ -669,7 +669,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;
src/openvpn/dco_linux.c +1 -1
@@ -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 ;
src/openvpn/dco_win.c +1 -1
@@ -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 ;
src/openvpn/multi.c +2 -2
@@ -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 intstatus_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 ) {
Signature · 1 line
2.38.1.windows.1
Acked-by Gert Doering <[email protected]...>
This is really trivial renaming of all occurences of that function, and nothing else. "git grep" confirms that ALL occurances have been caught. Test compiled for good measure, but as expected, nothing broke.
Your patch has been applied to the master and release/2.6 branch.
commit 6dbf8352ef2151dfdee7f02ccbdd9560b3e2be75 (master) commit f45a8d80b8ce2f73026d5330a6664c4a78e9afc2 (release/2.6)
Author: Lev Stipakov Date: Wed Dec 14 15:28:35 2022 +0200
Rename dco_get_peer_stats to dco_get_peer_stats_multi
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg25690.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering