All notable changes to this project will be documented in this file.
- removing string format prefix like
lg:
orecv6
for large and extended communities- users who work with community value strings will have a unified experience for all community values
- users can still use SDK to match and check different types of community values
- storing AS path filter regex object for reuse
- this will improve filter performance
- allow filter messages by community values
- by converting community values to string and do string comparison
- add
local
flag to allow local-only processing- this removes dependencies like
reqwest
- this removes dependencies like
- support converting singleton AsSet to Vec
- when calling
to_u32_vec_opt
on AS path object, singleton AsSet will be treated as single ASN
- when calling
- fixed a bug where RIS-live withdrawal messages were not properly parsed
- add new RIS-Live async example
- update dependencies
- add
.env
to gitignore - remote unnecessary life-time annotations
- Improved RIS Live message types and handling
- clean up dependencies
models
feature is removed, and all dependencies are now required dependencies for the cratemodels
module no-longer requires dependencies introduced by parser, likebytes
for encoding
- decouple
oneio
fromparser
featureoneio
is no-longer a required dependency for the parser- users can now use
parser
feature withoutoneio
(with--no-default-features
specified)- to create a new parser, one needs to user
BgpkitParser::from_reader
function instead ofBgpkitParser::new
- to create a new parser, one needs to user
- downstream libraries that only utilize parser code (such as RIS Live parsing) no-longer have to depend on oneio
- improve RouteViews Kafka example by allowing wildcard topic subscription
- fixed an issue where when merging
AS_PATH
andAS4_PATH
segments, the parser incorrectly usesAS_PATH
segment content- this issue may manifest as
AS_TRANS
(AS23456
) appearing in the AS path while the correct 32-bit ASN has been sent inAS4_PATH
- this issue may manifest as
- Improved RIS Live message types and handling
- clean up dependencies
models
feature is removed, and all dependencies are now required dependencies for the cratemodels
module no-longer requires dependencies introduced by parser, likebytes
for encoding
- decouple
oneio
fromparser
featureoneio
is no-longer a required dependency for the parser- users can now use
parser
feature withoutoneio
(with--no-default-features
specified)- to create a new parser, one needs to user
BgpkitParser::from_reader
function instead ofBgpkitParser::new
- to create a new parser, one needs to user
- downstream libraries that only utilize parser code (such as RIS Live parsing) no-longer have to depend on oneio
- update
oneio
to v0.17.0- now users can set env var
ONEIO_ACCEPT_INVALID_CERTS=true
to disable certificate validation, useful in some environment where users do not manage certificates
- now users can set env var
- expose all pub structs and enums for BMP messages
- this allows users to access struct definitions and operate on them directly
- added
Copy
toBmpMsgType
,BmpPeerType
andBmpPerPeerHeader
,PerPeerFlags
,BmpPeerType
- implemented
Default
,PartialEq
,Eq
andHash
forBmpPerPeerHeader
- this allows users and compare and hash
BmpPerPeerHeader
structs - also implemented
.strip_timestamp()
to remove the timestamp from theBmpPerPeerHeader
struct for cases where the timestamp is not needed
- this allows users and compare and hash
- rename
MessageBody
toBmpMessageBody
- derive
Clone
,PartialEq
toBmpMessage
andMessageBody
- added serialization/deserialization support for
BmpMessage
andBmpMessageBody
- improve support for more BMP data types and better error
handling (#163)
- added explicit enum
PeerDownReason
,TerminationReason
,PeerUpTlvType
instead of saving them as integers - added support for AFI-SAFI gauge for
StatisticsReport
message- this fixes issue #162
- added
UnknownTlvType
andUnknownTlvValue
errors for parsing BMP TLV records - added
Clone
andPartialEq
derives to most of the BMP message structs
- added explicit enum
- improve end-of-RIB marker detection (#161)
- fixed an code panic issue where malformed RIB dump entry with non-existing peer ID causes a panic
- also removed a number of unwraps in the code to handle errors more gracefully
- see issue #157 for details
- by default handles only
gzip
andbzip2
files- to support
xz
andlz
files, use the optional featurexz
andlz
- to support
- update
oneio
tov0.16.4
- add
http2
andcharset
feature flag toreqwest
- add
- fixed an panic issue when sometimes merging AS path segments of 4-byte ASN path and 2-byte ASN path
- see issue #156 for details
- update
oneio
tov0.16.3
- gzip decompression depends on
flate2
'srust-backend
feature instead ofzlib-ng
which requirescmake
to build
- gzip decompression depends on
- 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
- 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
Version 0.10.0 is a major release with a lot of changes and improvements.
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.
- 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
bgpkit-parser
code test coverage is now at 92%.- codecov.io coverage report is available at https://app.codecov.io/gh/bgpkit/bgpkit-parser
- 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
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
- 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
- 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:
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.
- remove
IoNotEnoughBytes
, and useTruncatedMsg
when not enough bytes available to read
- bump
bytes
crate version to1.5.0
- 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
- added
cargo binstall
support - added SHA256 checksum to corresponding release binary files