Trout

Trout - a simple version of traceroute


TROUT is based on code written by W. Richard Stevens and published in "UNIX Network Programming Volume 1, Second Edition Networking APIs: Sockets and XTI," Prentice Hall PTR, Upper Saddle River, NJ 07458.

I have modified it a bit, including the following changes:

1) I collected all the procedures from Stevens's extensive library and put them in util.c, and put their prototypes in trout.h

2) I killed all the IPv6 support, because I didn't need it and because I hate ifdefs and pointers to functions.

3) For the same reason, I took out some of the configuration ifdefs. As a result, I don't know if this will still run on anything other than Linux.

4) I fixed a race condition that may or may not have been the cause of some early problems I had. Anyway, the fix also came from Stevens, in Section 18.5 of Unix Network Programming.

5) I split things up into more procedures.

The copyright for the original code is held by Prentice Hall, but they make it available under a license that is more or less identical to the GNU GPL. So my version is available under the GNU GPL, which I'm pretty sure does not violate the previous copyright.

Here is the source code as a gzipped tar file.