|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.importer.analysis.traceroute.TRJPcap
public class TRJPcap
This class employs the JPcap library to send and receive ICMP packages to do a traceroute. As we are not interested in performance measurements of the network connections, packets are only sent once if a response comes back. Fixme: The packets for traces are always sent from the "default" interface. This will only work if there is no more than one active network interface on the machine.
| Nested Class Summary | |
|---|---|
private static class |
TRJPcap.TRJPcapObject
This class provides a traceroute and encapsulates the algorithm. |
| Field Summary | |
|---|---|
private static jpcap.JpcapCaptor |
captor
the package captor |
private static jpcap.NetworkInterface |
device
the package sender |
private static Logger |
log
|
static short |
MAX_RETRIES
number of tries for an unreachable host ie. timeout |
private static jpcap.JpcapSender |
sender
the package sender |
private static InetAddress |
thisHostIP
the ip adress of this host |
private static boolean[] |
usedIDs
This array saves the used ids. |
| Constructor Summary | |
|---|---|
private |
TRJPcap()
The constructor is private, the factory method getTRObject()
must be used to get an instance. |
| Method Summary | |
|---|---|
static jpcap.NetworkInterface |
getDefaultNetworkInterface()
Try to find out the standart device of the system. |
protected static jpcap.JpcapCaptor |
getNewCaptor()
Creation and return of a new captor instance. |
static ATraceRoute |
getTRObject()
this method generates a new TRJPcapObject and handels the device, sender and captor. |
private static void |
init()
The initialization of the sender and the device. |
private static void |
printNetworkInterfaces()
Show all networkinterfaces which are found on the system |
protected static void |
releaseID(byte id)
Release an id. |
protected static byte |
requestID()
Fetch a unused id, which can be used as indentifier. |
private static void |
testAccessRights()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final short MAX_RETRIES
private static jpcap.JpcapSender sender
private static jpcap.JpcapCaptor captor
private static jpcap.NetworkInterface device
private static InetAddress thisHostIP
private static Logger log
private static boolean[] usedIDs
| Constructor Detail |
|---|
private TRJPcap()
getTRObject()
must be used to get an instance.
| Method Detail |
|---|
public static ATraceRoute getTRObject()
throws TraceRouteException
TraceRouteException
private static void init()
throws TraceRouteException
TraceRouteException
private static void testAccessRights()
throws TraceRouteException
TraceRouteExceptionprivate static void printNetworkInterfaces()
public static jpcap.NetworkInterface getDefaultNetworkInterface()
protected static jpcap.JpcapCaptor getNewCaptor()
throws IOException
IOException
protected static byte requestID()
throws TraceRouteException
TraceRouteExceptionprotected static void releaseID(byte id)
id - The id to release.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||