TraceRoute Class

Properties   Methods   Events   Configuration Settings   Errors  

The TraceRoute class allows you to trace the path IP packets take on the Internet.

Syntax

class ipworks.TraceRoute

Remarks

The component implements a standard IP Traceroute as defined in RFC 1393.

To use the class, simply call the trace_to method and set the Host parameter to the domain name or IP address of the host you want to trace the path to. This is identical to setting the remote_host property to the domain name or IP address. The class will start sending probe packets towards the host, and as it receives replies it will fire on_hop events giving information about the route. The same information is also provided in the hops properties.

The resolve_names property enables or disables DNS resolution of IP addresses received during the trace. If set to False only IP addresses are provided. If set to True the class will attempt to resolve the names of the hosts in the route. This may considerably increase the time it takes to complete the trace.

The hop_timeout property determines the maximum waiting time for a response in each hop of the trace, while the timeout property defines the maximum waiting time for the whole trace. The hop_limit property specifies the maximum number of hops allowed for a trace.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

hop_limitThe maximum number of hops to allow for a trace.
hop_countThe number of records in the Hop arrays.
hop_error_codeThe error code for particular hop in the trace.
hop_error_descriptionThe error description for particular hop in the trace.
hop_host_addressThe IP address of the host for a particular hop in the trace.
hop_host_nameThe name of the host for a particular hop in the trace.
hop_timeThe amount of time taken by a particular hop in the trace.
hop_timeoutMaximum amount of time to wait for an individual hop to complete.
idleThe current status of the class.
local_hostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
remote_hostThe address of a host to trace to.
resolve_namesDetermines whether the class resolves the host name for each host during the trace.
timeoutA timeout for the class.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting.
do_eventsProcesses events from the internal message queue.
interruptInterrupt the current method.
resetReset the class.
trace_toTrace the route to a host.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_errorInformation about errors during data delivery.
on_hopFired for each hop in the trace to the RemoteHost .
on_hop_resolvedFired when the name of a hop address is found.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

HopTimeoutInMillisecondsThe hop timeout is treated as milliseconds.
TimeoutInMillisecondsThe timeout is treated as milliseconds.
DontFragmentWhether the DontFragment control flag is set.
IcmpDllTimeoutThe timeout for the class when using the icmp.dll.
MaxMessageSizeThe maximum length of the messages that can be received.
MulticastTTLThe time to live (TTL) value for multicast ICMP packets sent by the class.
ReceiveAllModeEnables a socket to receive all IPv4 or IPv6 packets on the network.
TimeoutInMillisecondsThe timeout is treated as milliseconds.
UseConnectionDetermines whether to use a connected socket.
UseICMPDLLUse the icmp.dll included on Windows Systems.
UseIPHLPDLLUse the iphlpapi.dll included on Windows Systems.
UseIPv6Whether to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Python Edition - Version 20.0 [Build 8307]