I have developed the attached patch against nfdump 1.6.4, which appears
to be working as intended.  Please take a look and see if I missed
anything, though....

Thanks,
Mark

-- 
Mark D. Nagel, CCIE #3177 <[email protected]>
Principal Consultant, Willing Minds LLC (http://www.willingminds.com)
cell: 949-279-5817, desk: 714-495-4001, fax: 949-623-9854

** For faster support response time, please
** email [email protected] or call 714-495-4000

diff -Naur nfdump-1.6.4.orig/bin/nfstat.c nfdump-1.6.4/bin/nfstat.c
--- nfdump-1.6.4.orig/bin/nfstat.c      2011-07-05 11:51:25.000000000 -0700
+++ nfdump-1.6.4/bin/nfstat.c   2011-11-08 17:21:37.000000000 -0800
@@ -319,7 +319,7 @@
        { NULL,       0, NULL}
 };
 
-static uint32_t        byte_limit, packet_limit;
+static uint64_t        byte_limit, packet_limit;
 static int byte_mode, packet_mode;
 enum { NONE = 0, LESS, MORE };
 
@@ -490,7 +490,7 @@
                                        exit(250);
                                }
                }
-               packet_limit = atol(s) * scale;
+               packet_limit = (uint64_t)atol(s) * (uint64_t)scale;
        }
 
        if ( byte_limit_string ) {
@@ -537,14 +537,14 @@
                                }
                                scale = 1;
                }
-               byte_limit = atol(s) * scale;
+               byte_limit = (uint64_t)atol(s) * (uint64_t)scale;
        }
 
        if ( byte_limit )
-               printf("Byte limit: %c %u bytes\n", byte_mode == LESS ? '<' : 
'>', byte_limit);
+               printf("Byte limit: %c %llu bytes\n", byte_mode == LESS ? '<' : 
'>', byte_limit);
 
        if ( packet_limit )
-               printf("Packet limit: %c %u packets\n", packet_mode == LESS ? 
'<' : '>', packet_limit);
+               printf("Packet limit: %c %llu packets\n", packet_mode == LESS ? 
'<' : '>', packet_limit);
 
 
 } // End of SetLimits
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Nfdump-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfdump-discuss

Reply via email to