mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
增加对多MPLS情景的支持,支持通过ENV或参数禁用MPLS功能
要提交的变更: 修改: cmd/cmd.go 修改: printer/basic.go 修改: printer/printer.go 修改: printer/realtime_printer.go 修改: trace/icmp_ipv4.go 修改: trace/icmp_ipv6.go 修改: trace/trace.go 修改: util/util.go
This commit is contained in:
@@ -55,6 +55,7 @@ func Excute() {
|
||||
classicPrint := parser.Flag("c", "classic", &argparse.Options{Help: "Classic Output trace results like BestTrace"})
|
||||
beginHop := parser.Int("f", "first", &argparse.Options{Default: 1, Help: "Start from the first_ttl hop (instead from 1)"})
|
||||
disableMaptrace := parser.Flag("M", "map", &argparse.Options{Help: "Disable Print Trace Map"})
|
||||
disableMPLS := parser.Flag("e", "disable-mpls", &argparse.Options{Help: "Disable MPLS"})
|
||||
ver := parser.Flag("v", "version", &argparse.Options{Help: "Print version info and exit"})
|
||||
srcAddr := parser.String("s", "source", &argparse.Options{Help: "Use source src_addr for outgoing packets"})
|
||||
srcDev := parser.String("D", "dev", &argparse.Options{Help: "Use the following Network Devices as the source address in outgoing packets"})
|
||||
@@ -286,6 +287,10 @@ func Excute() {
|
||||
}
|
||||
}
|
||||
|
||||
if *disableMPLS {
|
||||
util.DisableMPLS = "1"
|
||||
}
|
||||
|
||||
res, err := trace.Traceroute(m, conf)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user