Quicklinks
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 ActiveSocket component. Overview of all ActiveSocket objects:
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
On ftp.activexperts-labs.com, you can find a lot of ActiveSocket samples. These samples are also part of the ActiveSocket installation.
Visit ftp.activexperts-labs.com