Skip to content

Commit 4a932be

Browse files
committed
opt: add router only option
1 parent 5e1f0ba commit 4a932be

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flashroute_rs"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = [
55
"Bugen Zhao <[email protected]>",
66
"Zhengdong Wang <[email protected]>",

src/opt.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pub struct Opt {
2323
pub probing_rate: u64,
2424
#[structopt(short = "2", help = "Send at least 2 probes to each target")]
2525
pub two: bool,
26+
#[structopt(long)]
27+
pub router_only: bool,
2628

2729
// Connection
2830
#[structopt(long, parse(try_from_str = utils::get_interface), default_value = "")]

src/tracerouter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ impl Tracerouter {
410410
}
411411
} else {
412412
// from destination
413-
backward_stop_set.insert(result.responder);
413+
if !OPT.router_only {
414+
backward_stop_set.insert(result.responder);
415+
}
414416
dcb.stop_forward();
415417
}
416418
}

0 commit comments

Comments
 (0)