Imagined Cities


Other
  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
  1)Download

  2)Get decompressed tar file traceroute_servlet
    unzip trservlet.zip

  3) The next command creates the directory TracerouteServlet
    tar xvf traceroute_servlet
   The directory will be looked like this
      
11122   GetTraceServlet.java
343      LoadLib.java
556      makefile
364      mtrace.java
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
javac GetTraceServlet.java
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:
   make
   The shared library libTrNat.so will be created
Some warnings my be appeared on the compilation. It's OK.
The shared library libTrNat.so 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
servlet.traceroute.code=GetTraceServlet

2) Aliased Servlet Init Parameters servlet.traceroute.initArgs=servletDir=http://www.yoursitename.com/your_dir/traceroute
(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 libTrNat.so 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 libTrNat.so.


The Traceroute Servlet is implemented by Rafael Stekolshchik.
klivlend1@yahoo.com


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