-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Doc] kind of an update {R, A, W, S} / a bit off topic #24
Comments
Hey @cherepanovic , thanks for using BGPStream! Can you take a look at this documentation on data encoding in bgpstream and see if it clarifies things for you? https://bgpstream.caida.org/docs/encoding |
Is there any possibility to request the rips and updates from a collector at the same time? It seems that I have to make two requests for the same time in order to get these two types of updates. |
try import pybgpstream
# create and configure the stream
stream = pybgpstream.BGPStream(
from_time="2017-07-07 00:00:00", until_time="2017-07-07 00:10:00 UTC",
collectors=["route-views.sg", "route-views.eqix"],
record_types=["updates","ribs"],
filter="peer 11666 and prefix more 210.180.0.0/16"
)
# add any additional (or dynamic) filters
# e.g. from peer AS 11666 regarding the more-specifics of 210.180.0.0/16:
# stream.parse_filter_string("peer 11666 and prefix more 210.180.0.0/16")
# or using the old filter interface:
# stream.add_filter("peer-asn", "11666")
# stream.add_filter("prefix-more", "210.180.0.0/16")
# read elems
for elem in stream:
# record fields can be accessed directly from elem
# e.g. elem.time
# or via elem.record
# e.g. elem.record.time
print(elem)
# alternatively, records and elems can be read in nested loops:
for rec in stream.records():
# do something with rec (e.g., choose to continue based on timestamp)
print("Received %s record at time %d from collector %s" % (rec.type, rec.time, rec.collector))
for elem in rec:
# do something with rec and/or elem
print(" Elem Type: %s" % elem.type) |
I have already tried it and got a failure
|
Note that it should be |
Hello bgpstream community,
my request is a bit off topic. Could you provide a description of the BGP updates (and format description of a message). The official documentation from ietf.org is too textuall (too much text, no overview).
Thank a lot!
The text was updated successfully, but these errors were encountered: