]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg: rename 'bandwidth' to 'transfer' in output
authorTomasz Torcz <tomek@pipebreaker.pl>
Fri, 23 Dec 2016 19:25:55 +0000 (20:25 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 23 Dec 2016 21:22:08 +0000 (22:22 +0100)
'bandwidth' is a measure of speed, but wg's output shows only the
number of bytes transferred. Thus 'transfer' is a better label.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/show.c
src/wg.8

index 7c32af9c731a3b639ea24312c6ec021e42b38f77..5257d438c048b319b5290b56ef2f77d25d668a37 100644 (file)
@@ -203,7 +203,7 @@ static char *bytes(uint64_t b)
 static const char *COMMAND_NAME = NULL;
 static void show_usage(void)
 {
-       fprintf(stderr, "Usage: %s %s { <interface> | all | interfaces } [public-key | private-key | preshared-key | listen-port | peers | endpoints | allowed-ips | latest-handshakes | bandwidth | persistent-keepalive]\n", PROG_NAME, COMMAND_NAME);
+       fprintf(stderr, "Usage: %s %s { <interface> | all | interfaces } [public-key | private-key | preshared-key | listen-port | peers | endpoints | allowed-ips | latest-handshakes | transfer | persistent-keepalive]\n", PROG_NAME, COMMAND_NAME);
 }
 
 static void pretty_print(struct wgdevice *device)
@@ -239,7 +239,7 @@ static void pretty_print(struct wgdevice *device)
                if (peer->last_handshake_time.tv_sec)
                        terminal_printf("  " TERMINAL_BOLD "latest handshake" TERMINAL_RESET ": %s\n", ago(&peer->last_handshake_time));
                if (peer->rx_bytes || peer->tx_bytes) {
-                       terminal_printf("  " TERMINAL_BOLD "bandwidth" TERMINAL_RESET ": ");
+                       terminal_printf("  " TERMINAL_BOLD "transfer" TERMINAL_RESET ": ");
                        terminal_printf("%s received, ", bytes(peer->rx_bytes));
                        terminal_printf("%s sent\n", bytes(peer->tx_bytes));
                }
@@ -298,7 +298,7 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_int
                                printf("%s\t", device->interface);
                        printf("%s\t%llu\n", key(peer->public_key), (unsigned long long)peer->last_handshake_time.tv_sec);
                }
-       } else if (!strcmp(param, "bandwidth")) {
+       } else if (!strcmp(param, "transfer")) {
                for_each_wgpeer(device, peer, i) {
                        if (with_interface)
                                printf("%s\t", device->interface);
index 1ec7ec4ad1931fa600446444a01cdcbc991aa9c8..18edba3366df2f3db2b4a0f81864256faa737ee0 100644 (file)
--- a/src/wg.8
+++ b/src/wg.8
@@ -36,7 +36,7 @@ Sub-commands that take an INTERFACE must be passed a WireGuard interface.
 .SH COMMANDS
 
 .TP
-\fBshow\fP { \fI<interface>\fP | \fIall\fP | \fIinterfaces\fP } [\fIpublic-key\fP | \fIprivate-key\fP | \fIpreshared-key\fP | \fIlisten-port\fP | \fIpeers\fP | \fIendpoints\fP | \fIallowed-ips\fP | \fIlatest-handshakes\fP | \fIpersistent-keepalive\fP | \fIbandwidth\fP]
+\fBshow\fP { \fI<interface>\fP | \fIall\fP | \fIinterfaces\fP } [\fIpublic-key\fP | \fIprivate-key\fP | \fIpreshared-key\fP | \fIlisten-port\fP | \fIpeers\fP | \fIendpoints\fP | \fIallowed-ips\fP | \fIlatest-handshakes\fP | \fIpersistent-keepalive\fP | \fItransfer\fP]
 Shows current WireGuard configuration of specified \fI<interface>\fP.
 If no \fI<interface>\fP is specified, \fI<interface>\fP defaults to \fIall\fP.
 If \fIinterfaces\fP is specified, prints a list of all WireGuard interfaces,