[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.2.6 Attribute Creation Functions

These are the functions used to create Radius reply attributes. An attribute creation function can take any number of arguments. The type of its return is determined by the type of Radius attribute the value will be assigned to. To invoke the function, write its name in the A/V pair of the RHS in the ‘raddb/users’ file, e.g.:

        Service-Type = Framed-User,
            Framed-IP-Address = "=get_ip_addr("

The function get_ip_addr will be invoked after successful authentication and it will be passed the IP as its argument. An example of a useful function that can be invoked this way is

get_ip_address(integer base)
    return base + %[NAS-Port-Id] - %[NAS-Port-Id]/16;

This document was generated by Sergey Poznyakoff on December, 6 2008 using texi2html 1.78.