Hello,
I recently had to revisit and slightly improve the patches I sent to the list in January. They are attached in this mail, and also available at http://gitweb.fperrin.net/?p=iftop.git;a=shortlog;h=refs/heads/ip6reverse. Paul, can you apply them if they DTRT ?
The first patch makes iftop compile on FreeBSD.
The second and the third make reverse ip6 resolution available to methods beyond getnameinfo(3).
The methods that correctly resolve reverse ip6 addresses are: - getnameinfo; - gethostbyaddr_r; - gethostbyaddr; - gethostbyaddr with fork.
This leaves out the ares and libresolv methods, I suppose that can be fixed quickly.
In patch n°3, this is done by saving the addresses in a structure that remembers the AF, which is given by the caller to resolve(). I believe this in the correct thing to do.
In patch n°2, this is done by importing the getnameinfo's AF guessing to these methods. This is less intrusive.
Regards,