Skip to content

Commit

Permalink
Rename dco_get_peer_stats to dco_get_peer_stats_multi
Browse files Browse the repository at this point in the history
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]>
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]>
  • Loading branch information
lstipakov authored and cron2 committed Dec 14, 2022
1 parent 10ea190 commit 6dbf835
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/openvpn/dco.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/openvpn/dco_freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/openvpn/dco_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,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;
Expand Down
2 changes: 1 addition & 1 deletion src/openvpn/dco_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/openvpn/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 6dbf835

Please sign in to comment.