X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=76ff3740b912c41548423093c2365adae230f75b;hb=0f0585d71b28428792e53258bc570dddc17b0b27;hp=5ba71613fd4f0cc4529ebddd6f2db0b2b1d938d8;hpb=69a18395931d657b77641b68ca12473ad6b996da;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index 5ba71613..76ff3740 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1,6 +1,6 @@ /* tincctl.c -- Controlling a running tincd - Copyright (C) 2007-2017 Guus Sliepen + Copyright (C) 2007-2018 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -92,7 +92,7 @@ static struct option const long_options[] = { static void version(void) { printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE, BUILD_VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); - printf("Copyright (C) 1998-2017 Ivo Timmermans, Guus Sliepen and others.\n" + printf("Copyright (C) 1998-2018 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to redistribute it under certain conditions;\n" @@ -1298,12 +1298,13 @@ static int cmd_dump(int argc, char *argv[]) { unsigned int options, status_int; node_status_t status; long int last_state_change; + long int udp_ping_rtt; switch(req) { case REQ_DUMP_NODES: { - int n = sscanf(line, "%*d %*d %4095s %4095s %4095s port %4095s %d %d %d %d %x %x %4095s %4095s %d %hd %hd %hd %ld", node, id, host, port, &cipher, &digest, &maclength, &compression, &options, &status_int, nexthop, via, &distance, &pmtu, &minmtu, &maxmtu, &last_state_change); + int n = sscanf(line, "%*d %*d %4095s %4095s %4095s port %4095s %d %d %d %d %x %x %4095s %4095s %d %hd %hd %hd %ld %ld", node, id, host, port, &cipher, &digest, &maclength, &compression, &options, &status_int, nexthop, via, &distance, &pmtu, &minmtu, &maxmtu, &last_state_change, &udp_ping_rtt); - if(n != 17) { + if(n != 18) { fprintf(stderr, "Unable to parse node dump from tincd: %s\n", line); return 1; } @@ -1331,8 +1332,11 @@ static int cmd_dump(int argc, char *argv[]) { continue; } - printf("%s id %s at %s port %s cipher %d digest %d maclength %d compression %d options %x status %04x nexthop %s via %s distance %d pmtu %d (min %d max %d)\n", + printf("%s id %s at %s port %s cipher %d digest %d maclength %d compression %d options %x status %04x nexthop %s via %s distance %d pmtu %d (min %d max %d)", node, id, host, port, cipher, digest, maclength, compression, options, status_int, nexthop, via, distance, pmtu, minmtu, maxmtu); + if (udp_ping_rtt != -1) + printf(" rtt %ld.%03ld", udp_ping_rtt/1000, udp_ping_rtt%1000); + printf("\n"); } } break; @@ -1695,6 +1699,7 @@ const var_t variables[] = { {"Ed25519PrivateKeyFile", VAR_SERVER}, {"ExperimentalProtocol", VAR_SERVER}, {"Forwarding", VAR_SERVER}, + {"FWMark", VAR_SERVER}, {"GraphDumpFile", VAR_SERVER | VAR_OBSOLETE}, {"Hostnames", VAR_SERVER}, {"IffOneQueue", VAR_SERVER},