functions question

Jaroslav Jirásek jirasek at sauron.cz
Fri Apr 13 11:09:58 CEST 2012


Hello,

I want to do function, which adds many communities
in one function call


now I use it like this:

function add_community(pair peer_community)
{
         bgp_community.add(peer_community);
         return true;
}

add_community((11111, 4444)) && add_community((11111, 5555)) && 
add_community((2222, 6666))



and I want to do something like this:

function add_community(pair set peer_community)
{
         bgp_community.add(peer_community); # doesnt work, incompatible 
types
         return true;
}

and call it like this:

add_community([ (11111, 4444), (11111, 5555), (2222, 6666) ])


is it possible?

Thank you

Jirasek




More information about the Bird-users mailing list