Using Babel.router_id in filters
Hi, I would like to write a filter for a Babel protocol where I set a value based on the Babel router ID. I can see Babel.router_id in the route attributes, but it does not look like this is exposed to filters. Only babel_metric is exposed. Is there a reason for this or was it an oversight? -- James Oakley james@ttgi.io
On Mon, May 30, 2022 at 11:57:31AM -0300, James Oakley wrote:
Hi,
I would like to write a filter for a Babel protocol where I set a value based on the Babel router ID. I can see Babel.router_id in the route attributes, but it does not look like this is exposed to filters. Only babel_metric is exposed.
Is there a reason for this or was it an oversight?
Hi The primary reason is that we do not have matching data type in filter language to access it (64bit number or arbitrary data). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hello! On 5/30/22 4:57 PM, James Oakley wrote:
I would like to write a filter for a Babel protocol where I set a value based on the Babel router ID. I can see Babel.router_id in the route attributes, but it does not look like this is exposed to filters. Only babel_metric is exposed.
Is there a reason for this or was it an oversight?
Yes, for now this is not exposed as filters don't have an appropriate data type to handle Babel router ID. From my personal point of view, I'd prefer to keep it as is for now until we release version 3.0-alpha1 as there will be better API to implement such a type. Maria
participants (3)
-
James Oakley -
Maria Matejka -
Ondrej Zajicek