fix bugs:ft下maxhops、pktsize不正常显示、tracemap在配置环境变量时不能正常使用、trace时无法显示第一跳

This commit is contained in:
tsosunchia
2023-06-04 04:12:57 +08:00
parent 85df0121fd
commit dcce91614f
5 changed files with 70 additions and 63 deletions

View File

@@ -63,13 +63,13 @@ func PluginCopyRight() {
)
}
func PrintTraceRouteNav(ip net.IP, domain string, dataOrigin string, maxHops int) {
func PrintTraceRouteNav(ip net.IP, domain string, dataOrigin string, maxHops int, packetSize int) {
fmt.Println("IP Geo Data Provider: " + dataOrigin)
if ip.String() == domain {
fmt.Printf("traceroute to %s, %d hops max, 32 byte packets\n", ip.String(), maxHops)
fmt.Printf("traceroute to %s, %d hops max, %d bytes packets\n", ip.String(), maxHops, packetSize)
} else {
fmt.Printf("traceroute to %s (%s), %d hops max, 32 byte packets\n", ip.String(), domain, maxHops)
fmt.Printf("traceroute to %s (%s), %d hops max, %d bytes packets\n", ip.String(), domain, maxHops, packetSize)
}
}