Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0297a29
feat(common): add common crate
Fredi-raspall Feb 28, 2026
97214e0
feat(dataplane): tidy up start_router()
Fredi-raspall Feb 28, 2026
4732476
feat(common): define trait CliDataProvider
Fredi-raspall Mar 11, 2026
3d688ef
chore: add common as dependency of several crates
Fredi-raspall Mar 11, 2026
a18436e
feat(cli): augment cli with new commands
Fredi-raspall Mar 11, 2026
ecd5e77
feat(multiple): define CliSources and populate it
Fredi-raspall Mar 11, 2026
3b590f3
feat(nat,flow-filter,flow-entry): impl traits for cli
Fredi-raspall Mar 11, 2026
21df027
feat(config): augment Display of VpcExpose
Fredi-raspall Mar 11, 2026
4dab1a9
feat(routing): handle new cli requests
Fredi-raspall Mar 11, 2026
7e74c20
refactor(mgmt): tidy up config db
Fredi-raspall Mar 11, 2026
3f9ff7e
feat(mgmt,routing): pass config to router ctl
Fredi-raspall Mar 12, 2026
e72d7e4
feat(config): impl Displays for relevant config
Fredi-raspall Mar 12, 2026
35dfd4d
feat(cli): handle cmd to show config objects
Fredi-raspall Mar 12, 2026
e4d772f
feat(config,routing,mgmt): clean-up + show config history
Fredi-raspall Mar 13, 2026
7bb2185
feat(common): extend CliProvider impls for ArcSwap
Fredi-raspall Mar 13, 2026
5c989c0
feat(nat,routing,dataplane): propagate & show masquerade state
Fredi-raspall Mar 13, 2026
809d83a
feat(flow-filter): move Display impls to display.rs
Fredi-raspall Mar 13, 2026
2785e32
feat(many): use a common util to display headings
Fredi-raspall Mar 13, 2026
435f1f4
feat(port-forwarding): hide warn on flow lifetime extension error
Fredi-raspall Mar 13, 2026
971d59a
feat(mgmt): simplify code
Fredi-raspall Mar 13, 2026
f8c25e9
chore: remove duplicate field
Fredi-raspall Mar 13, 2026
897134d
feat(flow-filter): move tracing target declaration up
Fredi-raspall Mar 14, 2026
dd38070
feat(cli): add cmd to show internal config
Fredi-raspall Mar 14, 2026
4374eb2
feat(config): let VpcExposeXXX timeouts be an Option
Fredi-raspall Mar 14, 2026
fc8dbd5
feat(config): extend vpc expose idle timeout getter to port-forwarding
Fredi-raspall Mar 14, 2026
8ad4837
feat(port-forwarding): map api idle timeout to established timeout
Fredi-raspall Mar 14, 2026
d72251e
feat(mgmt): disable logs
Fredi-raspall Mar 17, 2026
e2f7cee
feat(dataplane): add tracing targets for 3rd party crates
Fredi-raspall Mar 17, 2026
ffd497f
feat(routing): revisit error handling of cli handler
Fredi-raspall Mar 17, 2026
d413fa0
feat(config): change fmt ot times in Display of GwConfigMeta
Fredi-raspall Mar 17, 2026
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
48 changes: 31 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
members = [
"args",
"cli",
"common",
"concurrency",
"concurrency-macros",
"config",
Expand Down Expand Up @@ -48,6 +49,7 @@ repository = "https://github.com/githedgehog/dataplane/"
# Internal
args = { path = "./args", package = "dataplane-args", features = [] }
cli = { path = "./cli", package = "dataplane-cli", features = [] }
common = { path = "./common", package = "dataplane-common", features = [] }
concurrency = { path = "./concurrency", package = "dataplane-concurrency", features = [] }
concurrency-macros = { path = "./concurrency-macros", package = "dataplane-concurrency-macros", features = [] }
config = { path = "./config", package = "dataplane-config", features = [] }
Expand Down
100 changes: 79 additions & 21 deletions cli/bin/cmdtree_dp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ fn cmd_show_router() -> Node {
root
}

fn cmd_show_gateway() -> Node {
let mut root = Node::new("gateway");

root += Node::new("groups")
.desc("Show gateway group settings")
.action(CliAction::ShowGatewayGroups as u16);

root += Node::new("communities")
.desc("Show BGP communities used by gateways")
.action(CliAction::ShowGatewayCommunities as u16);

root
}
fn cmd_show_pipelines() -> Node {
let mut root = Node::new("pipeline")
.desc("Show packet-processing pipelines")
Expand All @@ -60,23 +73,15 @@ fn cmd_show_pipelines() -> Node {

root
}
fn cmd_show_peering() -> Node {
let mut root = Node::new("peering");

root += Node::new("interfaces")
.desc("show details about the peering interfaces")
.action(CliAction::ShowVpcPifs as u16);

root += Node::new("policies")
.desc("show the peering policies")
.action(CliAction::ShowVpcPolicies as u16);
root
}
Comment thread
qmonnet marked this conversation as resolved.
fn cmd_show_vpc() -> Node {
let mut root = Node::new("vpc")
.desc("Show VPCs")
let mut root = Node::new("vpc");
root += Node::new("summary")
.desc("Show a summary of VPCs")
.action(CliAction::ShowVpc as u16);
root += cmd_show_peering();

root += Node::new("peerings")
.desc("Show the peerings of each vpc")
.action(CliAction::ShowVpcPeerings as u16);
root
}
fn cmd_show_ip() -> Node {
Expand Down Expand Up @@ -205,12 +210,6 @@ fn cmd_show_routing() -> Node {

root
}
fn cmd_show_nat() -> Node {
let mut root = Node::new("nat").desc("Show NAT (network address translation)");
root += Node::new("rules").desc("Dump the current NAT mappings");
root += Node::new("port-usage").desc("Usage of transport ports");
root
}
fn cmd_show_dpdk() -> Node {
let mut root = Node::new("dpdk");
let mut ports = Node::new("port").desc("DPDK port information");
Expand All @@ -233,6 +232,61 @@ fn cmd_show_tracing() -> Node {
.action(CliAction::ShowTracingTagGroups as u16);
root
}
fn cmd_show_flow_table() -> Node {
let mut root = Node::new("flow-table");
root += Node::new("entries")
.desc("Show entries in the flow table")
.action(CliAction::ShowFlowTable as u16);

root
}
fn cmd_show_flow_filter() -> Node {
let mut root = Node::new("flow-filter");
root += Node::new("table")
.desc("Show the flow-filter table")
.action(CliAction::ShowFlowFilter as u16);

root
}
fn cmd_show_port_forwarding_rules() -> Node {
let mut root = Node::new("port-forwarding");
root += Node::new("rules")
.desc("Show configured port-forwarding rules")
.action(CliAction::ShowPortForwarding as u16);
root
}
fn cmd_show_masquerading() -> Node {
let mut root = Node::new("masquerading");
root += Node::new("state")
.desc("Show the state of IP and port allocation for masquerading")
.action(CliAction::ShowMasquerading as u16);
root
}
fn cmd_show_static_nat() -> Node {
let mut root = Node::new("static-nat");
root += Node::new("rules")
.desc("Show configured static NAT rules")
.action(CliAction::ShowStaticNat as u16);
root
}
fn cmd_show_nat() -> Node {
let mut root = Node::new("");
root += cmd_show_static_nat();
root += cmd_show_port_forwarding_rules();
root += cmd_show_masquerading();
root
}
fn cmd_show_config_summary() -> Node {
let mut root = Node::new("config");
root += Node::new("summary")
.desc("Show a summary of configuration changes")
.action(CliAction::ShowConfigSummary as u16);
root += Node::new("internal")
.desc("Show the internal configuration")
.action(CliAction::ShowConfigInternal as u16);
Comment thread
qmonnet marked this conversation as resolved.
root
}

fn cmd_show() -> Node {
let mut root: Node = Node::new("show");
root += cmd_show_router();
Expand All @@ -243,6 +297,10 @@ fn cmd_show() -> Node {
root += cmd_show_dpdk();
root += cmd_show_kernel();
root += cmd_show_tracing();
root += cmd_show_flow_table();
root += cmd_show_flow_filter();
root += cmd_show_gateway();
root += cmd_show_config_summary();
root
}
fn cmd_loglevel() -> Node {
Expand Down
22 changes: 18 additions & 4 deletions cli/src/cliproto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,15 @@ pub enum CliAction {
// Eventlog
RouterEventLog,

// flow table
ShowFlowTable,

// flow filter
ShowFlowFilter,

// vpcs
ShowVpc,
ShowVpcPifs,
ShowVpcPolicies,
ShowVpcPeerings,

// pipelines
ShowPipeline,
Expand Down Expand Up @@ -180,8 +185,17 @@ pub enum CliAction {
ShowKernelInterfaces,

// nat
ShowNatRules,
ShowNatPortUsage,
ShowPortForwarding,
ShowStaticNat,
ShowMasquerading,

// gateways
ShowGatewayGroups,
ShowGatewayCommunities,

// config
ShowConfigSummary,
ShowConfigInternal,
}

impl CliAction {
Expand Down
11 changes: 11 additions & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "dataplane-common"
version.workspace = true
edition.workspace = true
license.workspace = true
publish.workspace = true
repository.workspace = true

[dependencies]
left-right = { workspace = true }
arc-swap = { workspace = true }
Loading
Loading