Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ indexmap = { version = "2.14.0", features = ["serde"] }
log = { version = "0.4.29", features = ["std"] }
nix = { version = "0.31.3", features = ["feature", "sched"] }
rtnetlink = { git = "https://github.com/rust-netlink/rtnetlink" }
rmsd_yaml = "0.1"
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = "1.0.140"
serde_yaml = "0.9.34"
tokio = { version = "1.30", features = ["rt", "net", "time", "macros"] }

[dev-dependencies]
Expand Down
44 changes: 44 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# TODO

## `ip route`

- add/del/change/replace/append/prepend: support metric options (`mtu`,
`advmss`, `rtt`, `rttvar`, `reordering`, `window`, `cwnd`, `initcwnd`,
`initrwnd`, `ssthresh`, `hoplimit`, `rto_min`, `features`, `quickack`,
`congctl`, `fastopen_no_cookie`, `realms`, `as`) — `src/ip/route/add.rs`
- add/del/change/replace/append/prepend: support multipath (`nexthop ...`,
`weight`), `nhid ID`, and the `pervasive` next-hop flag —
`src/ip/route/add.rs`, `src/ip/route/modify.rs`
- add/del/change/replace/append/prepend: support `tos TOS` and
`ttl-propagate` in NODE_SPEC
- add/del/change/replace/append/prepend: support `encap`
(`mpls | ip | ip6 | seg6 | seg6local | rpl | ioam6 | xfrm`)
- add/del/change/replace/append/prepend: accept TIME values with `s`/`ms`
suffix (e.g. `expires 300s`)
- get: support `vrf NAME` and `as ADDRESS` — `src/ip/route/get.rs`
- show/flush selectors: support `root PREFIX`, `match PREFIX`,
`exact PREFIX`, and `vrf NAME` — `src/ip/route/show.rs`
(`RouteShowFilter::parse`)
- show: display metrics, `expires`, `nhid`, `encap`, `realms`,
`ipproto`/`sport`/`dport`/`flowlabel`; populate `ttl_propagate` from the
dump — `src/ip/route/show.rs` (`parse_nl_msg_to_route`)
- tests: add coverage for the above (`tests/ip_route*.rs`)

## `ip link`

- show: implement `-o`/`--oneline` output — `src/ip/link/show.rs` (also
applies to address/neighbour/route show)
- show: implement `-s`/`--stats` RX/TX statistics output —
`src/ip/link/show.rs`
- add/set: audit per-type options against `ip link add type <TYPE> help`
(candidates: vxlan, bond, bridge)

## `ip address`

- show: implement `-o`/`--oneline` output — `src/ip/address/show.rs`
- show: implement `-s`/`--stats` RX/TX statistics output —
`src/ip/address/show.rs`
- show: accept the `-br` short flag (brief output works via `--brief`, but
`-br` is rejected by clap) — `src/ip/main.rs`
- show: format unknown numeric address protocols like iproute2 (`proto 0x63`,
not `proto 99`) — `src/ip/address/show.rs`
2 changes: 1 addition & 1 deletion src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub trait CanDisplay: serde::Serialize + Sized {
}

fn to_yaml_string(&self) -> String {
serde_yaml::to_string(self).expect("Failed to generate JSON string")
rmsd_yaml::to_string(self).expect("Failed to generate YAML string")
}
}

Expand Down
Loading