[Iftop-users] iftop : HISTORY_DIVISIONS set to 1 means : no more sent bar....

franck villaume fvillaume at ipnotic-telecom.fr
Fri, 24 Mar 2006 17:42:52 +0100


Hi,

I was playing around a little bit with iftop when I decided to modify it 
as I wished to see only one HISTORY_DIVISIONS column : 2s column.

I modified the ui.c file like this :

---------------------------------------------------
diff -Naur ui.c ui.c.new
--- ui.c        2005-10-26 22:12:33.000000000 +0200
+++ ui.c.new    2006-03-23 13:40:42.000000000 +0100
@@ -28,7 +28,7 @@

  #define HOSTNAME_LENGTH 256

-#define HISTORY_DIVISIONS   3
+#define HISTORY_DIVISIONS   1

  #define HELP_TIME 2

@@ -55,7 +55,7 @@


  /* 2, 10 and 40 seconds */
-int history_divs[HISTORY_DIVISIONS] = {1, 5, 20};
+int history_divs[HISTORY_DIVISIONS] = {1};

  #define UNIT_DIVISIONS 4
  char* unit_bits[UNIT_DIVISIONS] =  { "b", "Kb", "Mb", "Gb"};
-----------------------------------------------------

Then the sent bar is no more visible.
I have one screenshot available.

If I set HISTORY_DIVISIONS to 2 and
history_divs[HISTORY_DIVISIONS] = {1, 5}
then sent bar is back.

Any ideas what I made wrong ?


-- 
Franck VILLAUME
fvillaume@ipnotic-telecom.fr
****************************