mtr/mtr-0.69-format.patch

51 lines
1.6 KiB
Diff
Raw Normal View History

--- mtr-0.69/mtr.c.format 2005-09-05 17:02:01.000000000 +0200
+++ mtr-0.69/mtr.c 2005-09-05 17:01:19.000000000 +0200
@@ -74,7 +74,7 @@
/* default display field(defined by key in net.h) and order */
-unsigned char fld_active[2*MAXFLD] = "LS NABWV";
+unsigned char fld_active[2*MAXFLD] = "LNABWV";
int fld_index[256];
char available_options[MAXFLD];
--- mtr-0.69/report.c.format 2005-09-05 17:02:07.000000000 +0200
+++ mtr-0.69/report.c 2005-09-05 17:02:53.000000000 +0200
@@ -58,13 +58,13 @@
int len=0;
struct hostent *host;
- sprintf(buf, "HOST: %-33s", LocalHostname);
+ sprintf(buf, "%-33s Snt: %-5d", LocalHostname, MaxPing);
for( i=0; i<MAXFLD; i++ ) {
j = fld_index[fld_active[i]];
if (j < 0) continue;
sprintf( fmt, "%%%ds", data_fields[j].length );
- sprintf( buf +33+ len, fmt, data_fields[j].title );
+ sprintf( buf +44+ len, fmt, data_fields[j].title );
len += data_fields[j].length;
}
printf("%s\n",buf);
@@ -88,17 +88,17 @@
}
len=0;
- sprintf( buf, " %2d. %-33s", at+1, name);
+ sprintf( buf, "%-49s", name);
for( i=0; i<MAXFLD; i++ ) {
j = fld_index[fld_active [i]];
if (j < 0) continue;
/* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
if( index( data_fields[j].format, 'f' ) ) {
- sprintf( buf +33+ len, data_fields[j].format,
+ sprintf( buf +44+ len, data_fields[j].format,
data_fields[j].net_xxx(at) /1000.0 );
} else {
- sprintf( buf +33+ len, data_fields[j].format,
+ sprintf( buf +44+ len, data_fields[j].format,
data_fields[j].net_xxx(at) );
}
len += data_fields[j].length;