Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output in BGP-dump format from pybgpstream #221

Open
Tf-arch opened this issue Nov 30, 2021 · 0 comments
Open

Output in BGP-dump format from pybgpstream #221

Tf-arch opened this issue Nov 30, 2021 · 0 comments

Comments

@Tf-arch
Copy link

Tf-arch commented Nov 30, 2021

I am getting data from the below code. Could you please tell me how can I get data from pybgpstream in exactly bgpdump format

import pybgpstream
stream = pybgpstream.BGPStream(
from_time="2017-07-07 00:00:00", until_time="2017-07-07 00:10:00 UTC",
collectors=[ "rrc12"],
record_type="updates",
filter="community *:3400"
)

for elem in stream:

print( elem)

**output
update|A|1499386168.000000|ris|rrc12|None|None|2914|80.81.192.46|122.162.240.0/20|80.81.192.46|2914 9498 24560 24560|65500:7018 65500:3257 2914:410 65500:3356 65500:6762 2914:2406 2914:3400 65500:174 65500:3549 65500:7473 65500:3491 2914:1405 65500:1299|None|None

I wanna get output like
BGP4MP|1635316051|A|80.33.33.99|14061|185.25.9.1/32|14061 31500 199624 49058|IGP|80.81.193.66|0|0|333:777 6666:888|NAG||**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant