Hello there,

I am currently working with BGP route filtering in BIRD daemon, specifically with the bgp_ext_community attribute. 

I want to understand how to properly extract individual values from tuples inside the bgp_ext_community list. For example, when an extended community contains something like (rt, 1, 10), I need to store the third value (10) into a variable and use it in my filter logic. 

I want to iterate with a for loop on the ext_community list (ec) and extract the last value. For example:

# Iterate through all extended communities
    for ec c in bgp_ext_community do {
        print "Yaz: " , c;

And the output:

bird: Started
bird: Yaz: (rt, 2, 70)
bird: Yaz: (rt, 3, 90)
bird: Yaz: (rt, 4, 80)
bird: Yaz: (rt, 5, 20)


I also tried accessing fields with .type or .val, but that seems unsupported --> c.type, or c.val

Could you please clarify:




Any guidance or documentation pointers would be greatly appreciated.

Thank you for your time and for the excellent work on BIRD.

Best regards,
Yazan.