Hi all!<br><br>Carlos,<br>If you need create a Handler to match one of those attributes then you have to declare the hook Hugh mentioned (&quot;%D/createavpairs&quot;)  to the Client Clause ( PreHandlerHook ) or , if you can&#39;t specified a specific Client use PreClientHook to make that global.<br>
<br>Using Hugh example, you can then make something like this:<br><br>&lt;Handler  
 service=shell&gt;<br>...<br>&lt;/Handler&gt;<br><br>José Borges Ferreira<br><br><br><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 9:15 PM, Hugh Irvine <span dir="ltr">&lt;<a href="mailto:hugh@open.com.au">hugh@open.com.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hello Carlos -<br>
<br>
There is an example hook in &quot;goodies/hooks.txt&quot; that does this for multiple &quot;cisco-avpairs&quot;.<br>
<br>
You would use something similar for your repeated attributes in a PreClientHook.<br>
<br>
Then you can set up your Handlers using the decoded attributes.<br>
<br>
hope that helps<br>
<br>
regards<br>
<br>
Hugh<br>
<br>
BTW - here is the hook code for your convenience<br>
<br>
.....<br>
<br>
This hook is designed to parse multiple cisco-avpairs.<br>
<br>
Contributed by:<br>
<br>
<a href="mailto:Chris.Patterson@transact.com.au">Chris.Patterson@transact.com.au</a><br>
<br>
All I&#39;m doing here is taking each cisco-avpair attribute from the incoming packet and adding new attributes onto the same incoming packet.<br>
<br>
eg:<br>
        cisco-avpair = &quot;task_id=62&quot;<br>
        cisco-avpair = &quot;timezone=UTC&quot;<br>
        cisco-avpair = &quot;service=shell&quot;<br>
        cisco-avpair = &quot;priv-lvl=0&quot;<br>
        cisco-avpair = &quot;cmd=exit &lt;cr&gt;&quot;<br>
<br>
become:<br>
                task_id = 62<br>
                timezone = UTC<br>
                service = shell<br>
                priv-lvl = 0<br>
                cmd = &quot;exit &lt;cr&gt;&quot;<br>
<br>
Hope this assists people in their endeavours!<br>
<br>
Cheers<br>
Chris.<br>
<br>
<br>
radiator.cfg<br>
<br>
&lt;Handler&gt;<br>
        PreProcessingHook       file:&quot;%D/createavpairs&quot;<br>
        &lt;AuthBy SQL&gt;<br>
                DBSource        dbi:mysql:radius<br>
                DBUsername      test<br>
                DBAuth          test<br>
<br>
                AccountingTable ACCOUNTING<br>
                AcctColumnDef           TIMESTAMP,Timestamp,integer<br>
                AcctColumnDef           NASIP,NAS-IP-Address<br>
                AcctColumnDef           USERNAME,User-Name<br>
                AcctColumnDef           CALLLINGID,Calling-Station-Id<br>
                AcctColumnDef           PRIVLVL,priv-lvl<br>
                AcctColumnDef           CMD,cmd<br>
        &lt;/AuthBy&gt;<br>
&lt;/Handler&gt;<br>
<br>
<br>
createavpairs<br>
<br>
sub {<br>
        my $p=${$_[0]};<br>
        if (my @avpair = $p-&gt;get_attr(&#39;cisco-avpair&#39;)) {<br>
                foreach my $avpair (@avpair) {<br>
                        $p-&gt;add_attr(split(&#39;=&#39;,$avpair));<br>
<div><div></div><div class="h5">                }<br>
        }<br>
}<br>
<br>
<br>
<br>
On 16 Mar 2010, at 21:20, Carlos Parada wrote:<br>
<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I need to access to the list of values of a given attribute (when the attribute is repeated in a packet):<br>
&gt; - I need for example to write all values (or the nth value) in the Log file.<br>
&gt; - Using the perl code (code new issues) I need t know how to access the list of values.<br>
&gt; - In the handler matching rules, I need to say something like &quot;if any of the values match this value or regexp&quot;<br>
&gt;<br>
&gt; How could I do all that (or at least some issues)? Any clues?<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt; Carlos Parada<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; radiator mailing list<br>
&gt; <a href="mailto:radiator@open.com.au">radiator@open.com.au</a><br>
&gt; <a href="http://www.open.com.au/mailman/listinfo/radiator" target="_blank">http://www.open.com.au/mailman/listinfo/radiator</a><br>
<br>
<br>
<br>
</div></div>NB:<br>
<br>
Have you read the reference manual (&quot;doc/ref.html&quot;)?<br>
Have you searched the mailing list archive (<a href="http://www.open.com.au/archives/radiator" target="_blank">www.open.com.au/archives/radiator</a>)?<br>
Have you had a quick look on Google (<a href="http://www.google.com" target="_blank">www.google.com</a>)?<br>
Have you included a copy of your configuration file (no secrets),<br>
together with a trace 4 debug showing what is happening?<br>
<br>
--<br>
Radiator: the most portable, flexible and configurable RADIUS server<br>
anywhere. Available on *NIX, *BSD, Windows, MacOS X.<br>
Includes support for reliable RADIUS transport (RadSec),<br>
and DIAMETER translation agent.<br>
-<br>
Nets: internetwork inventory and management - graphical, extensible,<br>
flexible with hardware, software, platform and database independence.<br>
-<br>
CATool: Private Certificate Authority for Unix and Unix-like systems.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
radiator mailing list<br>
<a href="mailto:radiator@open.com.au">radiator@open.com.au</a><br>
<a href="http://www.open.com.au/mailman/listinfo/radiator" target="_blank">http://www.open.com.au/mailman/listinfo/radiator</a><br>
</div></div></blockquote></div><br>