bit operators

Борис Коваленко b.ju.kovalenko at gmail.com
Sat Feb 18 19:52:56 CET 2017


Hello!

I have an idea to write common filters like

define RF_REDISTRIBUTE_CONNECTED 0x10
define RF_REDISTRIBUTE_STATIC 0x20
.....

protocol ospf main_ospf {
export where f_main_ospf_e(RF_REDISTRIBUTE_CONNECTED |
RF_REDISTRIBUTE_STATIC);
.....
}

function f_main_ospf_e(int flags) {
if(source ~ [RTS_STATIC, RTS_STATIC_DEVICE] && (flags &
RF_REDISTRIBUTE_STATIC)
........
}

Unfortunatelly there are not bit operators :( But may be there is another
way?

Regards,
Boris

-- 

С уважением,
Борис Коваленко
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170218/f4d45976/attachment.html>


More information about the Bird-users mailing list