[SR-Users] mtree question

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 18 15:46:43 CEST 2011


Hello,

On 8/18/11 3:15 PM, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> * this is intended to control the behavior of the tree data and matching
>> mode. The default one is 0, match longest prefix and the associated data
>> with the prefix is a string. This is complete implementation.
>>
>> There is actually a second mode, 1, intended to have the data as two
>> integers separated by colon, like 'weight:value' iirc. The matching of
>> any part of the prefix that has data associated with will add 'value'
>> into a list of avps ordered by 'weight'. Since it was not really tested
>> and the implementation might not be full -- due to lack of time at that
>> moment and plans to migrate to use xavp for proper internal
>> representation -- it was left undocumented. I should review this mode
>> soon.
> daniel,
>
> do you see any problems with third mode that is combination of the
> previous two, i.e., where data associated with prefix is a string and
> its weight is determined automatically based on the length of the match
> (depth of the node in the three)?
there is no problem, actually that is the purpose for the tree type. If 
anyone needs, he/she can add.

Probably would be good at some point in time to add type per tree, so 
combination of different types in many trees can be used at the same 
time. The module parameter can stay as default one when the per-tree 
type is not defined -- just thoughts for future enhancements...

Cheers,
Daniel
-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list