Radclient Queries
Himanshu Pandey
pandey_himanshu80 at rediffmail.com
Fri Sep 19 14:20:03 CEST 2014
Dear Friends,As suggested I went through the code of freeradius thoroughly and developed a reasonable understanding of the same. Now I want to do a practical exercise:Using radclient I want to create and send a dummy request to user module in order to take it's statistics.I would like to store username & password in a file.Please tell me what all steps do I have to perform in order to test the above scenario. Meaning which all files do I have to modify and how to perform the testing.Thanks in advance.Sonu
From: Arran Cudbard-Bell <a.cudbardb at freeradius.org>
Sent: Fri, 19 Sep 2014 00:27:57
To: FreeRadius users mailing list <freeradius-users at lists.freeradius.org>
Subject: Re: Freeradius Queries
> Fine I will go through the code thoroughly now.
Good luck. As Alan said, if you have a specific need to modify the code then tell us
what it is and we can advise you on the best way to achieve what you want.
> One question that I have is how AVPs (Attribute Value Pairs) are stored in memory in freeradius.
http://doc.freeradius.org/libradius_8h.html#structVALUE__PAIR
They're stored in the above structure, and alloced on the heap at run time.
They're parented from either the REQUEST struct, or from a RADIUS_PACKET struct
to ensure they're cleaned up when the REQUEST is freed.
Fixed length values are stored in the value_data_t union, octets, text and tlv
attributes have dynamically allocated buffers parented off the VALUE_PAIR.
These buffers are pointed to by the value_data_t union.
VALUE_PAIRs are always allocated with pairalloc, and are freed using talloc_free
or pairfree (if you need to free a linked list of AVPs).
The vendor, number and type of attributes are in the DICT_ATTR struct. These are
usually allocated on startup when reading the config and dictionaries. The da
field of the VALUE_PAIR struct points to a DICT_ATTR struct.
VALUE_PAIR (text, octets, tlv) buffers should be considered immutable. If a new
value needs to be assigned, the old buffer is freed and a new one allocated.
talloc_free performs all necessary cleanup for VALUE_PAIRs.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140919/a5fef811/attachment.html>
More information about the Freeradius-Users
mailing list