You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I start to study on the BGP and find that BGPStream is just what I need. Because retrieving data from collectors is time-consuming, I was going to filter all the prefixes I need in one pass using multiple conditions in the filter string. But some errors were raised in my first attempt.
After reading the documents and source code, I find multiple conditions are supported for those terms with * in the BGPReader document. And stream.add_filter() in pybgpstream achieves similar results.
So may I ask is there any plan to update bgpstream_filter_parser to support terms appearing more than once? Do I miss somewhere in the documents that indicate this inconsistency? Thank you very much!
-Siwei
Here is how I reproduce the issue.
macOS 10.15.4
Python 3.7.4
libbgpstream 2.0.0-rc4
pybgpstream 2.0.0
Using the same term mutiple times in the filter string will raise error when parsing.
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_type="updates",
filter="prefix more 210.118.0.0/16 and prefix more 210.180.0.0/16"
)
for elem in stream:
print(elem)
2020-04-28 19:17:30 2005: bgpstream_filter_parser.c:165: ERROR: Term 'prefix' used more than once
...
ValueError: Invalid filter string: prefix more 210.118.0.0/16 and prefix more 210.180.0.0/16
But add_filter() does support multiple filters on the same term.
Hi CAIDA team,
Recently, I start to study on the BGP and find that BGPStream is just what I need. Because retrieving data from collectors is time-consuming, I was going to filter all the prefixes I need in one pass using multiple conditions in the filter string. But some errors were raised in my first attempt.
After reading the documents and source code, I find multiple conditions are supported for those terms with * in the BGPReader document. And
stream.add_filter()
in pybgpstream achieves similar results.So may I ask is there any plan to update bgpstream_filter_parser to support terms appearing more than once? Do I miss somewhere in the documents that indicate this inconsistency? Thank you very much!
-Siwei
Here is how I reproduce the issue.
macOS 10.15.4
Python 3.7.4
libbgpstream 2.0.0-rc4
pybgpstream 2.0.0
Using the same term mutiple times in the filter string will raise error when parsing.
But
add_filter()
does support multiple filters on the same term.The text was updated successfully, but these errors were encountered: