Skip to content

Commit

Permalink
update dependencies and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
digizeph committed Feb 3, 2024
1 parent ff931cd commit d74c58d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -206,7 +218,6 @@ Example queries:
| asn | as_name | org_name | org_country |
|--------|------------|------------|-------------|
| 400644 | BGPKIT-LLC | BGPKIT LLC | US |
```

You can specify multiple queries:
Expand Down
7 changes: 5 additions & 2 deletions src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
)
Expand Down

0 comments on commit d74c58d

Please sign in to comment.