+
+ timeval now;
+ gettimeofday(&now, NULL);
+
+ if (tdiff(last_print, now) > 10.0) {
+ int rcvd = gre.get_received_packets();
+ int fec_recovered = tun_decoder.get_recovered_packets();
+ int reorders = tun_reorderer.get_reorders();
+ int lost = tun_reorderer.get_lost_packets();
+ int output = tun.get_sent_packets();
+ int sent = gre.get_sent_packets();
+ fprintf(stderr, "%5dp rcvd, %3dp FEC recovered, %4d reorders, %3dp lost, %5dp output. %5dp sent\n",
+ rcvd - last_rcvd, fec_recovered - last_fec_recovered,
+ reorders - last_reorders, lost - last_lost,
+ output - last_output, sent - last_sent);
+ last_rcvd = rcvd;
+ last_fec_recovered = fec_recovered;
+ last_reorders = reorders;
+ last_lost = lost;
+ last_output = output;
+ last_sent = sent;
+ last_print = now;
+ }