diff --git a/Cargo.toml b/Cargo.toml index 8a7dc74..6e9b547 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,8 @@ name = "monocle" path = "src/bin/monocle.rs" [dependencies] -bgpkit-broker = "0.6.2" -bgpkit-parser = "0.9.4" +bgpkit-broker = "0.7.0-beta.5" +bgpkit-parser = { version = "0.10.0-beta.2" , features = ["serde"]} clap = { version = "4.1", features = ["derive"] } itertools= "0.12" rayon = "1.8" @@ -36,9 +36,9 @@ dirs = "5" rusqlite = { version = "0.30", features = ["bundled"] } ureq = {version="2.9", features=["json"]} regex = "1.10" -oneio = "0.15.8" +oneio = "0.16.0" rpki = {version= "0.16.1", features = ["repository"]} -radar-rs = "0.0.2" +radar-rs = "0.1.0" # progress bar indicatif = "0.17.0" diff --git a/README.md b/README.md index 56843d5..5bd5e7e 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,24 @@ See through all BGP data with a monocle. cargo install monocle ``` -### Using `homebrew` +### Using `homebrew` on macOS ```bash brew install bgpkit/tap/monocle ``` +### Using [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall) + +Install `cargo-binstall` first: +```bash +cargo install cargo-binstall +``` + +Then install `monocle` using `cargo binstall` +```bash +cargo binstall monocle +``` + ## Usage Subcommands: @@ -206,7 +218,6 @@ Example queries: | asn | as_name | org_name | org_country | |--------|------------|------------|-------------| | 400644 | BGPKIT-LLC | BGPKIT LLC | US | - ``` You can specify multiple queries: diff --git a/src/database.rs b/src/database.rs index c51c9dd..3897033 100644 --- a/src/database.rs +++ b/src/database.rs @@ -91,7 +91,7 @@ impl MsgStore { }; let origin_string = elem.origin_asns.as_ref().map(|asns| asns.get(0).unwrap()); format!( - "('{}','{}','{}','{}','{}', {},{},{},{},{},{},{},{},{},{})", + "('{}','{}','{}','{}','{}', {},{},{},{},{},{},{},'{}',{},{})", elem.timestamp as u32, t, elem.peer_ip, @@ -104,7 +104,10 @@ impl MsgStore { option_to_string!(&elem.local_pref), option_to_string!(&elem.med), Self::option_to_string_communities(&elem.communities), - option_to_string!(&elem.atomic), + match &elem.atomic { + true => "AG", + false => "NAG", + }, option_to_string!(&elem.aggr_asn), option_to_string!(&elem.aggr_ip), )