Skip to content

andylibrian/simple-traceroute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Trace route

This is a simplified version of https://github.com/kanocz/tracelib for learning purpose.

Traceroute implementation in go including multi-round trace (returns min/max/avg/lost) and AS number detection for IPv4. Usage example of regular traceroute (only IPs without hostnames and AS numbers):

hops, err := tracelib.RunTrace("google.com", "0.0.0.0", time.Second, 64)
for i, hop := range hops {
	fmt.Printf("%d. %v(%s)/AS%d %v (final:%v timeout:%v error:%v)\n",
      i+1, hop.Host, hop.Addr, hop.AS, hop.RTT, hop.Final, hop.Timeout, hop.Error)
}

Build

go build ./cmd/...

Run

sudo ./simple-traceroute

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages