verinec.importer.analysis.traceroute
Class StartTraceRoute

java.lang.Object
  extended by verinec.importer.analysis.AAnalyserStartOperation
      extended by verinec.importer.analysis.traceroute.StartTraceRoute
All Implemented Interfaces:
IOperation

public class StartTraceRoute
extends AAnalyserStartOperation

The StartTraceRoute controls and starts the threads, which do the traceroutes.

The number of synchronous traceroutes is specified in the traceroute dialog. The starter creates the specified number of worker threads, which poll the starter for hosts to do a traceroute to. When there are no more hosts, the threads finish.

Author:
martial.seifriz at unifr.ch
See Also:
TraceWorkerThread

Nested Class Summary
private static class StartTraceRoute.AlgorithmItem
          This class encapsulates some informations of the different traceroute algorithms.
static class StartTraceRoute.ConfigPanel
          Configuration for the traceroutes.
 
Field Summary
(package private)  int algorithm
          The traceroute algorithm.
(package private)  int hops
          The nubmer of max Hops for the traceroutes
private  Logger logger
          The logger for this object
(package private)  int timeOut
          The timeout for the traceroutes
private  Iterator trIterGetElement
          The iterator for the host, to which a traceroute should be done
 
Fields inherited from class verinec.importer.analysis.AAnalyserStartOperation
analyser
 
Constructor Summary
StartTraceRoute(StartTraceRoute.ConfigPanel conf, AnalysisThread analysis)
          The constructor creates n TraceRouteThread and handels the informations form the dialog.
 
Method Summary
 void addToResult(Vector hops, HostCommRenderer target)
          Add the result form a traceroute to the result structure in the AnalysisThread
 HostCommRenderer getHost(String ip)
          Get a certain host form the traceroute result.
 HostCommRenderer getNextElement()
          Get the next host form the Sniffer result structure.
 void traceRoute()
          Start all traceroute threads and waits for them to finish.
 void updateState()
          Update the actual state.
 
Methods inherited from class verinec.importer.analysis.AAnalyserStartOperation
abortOperation, getThread, joinThreads, printMessage, setThread, startThreads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trIterGetElement

private Iterator trIterGetElement
The iterator for the host, to which a traceroute should be done


timeOut

int timeOut
The timeout for the traceroutes


hops

int hops
The nubmer of max Hops for the traceroutes


algorithm

int algorithm
The traceroute algorithm. The constants are specified in TraceRoute class


logger

private Logger logger
The logger for this object

Constructor Detail

StartTraceRoute

public StartTraceRoute(StartTraceRoute.ConfigPanel conf,
                       AnalysisThread analysis)
                throws TraceRouteException
The constructor creates n TraceRouteThread and handels the informations form the dialog.

Parameters:
conf - the config panel form the importer dialog
analysis - the AnalysisThread which grate this object
Throws:
TraceRouteException
Method Detail

traceRoute

public void traceRoute()
Start all traceroute threads and waits for them to finish.


addToResult

public void addToResult(Vector hops,
                        HostCommRenderer target)
Add the result form a traceroute to the result structure in the AnalysisThread

Parameters:
hops - a vector, which contains the hops
target - the target host, which were found by the sniffer

getNextElement

public HostCommRenderer getNextElement()
Get the next host form the Sniffer result structure. This datas are stored in the AnalysisThread.

Returns:
a host from the Sniffer result structure

getHost

public HostCommRenderer getHost(String ip)
Get a certain host form the traceroute result. If no host is found null is retruned.

Parameters:
ip - the host ip, which should be found
Returns:
the HostCommRenderer of the host or null

updateState

public void updateState()
Update the actual state.


Copyright © 2005 Verinec, DIUF