Function Call to Get User's Attribute from Users File?

jobhunts02 at aol.com jobhunts02 at aol.com
Wed Oct 17 18:44:34 CEST 2012


I have a vendor specific attribute, Max-Data-Bytes, defined for users to set a maximum data usage for each user.  I am using rlm_counter.c to keep track of how much a data usage a user has. When an Accounting-Request comes in, I update the total usage so far for the user. I would then like to compare this number to the user's Max-Data-Bytes value in the users file to determine if the user should be disconnected.



On Oct 17, 2012, at 1:14 AM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:

> On 10/17/2012 07:27 AM, jobhunts02 at aol.com wrote:
>> Is there a function call to get the value of an attribute for a user from the users file?
> 
> Not sure I understand what you want here. A function call where?
> 
> Obviously there are function calls to handle "users" files in the source - see:
> 
> src/modules/rlm_files/rlm_files.c
> 
> ...however there's no single, simple call "to get the value of an attribute" because that's not how users files work. They're lists of attribute-value pairs to be checked and replied, with optional expansion and dictionary handling.
> 
> Perhaps if you explain what you're trying to achieve?
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html


More information about the Freeradius-Devel mailing list