Crates.io | bgpkit-commons |
lib.rs | bgpkit-commons |
version | 0.7.3 |
source | src |
created_at | 2023-09-03 20:42:50.777334 |
updated_at | 2024-10-31 18:57:01.033841 |
description | A library for common BGP-related data and functions. |
homepage | |
repository | https://github.com/bgpkit/bgpkit-commons |
max_upload_size | |
id | 962443 |
size | 148,195 |
This readme is generated from the library's doc comments using cargo-readme. Please refer to the Rust docs website for the full documentation
BGPKIT-Commons is a library for common BGP-related data and functions.
It provides the following modules:
mrt_collectors
: public RouteViews and RIPE RIS MRT mrt_collectors information extracted from their official APIsasinfo
: Autonomous System (AS) information and country lookupcountries
: country code to name and other information lookuprpki
: RPKI validation data. Historical data from RIPE NCC and real-time data from Cloudflarebogons
: IP prefix and ASN bogon lookupas2rel
: AS-level relationship data, generated by BGPKITAdd bgpkit-commons
to your Cargo.toml
's dependencies
section:
bgpkit-commons = "0.7"
bgpkit-commons
is designed to load only the data you need. Here is an example of checking if an ASN is a bogon ASN:
use bgpkit_commons::BgpkitCommons;
let mut bgpkit = BgpkitCommons::new();
bgpkit.load_bogons().unwrap();
assert!(bgpkit.bogons_match("23456").unwrap());
The common steps include:
BgpkitCommons
instancebgpkit.load_xxx()
functionsbgpkit.xxx_yyy()
For detailed usages, please refer to the module documentation.
rustls
(default): use rustls instead of native-tls for the underlying HTTPS requestsnative-tls
: use native-tls as the backendMIT