[Iftop-users] [PATCH] Add colored output to iftop

James Lay jlay at slave-tothe-box.net
Mon, 24 Mar 2014 12:06:44 -0600


--=-U+bhVXmbkzN36I3huJAn
Content-Type: multipart/alternative; boundary="=-AYnajcctG0w3eroAz2rf"


--=-AYnajcctG0w3eroAz2rf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, 2014-03-24 at 15:14 +0100, David Heidelberger wrote:

> Oh, try "patch -p1 < file" with attached file.
>=20
> Look like email client damaged some spaces or something.
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Add colored output to iftop.
>=20
> Based on https://github.com/srix/iftopcolor
>=20
> Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
> ---
> diff -Naur a/ui.c b/ui.c
> --- a/ui.c	2014-01-08 14:00:48.776905827 +0100
> +++ b/ui.c	2014-01-08 14:07:51.064903944 +0100
> @@ -51,6 +51,9 @@
>   "\n"\
>   "iftop, version " IFTOP_VERSION
>=20
> +#define COLOR_SENT 1
> +#define COLOR_RECV 2
> +#define COLOR_BOTH 3
>=20
>   extern hash_type* history;
>   extern int history_pos;
> @@ -199,12 +202,13 @@
>       }
>   }
>=20
> -void draw_bar(float n, int y) {
> +void draw_bar(float n, int y, short colorpair) {
>       int L;
> +    colorpair =3D has_colors() ? colorpair : 0; /* set 0 if terminal is=
=20
> not color capable*/
>       mvchgat(y, 0, -1, A_NORMAL, 0, NULL);
>       L =3D get_bar_length(8 * n);
>       if (L > 0)
> -        mvchgat(y, 0, L + 1, A_REVERSE, 0, NULL);
> +        mvchgat(y, 0, L + 1, A_REVERSE, colorpair, NULL);
>   }
>=20
>   void draw_line_totals(int y, host_pair_line* line, option_linedisplay_t=
=20
> linedisplay) {
> @@ -219,17 +223,17 @@
>       if(options.showbars) {
>         switch(linedisplay) {
>           case OPTION_LINEDISPLAY_TWO_LINE:
> -          draw_bar(line->sent[options.bar_interval],y);
> -          draw_bar(line->recv[options.bar_interval],y+1);
> +          draw_bar(line->sent[options.bar_interval],y,  COLOR_SENT);
> +          draw_bar(line->recv[options.bar_interval],y+1, COLOR_RECV);
>             break;
>           case OPTION_LINEDISPLAY_ONE_LINE_SENT:
> -          draw_bar(line->sent[options.bar_interval],y);
> +          draw_bar(line->sent[options.bar_interval],y,COLOR_SENT);
>             break;
>           case OPTION_LINEDISPLAY_ONE_LINE_RECV:
> -          draw_bar(line->recv[options.bar_interval],y);
> +          draw_bar(line->recv[options.bar_interval],y,COLOR_RECV);
>             break;
>           case OPTION_LINEDISPLAY_ONE_LINE_BOTH:
> -          draw_bar(line->recv[options.bar_interval] +=20
> line->sent[options.bar_interval],y);
> +          draw_bar(line->recv[options.bar_interval] +=20
> line->sent[options.bar_interval],y, COLOR_BOTH);
>             break;
>         }
>       }
> @@ -428,6 +432,13 @@
>=20
>   void ui_curses_init() {
>       (void) initscr();      /* initialize the curses library */
> +    if (has_colors()) {
> +	start_color();
> +	use_default_colors();
> +	init_pair(COLOR_RECV, COLOR_GREEN, -1);
> +	init_pair(COLOR_SENT, COLOR_BLUE, -1);
> +	init_pair(COLOR_BOTH, COLOR_MAGENTA, -1);
> +    }
>       keypad(stdscr, TRUE);  /* enable keyboard mapping */
>       (void) nonl();         /* tell curses not to do NL->CR/NL on output=
=20
> */
>       (void) cbreak();       /* take input chars one at a time, no wait=
=20
> for \n */
> ---
>=20
>=20
> Dne 2014-03-24 13:54, James Lay napsal:
>=20
> > On Wed, 2014-03-19 at 18:05 +0100, David Heidelberger wrote:
> >=20
> >> Add colored output to iftop.
> >>=20
> >> Based on https://github.com/srix/iftopcolor [1]
> >>=20
> >> Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz>
> >> ---
> >> diff -Naur a/ui.c b/ui.c
> >> --- a/ui.c 2014-01-08 14:00:48.776905827 +0100
> >> +++ b/ui.c 2014-01-08 14:07:51.064903944 +0100
> >> @@ -51,6 +51,9 @@
> >> "n"
> >> "iftop, version " IFTOP_VERSION
> >>=20
> >> +#define COLOR_SENT 1
> >> +#define COLOR_RECV 2
> >> +#define COLOR_BOTH 3
> >>=20
> >> extern hash_type* history;
> >> extern int history_pos;
> >> @@ -199,12 +202,13 @@
> >> }
> >> }
> >>=20
> >> -void draw_bar(float n, int y) {
> >> +void draw_bar(float n, int y, short colorpair) {
> >> int L;
> >> + colorpair =3D has_colors() ? colorpair : 0; /* set 0 if terminal is
> >> not color capable*/
> >> mvchgat(y, 0, -1, A_NORMAL, 0, NULL);
> >> L =3D get_bar_length(8 * n);
> >> if (L > 0)
> >> - mvchgat(y, 0, L + 1, A_REVERSE, 0, NULL);
> >> + mvchgat(y, 0, L + 1, A_REVERSE, colorpair, NULL);
> >> }
> >>=20
> >> void draw_line_totals(int y, host_pair_line* line,=20
> >> option_linedisplay_t
> >> linedisplay) {
> >> @@ -219,17 +223,17 @@
> >> if(options.showbars) {
> >> switch(linedisplay) {
> >> case OPTION_LINEDISPLAY_TWO_LINE:
> >> - draw_bar(line->sent[options.bar_interval],y);
> >> - draw_bar(line->recv[options.bar_interval],y+1);
> >> + draw_bar(line->sent[options.bar_interval],y, COLOR_SENT);
> >> + draw_bar(line->recv[options.bar_interval],y+1, COLOR_RECV);
> >> break;
> >> case OPTION_LINEDISPLAY_ONE_LINE_SENT:
> >> - draw_bar(line->sent[options.bar_interval],y);
> >> + draw_bar(line->sent[options.bar_interval],y,COLOR_SENT);
> >> break;
> >> case OPTION_LINEDISPLAY_ONE_LINE_RECV:
> >> - draw_bar(line->recv[options.bar_interval],y);
> >> + draw_bar(line->recv[options.bar_interval],y,COLOR_RECV);
> >> break;
> >> case OPTION_LINEDISPLAY_ONE_LINE_BOTH:
> >> - draw_bar(line->recv[options.bar_interval] +
> >> line->sent[options.bar_interval],y);
> >> + draw_bar(line->recv[options.bar_interval] +
> >> line->sent[options.bar_interval],y, COLOR_BOTH);
> >> break;
> >> }
> >> }
> >> @@ -428,6 +432,13 @@
> >>=20
> >> void ui_curses_init() {
> >> (void) initscr(); /* initialize the curses library */
> >> + if (has_colors()) {
> >> + start_color();
> >> + use_default_colors();
> >> + init_pair(COLOR_RECV, COLOR_GREEN, -1);
> >> + init_pair(COLOR_SENT, COLOR_BLUE, -1);
> >> + init_pair(COLOR_BOTH, COLOR_MAGENTA, -1);
> >> + }
> >> keypad(stdscr, TRUE); /* enable keyboard mapping */
> >> (void) nonl(); /* tell curses not to do NL->CR/NL on output
> >> */
> >> (void) cbreak(); /* take input chars one at a time, no wait
> >> for n */
> >>=20
> >> _______________________________________________
> >> iftop-users mailing list
> >> iftop-users@lists.beasts.org
> >> http://lists.beasts.org/mailman/listinfo/iftop-users [2]
> >=20
> > I couldn't get this to apply to either 0.17 or 1.0pre4...unless I'm=20
> > doing something radically wrong. Download, untar and:
> >=20
> > patch -p0 < patch.diff
> >=20
> > Yes? Thank you...this will be cool when I get it working.
> >=20
> > James
>=20
>=20
> Links:
> ------
> [1] https://github.com/srix/iftopcolor
> [2] http://lists.beasts.org/mailman/listinfo/iftop-users


Thanks Dave,

-p1 worked with this


[12:05:02 jlay@gateway:~/iftop-1.0pre4$] patch -p1 < color.patch=20
patching file ui.c
Hunk #1 succeeded at 53 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 204 (offset 2 lines).
Hunk #3 succeeded at 225 (offset 2 lines).
Hunk #4 succeeded at 434 (offset 2 lines).

James

--=-AYnajcctG0w3eroAz2rf
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; CHARSET=3DUTF-8">
  <META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/4.6.6">
</HEAD>
<BODY>
On Mon, 2014-03-24 at 15:14 +0100, David Heidelberger wrote:
<BLOCKQUOTE TYPE=3DCITE>
<PRE>
Oh, try &quot;patch -p1 &lt; file&quot; with attached file.

Look like email client damaged some spaces or something.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Add colored output to iftop.

Based on <A HREF=3D"https://github.com/srix/iftopcolor">https://github.com/=
srix/iftopcolor</A>

Signed-off-by: David Heidelberger &lt;<A HREF=3D"mailto:david.heidelberger@=
ixit.cz">david.heidelberger@ixit.cz</A>&gt;
---
diff -Naur a/ui.c b/ui.c
--- a/ui.c	2014-01-08 14:00:48.776905827 +0100
+++ b/ui.c	2014-01-08 14:07:51.064903944 +0100
@@ -51,6 +51,9 @@
  &quot;\n&quot;\
  &quot;iftop, version &quot; IFTOP_VERSION

+#define COLOR_SENT 1
+#define COLOR_RECV 2
+#define COLOR_BOTH 3

  extern hash_type* history;
  extern int history_pos;
@@ -199,12 +202,13 @@
      }
  }

-void draw_bar(float n, int y) {
+void draw_bar(float n, int y, short colorpair) {
      int L;
+    colorpair =3D has_colors() ? colorpair : 0; /* set 0 if terminal is=
=20
not color capable*/
      mvchgat(y, 0, -1, A_NORMAL, 0, NULL);
      L =3D get_bar_length(8 * n);
      if (L &gt; 0)
-        mvchgat(y, 0, L + 1, A_REVERSE, 0, NULL);
+        mvchgat(y, 0, L + 1, A_REVERSE, colorpair, NULL);
  }

  void draw_line_totals(int y, host_pair_line* line, option_linedisplay_t=
=20
linedisplay) {
@@ -219,17 +223,17 @@
      if(options.showbars) {
        switch(linedisplay) {
          case OPTION_LINEDISPLAY_TWO_LINE:
-          draw_bar(line-&gt;sent[options.bar_interval],y);
-          draw_bar(line-&gt;recv[options.bar_interval],y+1);
+          draw_bar(line-&gt;sent[options.bar_interval],y,  COLOR_SENT);
+          draw_bar(line-&gt;recv[options.bar_interval],y+1, COLOR_RECV);
            break;
          case OPTION_LINEDISPLAY_ONE_LINE_SENT:
-          draw_bar(line-&gt;sent[options.bar_interval],y);
+          draw_bar(line-&gt;sent[options.bar_interval],y,COLOR_SENT);
            break;
          case OPTION_LINEDISPLAY_ONE_LINE_RECV:
-          draw_bar(line-&gt;recv[options.bar_interval],y);
+          draw_bar(line-&gt;recv[options.bar_interval],y,COLOR_RECV);
            break;
          case OPTION_LINEDISPLAY_ONE_LINE_BOTH:
-          draw_bar(line-&gt;recv[options.bar_interval] +=20
line-&gt;sent[options.bar_interval],y);
+          draw_bar(line-&gt;recv[options.bar_interval] +=20
line-&gt;sent[options.bar_interval],y, COLOR_BOTH);
            break;
        }
      }
@@ -428,6 +432,13 @@

  void ui_curses_init() {
      (void) initscr();      /* initialize the curses library */
+    if (has_colors()) {
+	start_color();
+	use_default_colors();
+	init_pair(COLOR_RECV, COLOR_GREEN, -1);
+	init_pair(COLOR_SENT, COLOR_BLUE, -1);
+	init_pair(COLOR_BOTH, COLOR_MAGENTA, -1);
+    }
      keypad(stdscr, TRUE);  /* enable keyboard mapping */
      (void) nonl();         /* tell curses not to do NL-&gt;CR/NL on outpu=
t=20
*/
      (void) cbreak();       /* take input chars one at a time, no wait=20
for \n */
---


Dne 2014-03-24 13:54, James Lay napsal:

<FONT COLOR=3D"#737373">&gt; On Wed, 2014-03-19 at 18:05 +0100, David Heide=
lberger wrote:</FONT>
<FONT COLOR=3D"#737373">&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; Add colored output to iftop.</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; Based on <A HREF=3D"https://github.com/sri=
x/iftopcolor">https://github.com/srix/iftopcolor</A> [1]</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; Signed-off-by: David Heidelberger &lt;<A H=
REF=3D"mailto:david.heidelberger@ixit.cz">david.heidelberger@ixit.cz</A>&gt=
;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; ---</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; diff -Naur a/ui.c b/ui.c</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; --- a/ui.c 2014-01-08 14:00:48.776905827 +=
0100</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; +++ b/ui.c 2014-01-08 14:07:51.064903944 +=
0100</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; @@ -51,6 +51,9 @@</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; &quot;n&quot;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; &quot;iftop, version &quot; IFTOP_VERSION<=
/FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; +#define COLOR_SENT 1</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; +#define COLOR_RECV 2</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; +#define COLOR_BOTH 3</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; extern hash_type* history;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; extern int history_pos;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; @@ -199,12 +202,13 @@</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; }</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; }</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; -void draw_bar(float n, int y) {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; +void draw_bar(float n, int y, short color=
pair) {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; int L;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + colorpair =3D has_colors() ? colorpair :=
 0; /* set 0 if terminal is</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; not color capable*/</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; mvchgat(y, 0, -1, A_NORMAL, 0, NULL);</FON=
T>
<FONT COLOR=3D"#737373">&gt;&gt; L =3D get_bar_length(8 * n);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; if (L &gt; 0)</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; - mvchgat(y, 0, L + 1, A_REVERSE, 0, NULL)=
;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + mvchgat(y, 0, L + 1, A_REVERSE, colorpai=
r, NULL);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; }</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; void draw_line_totals(int y, host_pair_lin=
e* line, </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; option_linedisplay_t</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; linedisplay) {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; @@ -219,17 +223,17 @@</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; if(options.showbars) {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; switch(linedisplay) {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; case OPTION_LINEDISPLAY_TWO_LINE:</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; - draw_bar(line-&gt;sent[options.bar_inter=
val],y);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; - draw_bar(line-&gt;recv[options.bar_inter=
val],y+1);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + draw_bar(line-&gt;sent[options.bar_inter=
val],y, COLOR_SENT);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + draw_bar(line-&gt;recv[options.bar_inter=
val],y+1, COLOR_RECV);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; break;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; case OPTION_LINEDISPLAY_ONE_LINE_SENT:</FO=
NT>
<FONT COLOR=3D"#737373">&gt;&gt; - draw_bar(line-&gt;sent[options.bar_inter=
val],y);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + draw_bar(line-&gt;sent[options.bar_inter=
val],y,COLOR_SENT);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; break;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; case OPTION_LINEDISPLAY_ONE_LINE_RECV:</FO=
NT>
<FONT COLOR=3D"#737373">&gt;&gt; - draw_bar(line-&gt;recv[options.bar_inter=
val],y);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + draw_bar(line-&gt;recv[options.bar_inter=
val],y,COLOR_RECV);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; break;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; case OPTION_LINEDISPLAY_ONE_LINE_BOTH:</FO=
NT>
<FONT COLOR=3D"#737373">&gt;&gt; - draw_bar(line-&gt;recv[options.bar_inter=
val] +</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; line-&gt;sent[options.bar_interval],y);</F=
ONT>
<FONT COLOR=3D"#737373">&gt;&gt; + draw_bar(line-&gt;recv[options.bar_inter=
val] +</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; line-&gt;sent[options.bar_interval],y, COL=
OR_BOTH);</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; break;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; }</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; }</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; @@ -428,6 +432,13 @@</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; void ui_curses_init() {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; (void) initscr(); /* initialize the curses=
 library */</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + if (has_colors()) {</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + start_color();</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + use_default_colors();</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + init_pair(COLOR_RECV, COLOR_GREEN, -1);<=
/FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + init_pair(COLOR_SENT, COLOR_BLUE, -1);</=
FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + init_pair(COLOR_BOTH, COLOR_MAGENTA, -1)=
;</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; + }</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; keypad(stdscr, TRUE); /* enable keyboard m=
apping */</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; (void) nonl(); /* tell curses not to do NL=
-&gt;CR/NL on output</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; */</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; (void) cbreak(); /* take input chars one a=
t a time, no wait</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; for n */</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; </FONT>
<FONT COLOR=3D"#737373">&gt;&gt; __________________________________________=
_____</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; iftop-users mailing list</FONT>
<FONT COLOR=3D"#737373">&gt;&gt; <A HREF=3D"mailto:iftop-users@lists.beasts=
.org">iftop-users@lists.beasts.org</A></FONT>
<FONT COLOR=3D"#737373">&gt;&gt; <A HREF=3D"http://lists.beasts.org/mailman=
/listinfo/iftop-users">http://lists.beasts.org/mailman/listinfo/iftop-users=
</A> [2]</FONT>
<FONT COLOR=3D"#737373">&gt; </FONT>
<FONT COLOR=3D"#737373">&gt; I couldn't get this to apply to either 0.17 or=
 1.0pre4...unless I'm </FONT>
<FONT COLOR=3D"#737373">&gt; doing something radically wrong. Download, unt=
ar and:</FONT>
<FONT COLOR=3D"#737373">&gt; </FONT>
<FONT COLOR=3D"#737373">&gt; patch -p0 &lt; patch.diff</FONT>
<FONT COLOR=3D"#737373">&gt; </FONT>
<FONT COLOR=3D"#737373">&gt; Yes? Thank you...this will be cool when I get =
it working.</FONT>
<FONT COLOR=3D"#737373">&gt; </FONT>
<FONT COLOR=3D"#737373">&gt; James</FONT>


Links:
------
[1] <A HREF=3D"https://github.com/srix/iftopcolor">https://github.com/srix/=
iftopcolor</A>
[2] <A HREF=3D"http://lists.beasts.org/mailman/listinfo/iftop-users">http:/=
/lists.beasts.org/mailman/listinfo/iftop-users</A>
</PRE>
</BLOCKQUOTE>
<BR>
Thanks Dave,<BR>
<BR>
-p1 worked with this<BR>
<BR>
<BR>
[12:05:02 <A HREF=3D"mailto:jlay@gateway">jlay@gateway</A>:~/iftop-1.0pre4$=
] patch -p1 &lt; color.patch <BR>
patching file ui.c<BR>
Hunk #1 succeeded at 53 with fuzz 2 (offset 2 lines).<BR>
Hunk #2 succeeded at 204 (offset 2 lines).<BR>
Hunk #3 succeeded at 225 (offset 2 lines).<BR>
Hunk #4 succeeded at 434 (offset 2 lines).<BR>
<BR>
James
</BODY>
</HTML>

--=-AYnajcctG0w3eroAz2rf--

--=-U+bhVXmbkzN36I3huJAn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iQEcBAABAgAGBQJTMHQ0AAoJEIOvN0kaoY6sz30H/jtw9WaCORCmY1Z1+bVGQOGC
1YEtZPhT9vofBh5wtJ2dK7JAP7xUKGnBycF1rRCEG/t6JdvdzKbhZEV+PixTadsc
fLr4UxiFP/LjewYAH86Nq4a41smljKbczeJklsIZZa/5yWWQ3gzSI1/S987t7Htr
3vEMKr3v+YoEU4hQLvAoCQ0m/bYhDLfyMaPba/j2Aw4wYofTPz18u8eRsEpSn4Ig
w5k2x2+mu4ZKarjCelT7VUah4llqJyBux9xSguxeCjGrHL2h3awPRDVMpiyMBIBv
O6oKPDPPuAUj2WCysJSartRlXjbmeTPL5qHtuYw7B1hkbvsHkjTdg7yjjHUEBzo=
=o1lL
-----END PGP SIGNATURE-----

--=-U+bhVXmbkzN36I3huJAn--