projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hash table fix
[tinc]
/
src
/
info.c
diff --git
a/src/info.c
b/src/info.c
index
f0dce8c
..
1649be0
100644
(file)
--- a/
src/info.c
+++ b/
src/info.c
@@
-20,23
+20,25
@@
#include "system.h"
#include "control_common.h"
#include "system.h"
#include "control_common.h"
-#include "list.h"
#include "subnet.h"
#include "tincctl.h"
#include "info.h"
#include "utils.h"
#include "subnet.h"
#include "tincctl.h"
#include "info.h"
#include "utils.h"
-#include "xalloc.h"
void logger(int level, int priority, const char *format, ...) {
void logger(int level, int priority, const char *format, ...) {
+ (void)level;
+ (void)priority;
va_list ap;
va_list ap;
+
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
+
fputc('\n', stderr);
}
char *strip_weight(char *netstr) {
fputc('\n', stderr);
}
char *strip_weight(char *netstr) {
-
in
t len = strlen(netstr);
+
size_
t len = strlen(netstr);
if(len >= 3 && !strcmp(netstr + len - 3, "#10")) {
netstr[len - 3] = 0;
if(len >= 3 && !strcmp(netstr + len - 3, "#10")) {
netstr[len - 3] = 0;
@@
-145,10
+147,6
@@
static int info_node(int fd, const char *item) {
if(status.udp_confirmed) {
printf(" udp_confirmed");
if(status.udp_confirmed) {
printf(" udp_confirmed");
-
- if(udp_ping_rtt != -1) {
- printf(" (rtt %d.%03d)", udp_ping_rtt / 1000, udp_ping_rtt % 1000);
- }
}
printf("\n");
}
printf("\n");
@@
-185,6
+183,10
@@
static int info_node(int fd, const char *item) {
printf("unknown\n");
} else if(minmtu > 0) {
printf("directly with UDP\nPMTU: %d\n", pmtu);
printf("unknown\n");
} else if(minmtu > 0) {
printf("directly with UDP\nPMTU: %d\n", pmtu);
+
+ if(udp_ping_rtt != -1) {
+ printf("RTT: %d.%03d\n", udp_ping_rtt / 1000, udp_ping_rtt % 1000);
+ }
} else if(!strcmp(nexthop, item)) {
printf("directly with TCP\n");
} else {
} else if(!strcmp(nexthop, item)) {
printf("directly with TCP\n");
} else {