Releases: bgpkit/bgpkit-parser
v0.10.2
Highlights
- added new
ip_version
filter type with values ofipv4
oripv6
- library users can use this filter to filter BGP messages by IP version
- CLI users can specify
-4
or-6
to filter BGP messages by IP version
- add new dependency security checkups using
cargo audit
- all new releases will need to pass
cargo audit
checks before being published - weekly
cargo audit
checks added to the CI pipeline
- all new releases will need to pass
v0.10.1
Highlights
- updating
oneio
tov0.16.2
- switching to
flate2
withzlib-ng
for handlinggzip
files, which is significantly faster than the default pure-Rust implementation
- switching to
v0.10.0
Version 0.10.0 is a major release with a lot of changes and improvements.
Highlights
MRT Encoding
bgpkit-parser
now supports encoding MRT messages. The following MRT message types are supported:
- TableDumpV1
- TableDumpV2
- BGP4MP
It also supports encoding BMP messages into MRT files.
Example of writing BgpElems into a file RIB dump file:
let mut encoder = bgpkit_parser::encoder::MrtRibEncoder::new();
for elem in parser {
encoder.process_elem(&elem);
}
let mut writer = oneio::get_writer("filtered.rib.gz").unwrap();
writer.write_all(encoder.export_bytes().as_ref()).unwrap();
drop(writer);
Another example of writing BgpElem
to BGP updates bytes:
let mut encoder = bgpkit_parser::encoder::MrtUpdatesEncoder::new();
let mut elem = BgpElem::default();
elem.peer_ip = IpAddr::V4("10.0.0.1".parse().unwrap());
elem.peer_asn = Asn::from(65000);
elem.prefix.prefix = "10.250.0.0/24".parse().unwrap();
encoder.process_elem(&elem);
elem.prefix.prefix = "10.251.0.0/24".parse().unwrap();
encoder.process_elem(&elem);
let bytes = encoder.export_bytes();
let mut cursor = Cursor::new(bytes.clone());
while cursor.has_remaining() {
let parsed = parse_mrt_record(&mut cursor).unwrap();
dbg!(&parsed);
}
See encoder
module for more details.
Better developer experiences
- added several utility functions to
BgpElem
.is_announcement()
: check if the BGP element is an announcement.get_as_path_opt()
: get the AS path if it exists and no AS set or confederated segments.get_origin_asn_opt()
: get the origin ASN if it exists
- full
serde
serialization support - add
BgpElem
to PSV (pipe-separated values) conversion - improved time-related filters parsing
ts_start
start_ts
ts_end
end_ts
are all supported
- many quality of life improvements by @jmeggitt
Improved testing coverage
bgpkit-parser
code test coverage is now at 92%.- codecov.io coverage report is available at https://app.codecov.io/gh/bgpkit/bgpkit-parser
TLS backend choice
- by default,
bgpkit-parser
now usesrustls
as the default TLS backendopenssl
is still supported, but it is no longer the defaultopenssl
support can be enabled by using thenative-tls
feature flag and set default features tofalse
Added RFCs support
RFC 4724: Graceful Restart Mechanism for BGP
RFC 8671 Support for Adj-RIB-Out in the BGP Monitoring Protocol (BMP)
RFC 9069: Support for Local RIB in the BGP Monitoring Protocol (BMP)
- the supported RFCs list is documented at https://github.com/bgpkit/bgpkit-parser?tab=readme-ov-file#rfcs-support
Fixes
- fixed a bug where when multiple
AsSequences
are present, only the first one is parsed- issue: #140
- fixed a bug where the parser panics when messages are truncated
Other changes
- Move pybgpkit to its own repository at https://github.com/bgpkit/pybgpkit
- CLI build feature changed from
build-binary
tocli
- add more ways to install compiled
bgpkit-parser
CLI- homebrew on macOS:
brew install bgpkit/tap/bgpkit-parser
- other platforms:
cargo binstall bgpkit-parser
- homebrew on macOS:
v0.10.0-beta.3
Highlights
Bytes::split_to
will panic if not enough bytes available.
We added multiple safety checks to make sure enough bytes are available before calling .split_to()
function.
If not enough bytes available, it will send out a TruncatedMsg
error.
The current iterator will catch the error and skip the remainder of the message.
Breaking changes
- remove
IoNotEnoughBytes
, and useTruncatedMsg
when not enough bytes available to read
Other changes
- bump
bytes
crate version to1.5.0
v0.10.0-beta.2
Highlights
- switch to
rustls
as default TLS backend and remove unnecessary build dependencies and feature flags- updated
oneio
to v0.16.0 - remove
openssl
andvendored-openssl
dependency and feature flag for building CLI binary - remove
ureq
dev-dependency
- updated
Release process changes
- added
cargo binstall
support - added SHA256 checksum to corresponding release binary files
v0.10.0-beta.1
V0.10.0-alpha.8 better PSV output
What's Changed
Full Changelog: v0.10.0-alpha.7...v0.10.0-alpha.8
V0.10.0-alpha.7 Fix end-of-rib detection
What's Changed
Full Changelog: v0.10.0-alpha.6...v0.10.0-alpha.7
V0.10.0 Alpha 6 utilities + end-of-RIB detection
What's Changed
- Utility functions by @digizeph in #136
- add support for end-of-RIB message check by @digizeph in #138
Full Changelog: v0.10.0-alpha.5...v0.10.0-alpha.6
V0.10.0-alpha.5 BMP listener example
What's Changed
Full Changelog: v0.10.0-alpha.4...v0.10.0-alpha.5