X-Git-Url: http://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=parseiptables.c;h=946707d3bd084aa4fca852e241eb8723bb4998d3;hp=cc2daacc5df3db6810a4657837ec4c4b17e9977e;hb=af37be1dccdd5c9b86113a6e02ed794da3102ec4;hpb=d7357b63c9942c72481993bdb9632861c1d83a55 diff --git a/parseiptables.c b/parseiptables.c index cc2daac..946707d 100644 --- a/parseiptables.c +++ b/parseiptables.c @@ -41,7 +41,7 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) unsigned long pkts = 0; char *ipaddr = NULL,*ptr; - valid_columns(ptr, line->str, ' ', col) + valid_columns(ptr, line->str, ' ', col) if(valid) switch(col) { case 1: if(eq(ptr,"Chain")) @@ -125,7 +125,11 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) if(ipv6 && isipv6) { *isipv6=0; - printf("(IPv6) "); + printf("(IPv6) "); + } + else + { + printf("(IPv4) "); } if(proxyflag) @@ -141,12 +145,12 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) printf("(down) "); } - printf("IP %s: %Lu MB (%ld pkts)\n", ipaddr, traffic, pkts); + printf("%s %Lu MB (%ld pkts)\n", ipaddr, traffic, pkts); if_exists(ip, ips, eqi(ip->addr,ipaddr)); else { - TheIP(ipaddr); + TheIP(ipaddr, FALSE); if(eq(ip->addr,"0.0.0.0/0")) { ip->name = "(unregistered)";