verinec.importer.analysis.traceroute
Class ATraceRoute

java.lang.Object
  extended by java.lang.Thread
      extended by verinec.importer.analysis.traceroute.ATraceRoute
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
ATRShellCommand, TRJPcap.TRJPcapObject

public abstract class ATraceRoute
extends Thread

This abstract class defines some abstract methodes, which has to be implemented of every TraceRoute class and it provides some common methods.

Author:
martial.seifriz at unifr.ch

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  boolean cancled
          Variable to cancle the execution of the traceroute
protected  Logger logger
          Logging
static short MAX_RETRIES
          Number of tries for an unreachable host ie. timeout
static short MAX_UNREACHABLE_HOSTS
          Number of left out hosts which are unreachable (ie. a timeout occured).
protected  int maxHops
          The number of maximum steps to a target host.
protected  String targetHost
          The ip adress of the target host in string representation.
protected  int timeOut
          time out in ms between sending and receiving of a packet
static String UNREACHABLE_HOST_IP
          Standart ip for an host which is unreachable ie. a timeout occred
static String UNREACHABLE_HOST_NAME
          Standart host name for an host which is unreachable ie. a timeout occred
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ATraceRoute()
           
 
Method Summary
protected  void abort()
          Cancle the execution as soon as possible.
protected  boolean isCancled()
          Test if the execution was cancled.
protected abstract  Vector traceRoute(int maxHops, int timeOut, String target)
          The traceroute method, which has to be implemented.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected Logger logger
Logging


UNREACHABLE_HOST_IP

public static final String UNREACHABLE_HOST_IP
Standart ip for an host which is unreachable ie. a timeout occred

See Also:
Constant Field Values

UNREACHABLE_HOST_NAME

public static final String UNREACHABLE_HOST_NAME
Standart host name for an host which is unreachable ie. a timeout occred

See Also:
Constant Field Values

MAX_UNREACHABLE_HOSTS

public static final short MAX_UNREACHABLE_HOSTS
Number of left out hosts which are unreachable (ie. a timeout occured). Some hosts doesn't respond when they receive a ICMP message because of their firewall. In this case they are left out and a standard entry is added to the result.

See Also:
Constant Field Values

MAX_RETRIES

public static final short MAX_RETRIES
Number of tries for an unreachable host ie. timeout

See Also:
Constant Field Values

timeOut

protected int timeOut
time out in ms between sending and receiving of a packet


maxHops

protected int maxHops
The number of maximum steps to a target host.


targetHost

protected String targetHost
The ip adress of the target host in string representation.


cancled

private boolean cancled
Variable to cancle the execution of the traceroute

Constructor Detail

ATraceRoute

public ATraceRoute()
Method Detail

traceRoute

protected abstract Vector traceRoute(int maxHops,
                                     int timeOut,
                                     String target)
                              throws TraceRouteException
The traceroute method, which has to be implemented.

Parameters:
maxHops - The maximum number of hops between the source and targed host
timeOut - The time in ms between sending and receiving of a request
target - The target host IP in string representation (xxx.xxx.xxx.xxx)
Returns:
a Vector containing the IPs as strins
Throws:
TraceRouteException

abort

protected void abort()
Cancle the execution as soon as possible.


isCancled

protected boolean isCancled()
Test if the execution was cancled.

Returns:
True if trace is cancelled.

Copyright © 2005 Verinec, DIUF