Skip to content

Output in BGP-dump format #46

@Tf-arch

Description

@Tf-arch

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 dump in stream:
# record fields can be accessed directly from elem
# e.g. elem.time
# or via elem.record
# e.g. elem.record.time
print( dump)

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||

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions