Hello,
Today I compiled iftop-1.0pre1 if a FreeBSD system. I had to make the following changes:
- config/int_ghba_r.c uses AF_INET, which is defined in <sys/socket.h>, without #include'ing it ;
- add « #define define s6_addr32 __u6_addr.__u6_addr32 » in config.h (this is used in addr_hash and ns_hash.c). FreeBSD has a note in <netinet6/in6.h> saying it is not standard ;
- in resolver.c, only the getnameinfo() method tries to resolve ip6 addresses. I ported the AF guessing to the gethostbyaddr{,_r} methods, as I am not familiar with the libresolv or the ares librairies. This enables reverse ip6 resolution.
The patch is attached. Could you please review it, and apply it if it DTRT ?
I just applied the patch and now it fails to build here:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT counter_hash.o -MD -MP -MF ".deps/counter_hash.Tpo" -c -o counter_hash.o counter_hash.c; then mv -f ".deps/counter_hash.Tpo" ".deps/counter_hash.Po"; else rm -f ".deps/counter_hash.Tpo"; exit 1; fi counter_hash.c:6:26: error: counter_hash.h: No such file or directory *** Error code 1
2010/12/6 Frédéric Perrin frederic.perrin@resel.fr
Hello,
Today I compiled iftop-1.0pre1 if a FreeBSD system. I had to make the following changes:
- config/int_ghba_r.c uses AF_INET, which is defined in <sys/socket.h>,
without #include'ing it ;
- add « #define define s6_addr32 __u6_addr.__u6_addr32 » in config.h
(this is used in addr_hash and ns_hash.c). FreeBSD has a note in <netinet6/in6.h> saying it is not standard ;
- in resolver.c, only the getnameinfo() method tries to resolve ip6
addresses. I ported the AF guessing to the gethostbyaddr{,_r} methods, as I am not familiar with the libresolv or the ares librairies. This enables reverse ip6 resolution.
The patch is attached. Could you please review it, and apply it if it DTRT ?
-- Fred
sorry, forgot to mention this was FreeBSD 8.1-RELEASE.
2010/12/6 Chris Anderson cva@pobox.com
I just applied the patch and now it fails to build here:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT counter_hash.o -MD -MP -MF ".deps/counter_hash.Tpo" -c -o counter_hash.o counter_hash.c; then mv -f ".deps/counter_hash.Tpo" ".deps/counter_hash.Po"; else rm -f ".deps/counter_hash.Tpo"; exit 1; fi counter_hash.c:6:26: error: counter_hash.h: No such file or directory *** Error code 1
2010/12/6 Frédéric Perrin frederic.perrin@resel.fr
Hello,
Today I compiled iftop-1.0pre1 if a FreeBSD system. I had to make the following changes:
- config/int_ghba_r.c uses AF_INET, which is defined in <sys/socket.h>,
without #include'ing it ;
- add « #define define s6_addr32 __u6_addr.__u6_addr32 » in config.h
(this is used in addr_hash and ns_hash.c). FreeBSD has a note in <netinet6/in6.h> saying it is not standard ;
- in resolver.c, only the getnameinfo() method tries to resolve ip6
addresses. I ported the AF guessing to the gethostbyaddr{,_r} methods, as I am not familiar with the libresolv or the ares librairies. This enables reverse ip6 resolution.
The patch is attached. Could you please review it, and apply it if it DTRT ?
-- Fred
Le lundi 6 à 10:37, Chris Anderson a écrit :
I just applied the patch and now it fails to build here:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT counter_hash.o -MD -MP -MF ".deps/counter_hash.Tpo" -c -o counter_hash.o counter_hash.c; then mv -f ".deps/counter_hash.Tpo" ".deps/counter_hash.Po"; else rm -f ".deps/ counter_hash.Tpo"; exit 1; fi counter_hash.c:6:26: error: counter_hash.h: No such file or directory *** Error code 1
I didn't touch counter_hash.{c,h}. Are you using `make all', by chance? From a mail by Paul Warren, you should be using `make iftop' instead.
http://lists.beasts.org/pipermail/iftop-users/2010-November/000318.html
Turns out that there's some stuff in the distribution that shouldn't be there and will cause the build to fail.
If you run "make iftop" rather than just "make" it should work.
oops, that was it (somehow I forgot that since the first time I tried to build it).
works great (finally v6 traffic!)
cva
2010/12/6 Frédéric Perrin frederic.perrin@resel.fr
Le lundi 6 à 10:37, Chris Anderson a écrit :
I just applied the patch and now it fails to build here:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT counter_hash.o -MD -MP
-MF
".deps/counter_hash.Tpo" -c -o counter_hash.o counter_hash.c; then mv -f ".deps/counter_hash.Tpo" ".deps/counter_hash.Po"; else rm -f ".deps/ counter_hash.Tpo"; exit 1; fi counter_hash.c:6:26: error: counter_hash.h: No such file or directory *** Error code 1
I didn't touch counter_hash.{c,h}. Are you using `make all', by chance? From a mail by Paul Warren, you should be using `make iftop' instead.
http://lists.beasts.org/pipermail/iftop-users/2010-November/000318.html
Turns out that there's some stuff in the distribution that shouldn't be there and will cause the build to fail.
If you run "make iftop" rather than just "make" it should work.
-- Fred
iftop-users mailing list iftop-users@lists.beasts.org http://lists.beasts.org/mailman/listinfo/iftop-users