From: Tobias Rittweiler Date: Fri, 25 Dec 2015 11:57:32 +0000 (+0100) Subject: --csv: Print a header line as the first line which names all columns. X-Git-Tag: v0.87~16^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=47312e4fd5c4adf476903beb0f455d1f2e0066b9;p=thirdparty%2Fmtr.git --csv: Print a header line as the first line which names all columns. --- diff --git a/report.c b/report.c index a96adda..e0a9548 100644 --- a/report.c +++ b/report.c @@ -347,17 +347,31 @@ void csv_close(time_t now) addr = net_addr(at); snprint_addr(name, sizeof(name), addr); - int last = net_last(at); + if (at == net_min()) { + printf("Mtr_Version,Start_Time,Status,Host,Hop,Ip,"); +#ifdef IPINFO + if(!ipinfo_no) { + printf("Asn,"); + } +#endif + for( i=0; i