diff -uNr pcount/pcount.c pcount-long/pcount.c --- pcount/pcount.c 2004-04-05 15:30:46.000000000 +0200 +++ pcount-long/pcount.c 2004-04-26 18:08:24.000000000 +0200 @@ -29,9 +29,9 @@ #include #include /* the L2 protocols */ -static u_int32_t totPkts, totLost; +static u_int64_t totPkts, totLost; static struct timeval startTime; -unsigned long numPkts = 0, numBytes = 0; +unsigned long long numPkts = 0, numBytes = 0; #define DEFAULT_DEVICE "eth1" /* "e1000" */ @@ -79,7 +79,7 @@ pcapStat.ps_recv, pcapStat.ps_drop, pcapStat.ps_recv-pcapStat.ps_drop, pcapStat.ps_recv == 0 ? 0 : (double)(pcapStat.ps_drop*100)/(double)pcapStat.ps_recv); fprintf(stderr, "=========================\n"); - fprintf(stderr, "%u pkts [%.1f pkt/sec] - %u bytes [%.2f Mbit/sec]\n", + fprintf(stderr, "%llu pkts [%.1f pkt/sec] - %llu bytes [%.2f Mbit/sec]\n", numPkts, (double)numPkts/deltaSec, numBytes, (double)8*numBytes/(double)(deltaSec*1000000)); fprintf(stderr, "=========================\n");