Build Emacs 27 from source code and install Doom Emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::Cursor; | |
use rdkafka::{ClientConfig, ClientContext, Message}; | |
use rdkafka::consumer::{CommitMode, Consumer, ConsumerContext, StreamConsumer}; | |
pub use bgpkit_parser::{parse_bmp_msg, parse_openbmp_header}; | |
use log::{info, error}; | |
// A simple context to customize the consumer behavior and print a log line every time | |
// offsets are committed | |
struct LoggingConsumerContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bgpkit_parser::BgpkitParser; | |
fn main() { | |
let url = | |
"http://archive.routeviews.org/bgpdata/\ | |
2021.10/UPDATES/updates.20211001.0000.bz2"; | |
for elem in BgpkitParser::new(url) { | |
println!("{:?}|{:?}|{:?}|{:?}|{:?}", | |
elem.elem_type, | |
elem.timestamp, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"count": 5, | |
"current_page": 1, | |
"items": [ | |
{ | |
"collector_id": "route-views.amsix", | |
"data_type": "update", | |
"timestamp": 1633362300, | |
"url": "http://archive.routeviews.org/route-views.amsix/bgpdata/2021.10/UPDATES/updates.20211004.1545.bz2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bgpkit_parser::BgpkitParser; | |
fn main() { | |
let url = | |
"http://archive.routeviews.org/bgpdata/\ | |
2021.10/UPDATES/updates.20211001.0000.bz2"; | |
for elem in BgpkitParser::new(url) { | |
println!("{:?}|{:?}|{:?}|{:?}|{:?}", | |
elem.elem_type, | |
elem.timestamp, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::BufReader; | |
use bzip2::read::BzDecoder; | |
use bgpkit_parser::{BgpElem, BgpkitParser}; | |
/// This example shows how use BGPKIT Broker to retrieve a number of data file pointers that matches | |
/// the time range criteria, and then parse the data files for each one. | |
/// | |
/// The dependency needed for this example are: | |
/// ``` | |
/// bzip2="0.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LABEL maintainer="YOUR NAME <YOUR@EMAIL>" | |
# select build image | |
FROM rust:1.52 as build | |
# create a new empty shell project | |
RUN USER=root cargo new --bin my_project | |
WORKDIR /my_project | |
# if you need nightly | |
# change toolchain to nightly for rocket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ bgpreader -k 17.29.115.0/24 -w 1622664000,1622665200 -a 55410 --record-type updates 2>/dev/null | |
U|A|1622664887.000000|ris|rrc12|||57695|80.81.192.231|17.29.115.0/24|80.81.192.231|57695 60068 33891 6461 9498 55410 55410 55410|55410|57695:13000|| | |
U|A|1622664891.000000|ris|rrc03|||205206|193.239.117.18|17.29.115.0/24|193.239.117.18|205206 33891 6461 9498 55410 55410 55410|55410|33891:33893 33891:33896 33891:40071|| | |
U|A|1622664917.000000|ris|rrc03|||205206|193.239.117.18|17.29.115.0/24|193.239.117.18|205206 33891 6461 9498 55410 55410 55410|55410|33891:33893 33891:33896 33891:40071|| | |
U|A|1622664925.000000|ris|rrc20|||31424|91.206.52.17|17.29.115.0/24|91.206.52.17|31424 33891 6461 9498 55410 55410 55410|55410|33891:33893 33891:33896 33891:40071 31424:1150|| | |
U|A|1622664927.000000|ris|rrc05|||47692|193.203.0.192|17.29.115.0/24|193.203.0.192|47692 33891 6461 9498 55410 55410 55410|55410|33891:33893 33891:33896 33891:40071 47692:30000 47692:30140|| | |
U|A|1622664928.000000|ris|rrc12|||47692|80.81.194.100|17.29.115.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ bgpreader -w'2021-02-22 11:00','2021-02-22 13:00' -k 193.53.37.0/24 -t updates -c rrc00|grep 194.28.98.37 | |
U|W|1613992145.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|||||| | |
U|A|1613992145.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|194.28.98.37|34872 39533 29396 39686|39686|0:39533 39533:49666|| | |
U|A|1613992164.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|194.28.98.37|34872 24961 3257 174 39686|39686|24961:1 24961:8108 24961:9002|| | |
U|A|1613992168.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|194.28.98.37|34872 24961 3257 174 39686|39686|24961:1 24961:8108 24961:9002|| | |
U|W|1613992169.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|||||| | |
U|A|1613992169.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|194.28.98.37|34872 39533 35625 29396 39686|39686|0:39533 35625:29396 35625:64512 39533:49666 51706:64601 51706:64650 51706:65011 51706:65023|| | |
U|A|1613992194.000000|ris|rrc00|||34872|194.28.98.37|193.53.37.0/24|194.28.98.37|34872 39533 13030 1299 174 39686|39686|0:39533 1299 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update|A|1612537210.000000|ris|rrc11|None|None|24482|198.32.160.242|104.244.42.0/24|198.32.160.242|24482 13414 13414|24115:65023 24115:13414 24482:65302 24482:13021 24482:13020 24482:2|None|None | |
update|A|1612537237.000000|routeviews|route-views.telxatl|None|None|27446|198.32.132.160|104.244.42.0/24|198.32.132.160|27446 27446 13414 13414||None|None | |
update|A|1612537714.000000|ris|rrc03|None|None|208627|193.239.118.142|104.244.42.0/24|193.239.118.142|208627 43350 13414 13414||None|None | |
update|A|1612538393.000000|ris|rrc12|None|None|42861|80.81.195.167|104.244.42.0/24|80.81.195.167|42861 13414 13414|42861:2300 42861:3000 6777:65023 6777:65011|None|None | |
update|A|1612538432.000000|ris|rrc07|None|None|20764|194.68.123.188|104.244.42.0/24|194.68.123.188|20764 13414 13414|20764:3000 20764:3033 20764:3020 6777:65023 6777:65011 20764:3014|None|None | |
update|A|1612539329.053464|routeviews|route-views.eqix|None|None|199524|206.126.237.22|104.244.42.0/24|206.126.237.22|199524 13414 13414||None|None | |
update|A|1612539329.067115 |