ActiveXperts Network Component TraceRoute Object
TraceRoute tracks the route packets taken from an IP network on their way to a given host. It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.
The TraceRoute object is part of the Network Component. Overview of all Network Component objects:
DnsServer & DnsRecord - Ftp & FtpFile - Http - Icmp - IPtoCountry - Msn - Ntp - Radius - Rsh - Scp - SFtp - Ssh - SnmpManager - SnmpTrapManager - SnmpMibBrowser - Tcp - Tftp - TraceRoute - Udp - Xen - Wake-on-LAN - Xen (Citrix)
TraceRoute Sample code
VBScript sample: TraceRoute sample
Dim objTraceRt, objHop
Set objTraceRt = CreateObject("ActiveXperts.TraceRoute") ' Create a traceroute instance
objTraceRt.ResolveHostName = True
objTraceRt.MaxHops = 30
Set objHop = objTraceRt.FindFirstHop( strHost ) ' Find first hop to www.activexperts.com
If( objTraceRt.LastError <> 0 ) Then
WScript.Echo "FindFirstHop failed, error #" & objTraceRt.LastError
Else
While( objTraceRt.LastError = 0 )
WScript.Echo "#" & objHop.Hop & ", IP:" & objHop.IP & " [" & objHop.Host &_
"], Time:" & objHop.ResponseTime & "ms"
Set objHop = objTraceRt.FindNextHop ' Find next hop to www.activexperts.com
WEnd
End If
You can download the full samples here.
