-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is very basic and just meant for verifying test helpers.
- Loading branch information
Showing
9 changed files
with
204 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
router id 10.234.56.78; | ||
|
||
flow4 table myflow4; | ||
flow6 table myflow6; | ||
|
||
protocol static f4 { | ||
flow4 { table myflow4; }; | ||
|
||
route flow4 { | ||
dst 10.0.0.0/8; | ||
length > 1024; | ||
} { | ||
bgp_ext_community.add((unknown 0x810c, 1.1.1.1, 0)); | ||
}; | ||
} | ||
|
||
protocol static f6 { | ||
flow6 { table myflow6; }; | ||
|
||
route flow6 { | ||
dst fec0:1122:3344:5566:7788:99aa:bbcc:ddee/128; | ||
tcp flags 0x03/0x0f && !0/0xff || 0x33/0x33; | ||
dport = 6000; | ||
fragment !is_fragment || !first_fragment; | ||
} { | ||
bgp_community.add((65001, 11451)); | ||
bgp_ext_community.add((generic, 0x080060000, 0)); | ||
bgp_ext_community.add((ro, 65002, 1919)); | ||
}; | ||
} | ||
|
||
protocol bgp flow_test { | ||
debug all; | ||
|
||
local as 65000; | ||
neighbor ::1 port 1179 as 65000; | ||
multihop; | ||
|
||
ipv4 { import none; export all; }; | ||
ipv6 { import none; export all; }; | ||
flow4 { table myflow4; import none; export all; }; | ||
flow6 { table myflow6; import none; export all; }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use crate::args::Cli; | ||
use crate::cli_entry; | ||
use std::future::Future; | ||
use std::process::ExitCode; | ||
use tokio::task::{JoinHandle, LocalSet}; | ||
|
||
pub type CliChild = JoinHandle<anyhow::Result<ExitCode>>; | ||
|
||
pub async fn run_cli<F, Fut, R>(options: Cli, f: F) -> anyhow::Result<R> | ||
where | ||
F: FnOnce(CliChild, &LocalSet) -> Fut, | ||
Fut: Future<Output = anyhow::Result<R>>, | ||
{ | ||
let ls = LocalSet::new(); | ||
let cli = ls.spawn_local(async { | ||
let exit_code = cli_entry(options).await; | ||
anyhow::Ok(exit_code) | ||
}); | ||
ls.run_until(f(cli, &ls)).await | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod bird; | ||
pub mod cli; | ||
pub mod kernel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters