-
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.
Remove unreachable errors; add unit tests for coverage
- Loading branch information
Showing
4 changed files
with
161 additions
and
10 deletions.
There are no files selected for viewing
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,16 @@ | ||
fn main() -> Result<(), std::io::Error> { | ||
let sample_table = std::fs::read_to_string(concat!( | ||
env!("CARGO_MANIFEST_DIR"), | ||
"/sample-tables/sample-table.txt" | ||
))?; | ||
|
||
let sample_table = format!("const SAMPLE_TABLE: &str = {sample_table:?};\n"); | ||
|
||
let out_dir = std::env::var("OUT_DIR").expect("env OUT_DIR"); | ||
std::fs::write( | ||
format!("{out_dir}/sample_table.rs"), | ||
sample_table.as_bytes(), | ||
)?; | ||
|
||
Ok(()) | ||
} |
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,47 @@ | ||
Routing tables | ||
|
||
Internet: | ||
Destination Gateway Flags Netif Expire | ||
default 192.168.64.1 UGScg en0 | ||
127 127.0.0.1 UCS lo0 | ||
127.0.0.1 127.0.0.1 UH lo0 | ||
169.254 link#5 UCS en0 ! | ||
192.168.64 link#5 UCS en0 ! | ||
192.168.64.1/32 link#5 UCS en0 ! | ||
192.168.64.1 16:9d:99:d7:7d:64 UHLWIir en0 276 | ||
192.168.64.23/32 link#5 UCS en0 ! | ||
224.0.0/4 link#5 UmCS en0 ! | ||
224.0.0.251 1:0:5e:0:0:fb UHmLWI en0 | ||
255.255.255.255/32 link#5 UCS en0 ! | ||
|
||
Internet6: | ||
Destination Gateway Flags Netif Expire | ||
default fe80::%utun0 UGcIg utun0 | ||
default fe80::%utun1 UGcIg utun1 | ||
default fe80::%utun2 UGcIg utun2 | ||
::1 ::1 UHL lo0 | ||
fe80::%lo0/64 fe80::1%lo0 UcI lo0 | ||
fe80::1%lo0 link#1 UHLI lo0 | ||
fe80::%en0/64 link#5 UCI en0 | ||
fe80::ce7:cbd0:7e51:6ad8%en0 52:c8:b9:65:96:34 UHLI lo0 | ||
fe80::%utun0/64 fe80::21c1:53b6:e09d:8ea1%utun0 UcI utun0 | ||
fe80::21c1:53b6:e09d:8ea1%utun0 link#6 UHLI lo0 | ||
fe80::%utun1/64 fe80::80fb:95fb:5b0b:ecdc%utun1 UcI utun1 | ||
fe80::80fb:95fb:5b0b:ecdc%utun1 link#7 UHLI lo0 | ||
fe80::%utun2/64 fe80::ce81:b1c:bd2c:69e%utun2 UcI utun2 | ||
fe80::ce81:b1c:bd2c:69e%utun2 link#8 UHLI lo0 | ||
ff00::/8 ::1 UmCI lo0 | ||
ff00::/8 link#5 UmCI en0 | ||
ff00::/8 fe80::21c1:53b6:e09d:8ea1%utun0 UmCI utun0 | ||
ff00::/8 fe80::80fb:95fb:5b0b:ecdc%utun1 UmCI utun1 | ||
ff00::/8 fe80::ce81:b1c:bd2c:69e%utun2 UmCI utun2 | ||
ff01::%lo0/32 ::1 UmCI lo0 | ||
ff01::%en0/32 link#5 UmCI en0 | ||
ff01::%utun0/32 fe80::21c1:53b6:e09d:8ea1%utun0 UmCI utun0 | ||
ff01::%utun1/32 fe80::80fb:95fb:5b0b:ecdc%utun1 UmCI utun1 | ||
ff01::%utun2/32 fe80::ce81:b1c:bd2c:69e%utun2 UmCI utun2 | ||
ff02::%lo0/32 ::1 UmCI lo0 | ||
ff02::%en0/32 link#5 UmCI en0 | ||
ff02::%utun0/32 fe80::21c1:53b6:e09d:8ea1%utun0 UmCI utun0 | ||
ff02::%utun1/32 fe80::80fb:95fb:5b0b:ecdc%utun1 UmCI utun1 | ||
ff02::%utun2/32 fe80::ce81:b1c:bd2c:69e%utun2 UmCI utun2 |
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