<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
This is exactly what I’ve been trying to do, most probably I had something wrong with the syntax and that’s why it was not working, I’ll test it this week.<br>
<br>
Thanks!
<div><br>
<br>
<div id="AppleMailSignature" dir="ltr"><span style="background-color: rgba(255, 255, 255, 0);">Saludos Cordiales,<br>
Xavier Trilla P.<br>
</span><a href="https://clouding.io/" style="background-color: rgba(255, 255, 255, 0);"><font color="#000000">Clouding.io</font></a><span style="background-color: rgba(255, 255, 255, 0);"><br>
<br>
¿Un Servidor Cloud con SSDs, redundado<br>
y disponible en menos de 30 segundos?<br>
<br>
¡Pruébalo ahora en </span><a href="https://clouding.io/" style="background-color: rgba(255, 255, 255, 0);"><font color="#000000">Clouding.io</font></a><span style="background-color: rgba(255, 255, 255, 0);">!</span></div>
<div dir="ltr"><br>
El 6 gen 2019, a les 1:30, Ondrej Zajicek <<a href="mailto:santiago@crfreenet.org">santiago@crfreenet.org</a>> va escriure:<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr"><span>On Thu, Jan 03, 2019 at 11:10:00PM +0000, Xavier Trilla wrote:</span><br>
<blockquote type="cite"><span>Hi,</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>For some route selection configurations I need to check the bgp_path.len without some AS numbers.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>I tried something like:</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>bgp_path.delete(AS_1);</span><br>
</blockquote>
<blockquote type="cite"><span>bgp_path.delete(AS_2);</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>if bgp_path.len < N then ...</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>But doing this I modify permanently the AS path.</span><br>
</blockquote>
<blockquote type="cite"><span></span><br>
</blockquote>
<blockquote type="cite"><span>I've tried using a temp variable, but looks like bird doesn't allow to create bgppath "variables".</span><br>
</blockquote>
<span></span><br>
<span>Hi</span><br>
<span></span><br>
<span>Although approach suggested by Alexander Zubkov is applicable,</span><br>
<span>i would note that BIRD allows bgppath variables, see:</span><br>
<span></span><br>
<span>filter testfilter</span><br>
<span>bgppath pp;</span><br>
<span>{</span><br>
<span> pp = bgp_path;</span><br>
<span> pp = prepend(pp, 65500);</span><br>
<span> pp = prepend(pp, 65500);</span><br>
<span> print pp, " ", pp.len;</span><br>
<span> accept;</span><br>
<span>}</span><br>
<span></span><br>
<span>The only think that is strange is that operators like delete or prepend</span><br>
<span>cannot be used with 'dot-syntax' (i.e. pp.prepend(X)), but must be used</span><br>
<span>with 'function-syntax' (i.e. pp = prepend(pp, X)).</span><br>
<span></span><br>
<span>-- </span><br>
<span>Elen sila lumenn' omentielvo</span><br>
<span></span><br>
<span>Ondrej 'Santiago' Zajicek (email: <a href="mailto:santiago@crfreenet.org">santiago@crfreenet.org</a>)</span><br>
<span>OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, <a href="http://wwwkeys.pgp.net">
wwwkeys.pgp.net</a>)</span><br>
<span>"To err is human -- to blame it on a computer is even more so."</span><br>
</div>
</blockquote>
</div>
</body>
</html>