1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use BgpkitParser;
/// This example shows how to parse a MRT file and filter by prefix.
///
/// The corresponding command line execution is:
/// ```text
/// $ bgpkit-parser-cli http://archive.routeviews.org/bgpdata/2021.10/UPDATES/updates.20211001.0000.bz2 --prefix 211.98.251.0/24
/// A|1633046459.372282|168.209.255.56|3741|211.98.251.0/24|3741 3356 58453 9808 9394|IGP|168.209.255.56|0|0||NAG||
/// A|1633046473.592947|168.209.255.56|3741|211.98.251.0/24|3741 3356 58453 9808 9394|IGP|168.209.255.56|0|0||NAG||
/// ```
///
/// The expected output of this example is (log's timestamp will be different):
/// ```text
/// [2021-12-11T02:45:25Z INFO filters] downloading updates file
/// [2021-12-11T02:45:25Z INFO filters] parsing updates file
/// [2021-12-11T02:45:26Z INFO filters] A|1633046459.372282|168.209.255.56|3741|211.98.251.0/24|3741 3356 58453 9808 9394|IGP|168.209.255.56|0|0||NAG||
/// [2021-12-11T02:45:26Z INFO filters] A|1633046473.592947|168.209.255.56|3741|211.98.251.0/24|3741 3356 58453 9808 9394|IGP|168.209.255.56|0|0||NAG||
/// [2021-12-11T02:45:29Z INFO filters] done
/// ```