unsigned enobufs;
unsigned overrun;
unsigned lost;
+ struct timespec tic, tac;
} stats;
int num_interfaces = 0;
if (opt.oneattime)
SEND();
+ get_tstamp(&stats.tic);
+
while (!finish_flag &&
(opt.count == 0 || count < opt.count || msg_in_progress != 0)) {
}
}
+ get_tstamp(&stats.tac);
+
for (i=0; i<num_interfaces; i++)
close(pfd[i].fd);
fclose(opt.f_hist);
fclose(opt.f_msgs);
+
+ fprintf(opt.f_stat, "cmdline='");
+ for (i=0; i<argc; i++)
+ fprintf(opt.f_stat, "%s%s", argv[i], i < argc-1 ? " " : "");
+ fprintf(opt.f_stat, "'\n");
+
+ timespec_subtract(&diff, &stats.tac, &stats.tic);
+ fprintf(opt.f_stat, "duration=%s # seconds\n", tstamp_str(NULL, &diff));
fprintf(opt.f_stat, "sent=%d\n", count);
fprintf(opt.f_stat, "overrun=%d\n", stats.overrun);