[Iftop-users] ancient text output patch ported to latest version

James Lay jlay at slave-tothe-box.net
Tue, 27 Nov 2012 09:43:26 -0700


On 2012-11-27 09:22, Roman Hoog Antink wrote:
> Hi there
>
> [reposted with compressed attachment so no moderation needed]
>
> Back in 2007 Patrik Bless, a former colleague, wrote the attached 
> patch,
> which was never committed to the repo, because his request got stuck 
> in
> the moderated forum.
>
> The patch adds a text output feature, allowing machine parsing of 
> output
> or redirecting it to a file, as requested in this mailing list lately 
> by
> Shannon Rodrigues.
> 
> http://lists.beasts.org/pipermail/iftop-users/2012-September/000369.html
>
> Please consider adding it before version 1.0 comes out.
>
> Can someone explain, why the CVS repo has no tags for the 0.18 and 
> 0.19
> releases?
>
> Kind regards,
> Roman

Fails to compile on iftop-1.0pre2 after patching:

[09:41:13 bleh:~/src/iftop-1.0pre2$] patch -p1 < iftop-tui.patch
patching file ChangeLog
patching file Makefile.am
patching file cfgfile.c
patching file hash.c
patching file iftop.c
patching file options.c
patching file options.h
patching file tui.c
patching file tui.h
patching file ui.c
patching file ui_common.c
patching file ui_common.h


gcc  -g -O2    -o iftop  addr_hash.o edline.o hash.o iftop.o ns_hash.o 
options.o resolver.o screenfilter.o serv_hash.o sorted_list.o 
threadprof.o ui.o util.o addrs_ioctl.o addrs_dlpi.o dlcommon.o 
stringmap.o cfgfile.o vector.o  -lpcap -lm  -lcurses -lpthread
iftop.o: In function `tick':
/home/jlay/src/iftop-1.0pre2/iftop.c:147: undefined reference to 
`analyse_data'
/home/jlay/src/iftop-1.0pre2/iftop.c:150: undefined reference to 
`tui_print'
/home/jlay/src/iftop-1.0pre2/iftop.c:164: undefined reference to 
`tui_tick'
iftop.o: In function `main':
/home/jlay/src/iftop-1.0pre2/iftop.c:807: undefined reference to 
`tui_init'
/home/jlay/src/iftop-1.0pre2/iftop.c:825: undefined reference to 
`tui_loop'
ui.o: In function `draw_line_total':
/home/jlay/src/iftop-1.0pre2/ui.c:197: undefined reference to 
`readable_size'
ui.o: In function `draw_totals':
/home/jlay/src/iftop-1.0pre2/ui.c:248: undefined reference to 
`readable_size'
ui.o: In function `draw_bar_scale':
/home/jlay/src/iftop-1.0pre2/ui.c:154: undefined reference to 
`readable_size'
ui.o: In function `ui_print':
/home/jlay/src/iftop-1.0pre2/ui.c:375: undefined reference to 
`readable_size'
/home/jlay/src/iftop-1.0pre2/ui.c:378: undefined reference to 
`readable_size'
ui.o:/home/jlay/src/iftop-1.0pre2/ui.c:381: more undefined references 
to `readable_size' follow
ui.o: In function `ui_print':
/home/jlay/src/iftop-1.0pre2/ui.c:309: undefined reference to 
`sprint_host'
/home/jlay/src/iftop-1.0pre2/ui.c:313: undefined reference to 
`sprint_host'
ui.o: In function `ui_init':
/home/jlay/src/iftop-1.0pre2/ui.c:451: undefined reference to 
`screen_list_init'
collect2: ld returned 1 exit status
make[2]: *** [iftop] Error 1
make[2]: Leaving directory `/home/src/iftop-1.0pre2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/src/iftop-1.0pre2'
make: *** [all] Error 2

James