Go to the first, previous, next, last section, table of contents.


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 RHS in `raddb/users' file, e.g.:

    DEFAULT Auth-Type = SQL
            Service-Type = Framed-User,
                    Framed-IP-Address = "=get_ip_addr(10.10.10.1)"

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

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


Go to the first, previous, next, last section, table of contents.