summaryrefslogtreecommitdiff
path: root/net-mgmt/ehnt/files/patch-ehnt__display.c
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2004-06-23 12:01:33 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2004-06-23 12:01:33 +0000
commit79c3a398f469d146fb0eedbae6b08cb6a237bb65 (patch)
tree2291def8660a02a883fa9d8a596b2a831dfe6f50 /net-mgmt/ehnt/files/patch-ehnt__display.c
parentreword gallery entry (diff)
Make small improvement: print packets per second in topmode.
Original patch from: Gleb Smirnoff <glebius@cell.sick.ru> Fixed patch from, approved by: Dmitry Morozovsky <marck@rinet.ru> (maintainer)
Notes
Notes: svn path=/head/; revision=112043
Diffstat (limited to 'net-mgmt/ehnt/files/patch-ehnt__display.c')
-rw-r--r--net-mgmt/ehnt/files/patch-ehnt__display.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/net-mgmt/ehnt/files/patch-ehnt__display.c b/net-mgmt/ehnt/files/patch-ehnt__display.c
index a88d33586331..a0af8adcd2d3 100644
--- a/net-mgmt/ehnt/files/patch-ehnt__display.c
+++ b/net-mgmt/ehnt/files/patch-ehnt__display.c
@@ -2,8 +2,43 @@
$FreeBSD$
--- ehnt_display.c.orig Thu Oct 4 22:18:29 2001
-+++ ehnt_display.c Thu May 20 16:06:07 2004
-@@ -246,7 +246,7 @@
++++ ehnt_display.c Wed Jun 23 14:35:08 2004
+@@ -110,7 +110,9 @@
+ ShowReportTimeHeader(stats);
+
+ if ( ! report_inout ) {
+- printf (" Total %10.0fkbits/s\n",stats->InBoundTotal*8/((interval)*1024));
++ printf (" Total %10.0fkbits/s, %10.0fkpps\n",
++ stats->InBoundTotal*8/((interval)*1024),
++ stats->InBoundTotalPkts/((interval)*1024));
+ if ( e_cfg->topmode != ETM_PROTO ) {
+ printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n");
+ }
+@@ -151,8 +153,9 @@
+ printf ("Rank|-------------Source----------------| |---------------Dest----------------|\n");
+ }
+ printf("%s",header);
+- printf (" O U T B O U N D (total %.0fkbits/s)\n",
+- stats->OutBoundTotal*8/((interval)*1024));
++ printf (" O U T B O U N D (total %.0fkbits/s, %.0fkpps)\n",
++ stats->OutBoundTotal*8/((interval)*1024),
++ stats->OutBoundTotalPkts/((interval)*1024));
+
+ for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2 + 1; i++) {
+ printf("%2d:",i);
+@@ -183,8 +186,9 @@
+ }
+ printf("\n");
+ }
+- printf (" I N B O U N D (total %.0fkbits/s)\n",
+- stats->InBoundTotal*8/((interval)*1000));
++ printf (" I N B O U N D (total %.0fkbits/s, %.0fkpps)\n",
++ stats->InBoundTotal*8/((interval)*1024),
++ stats->InBoundTotalPkts/((interval)*1024));
+ for (i=1; i<= (int)(e_cfg->screenlength - headersize)/2; i++) {
+ printf("%2d:",i);
+ switch (e_cfg->topmode) {
+@@ -246,7 +250,7 @@
static char str[100];