Imagined Cities

  Traceroute Sources

Traceroute Servlet

WhoIs Servlet


Home at LK.NET. Where cultures of the world converge.

    Traceroute Java Servlet
     The program is free, there is no warranty for the program of any kind and
it is provided "AS IS".
     For use Traceroute Java Servlet your Web Server has to support Java Servlets.
    For example, it maybe one of the Apache Web Server versions with mod_java

    Get sources

  2)Get decompressed tar file traceroute_servlet

  3) The next command creates the directory TracerouteServlet
    tar xvf traceroute_servlet
   The directory will be looked like this
556      makefile
1024    netinet (subdirectory)
1215    traceroute.html
12561  traceroute.c
1363    traceroute.h

     The directory netinet contains only Linux header
files ip.h, ip_icmp.h, udp.h needed only for compilation.

    Prepare the Traceroute Servlet for Linux
1) Compile java files
The next java classes will be created:
GetTraceServlet.class, LoadLib.class, mtrace.class

2) Generate file mtrace.h from the mtrace.class
javah -jni mtrace

3) Edit the makefile
a) INC and INC1 have to correspond your JDK path and version
b) If you don't use GNU compiler gcc fix it.

4) run makefile:
   The shared library will be created
Some warnings my be appeared on the compilation. It's OK.
The shared library will be dinamically loaded on
the servlet run time by java class LoadLib.

    Example of Servlet Configuration
     Now, you only need include this servlet in your Java Servlet Zone.
This example regards to the Apache Web Server and the
corresponding Servlet Zone Configuration File
1) Servlet Aliases

2) Aliased Servlet Init Parameters servlet.traceroute.initArgs=servletDir=
(it should be equal to the form action from
the downloaded traceroute.html)

    Configure your paths
     The path configuraion is the critical issue and I have many emails
"Why I get java.lang.UnsatisfiedLinkError?" This error can be happened if your
C-library isn't found by the servlet. So, the CLASSPATH has to point to the
Traceroute classes directory and the LD_LIBRARY_PATH has to point to the
directory contains the library

The Traceroute Servlet is implemented by Rafael Stekolshchik.

Launch Traceroute Servlet
Traceroute Protocols Details
Traceroute Server List and Links

    Other traceroute sources
Van Jackobson's Traceroute
Matt Kimball's Traceroute
Ehud Gavron's Traceroute
Eric Wassenar's Traceroute