- if(do_graph) {
- const char *color = "black";
- if(!strcmp(host, "MYSELF"))
- color = "green";
- else if(!status.reachable)
- color = "red";
- else if(strcmp(via, node))
- color = "orange";
- else if(!status.validkey)
- color = "black";
- else if(minmtu > 0)
- color = "green";
- printf(" %s [label = \"%s\", color = \"%s\"%s];\n", node, node, color, strcmp(host, "MYSELF") ? "" : ", style = \"filled\"");
- } else {
- if(only_reachable && !status.reachable)
- 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 %hd (min %hd max %hd)\n",
- node, id, host, port, cipher, digest, maclength, compression, options, status_int, nexthop, via, distance, pmtu, minmtu, maxmtu);
+ memcpy(&status, &status_int, sizeof(status));
+
+ if(do_graph) {
+ const char *color = "black";
+
+ if(!strcmp(host, "MYSELF")) {
+ color = "green";
+ } else if(!status.reachable) {
+ color = "red";
+ } else if(strcmp(via, node)) {
+ color = "orange";
+ } else if(!status.validkey) {
+ color = "black";
+ } else if(minmtu > 0) {
+ color = "green";