Skip to content

Releases: bgpkit/bgpkit-parser

v0.10.9

12 Apr 14:09
78e9aca
Compare
Choose a tag to compare

BMP messages SDK improvements

  • expose all pub structs and enums for BMP messages
    • this allows users to access struct definitions and operate on them directly
  • added Copy to BmpMsgType, BmpPeerType and BmpPerPeerHeader, PerPeerFlags, BmpPeerType
  • implemented Default, PartialEq, Eq and Hash for BmpPerPeerHeader
    • this allows users and compare and hash BmpPerPeerHeader structs
    • also implemented .strip_timestamp() to remove the timestamp from the BmpPerPeerHeader struct for cases where
      the timestamp is not needed
  • rename MessageBody to BmpMessageBody
  • derive Clone, PartialEq to BmpMessage and MessageBody
  • added serialization/deserialization support for BmpMessage and BmpMessageBody

v0.10.8

05 Apr 22:15
c76b5e4
Compare
Choose a tag to compare

Highlights

  • 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 and UnknownTlvValue errors for parsing BMP TLV records
    • added Clone and PartialEq derives to most of the BMP message structs

v0.10.7

04 Apr 16:03
af03064
Compare
Choose a tag to compare

Highlights

  • improve end-of-RIB marker detection (#161)

v0.10.6

30 Mar 18:36
ce02577
Compare
Choose a tag to compare

Bug fix

  • 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 #158 for details. thanks @mbUSC for the bug report

v0.10.5

27 Mar 22:51
56c4d09
Compare
Choose a tag to compare

Highlights

  • by default handles only gzip and bzip2 files
    • to support xz and lz files, use the optional feature xz and lz

v0.10.4

20 Mar 22:56
2d5e722
Compare
Choose a tag to compare

Hot fix

  • update oneio to v0.16.4
    • add http2 and charset feature flag to reqwest

[YANKED] v0.10.3

20 Mar 22:34
7896c23
Compare
Choose a tag to compare

v0.10.3 YANKED DUE TO UPSTREAM LIBRARY ISSUE, USE v0.10.4 OR ABOVE

Highlights

  • 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 to v0.16.3
    • gzip decompression depends on flate2's rust-backend feature instead of zlib-ng that requires cmake to build

v0.10.2

07 Mar 02:07
0e255f0
Compare
Choose a tag to compare

Highlights

  • added new ip_version filter type with values of ipv4 or ipv6
    • 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

v0.10.1

23 Feb 23:30
19a100f
Compare
Choose a tag to compare

Highlights

  • updating oneio to v0.16.2
    • switching to flate2 with zlib-ng for handling gzip files, which is significantly faster than the default pure-Rust implementation

v0.10.0

11 Feb 18:45
209234a
Compare
Choose a tag to compare

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

TLS backend choice

  • by default, bgpkit-parser now uses rustls as the default TLS backend
    • openssl is still supported, but it is no longer the default
    • openssl support can be enabled by using the native-tls feature flag and set default features to false

Added RFCs support

Fixes

  • fixed a bug where when multiple AsSequences are present, only the first one is parsed
  • 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 to cli
  • add more ways to install compiled bgpkit-parser CLI
    • homebrew on macOS: brew install bgpkit/tap/bgpkit-parser
    • other platforms: cargo binstall bgpkit-parser