How to extract A/V pairs from an Access-Request packet
Alan DeKok
aland at ox.org
Thu Jan 5 18:16:00 CET 2006
Maria Ripolles <mariaripolles63 at yahoo.es> wrote:
> for ( aux=request_pairs; aux; aux=aux->next)
> {
> Attribute_Name = aux->name;
> Attribute_Value = aux->strvalue;
>
> if (aux->attribute == PW_CONNECT_INFO)
Use the "pairfind" function. See the existing code for examples.
static int mymodule_authorize (void *instance, REQUEST *request) {
VALUE_PAIR *vp;
...
vp = pairfind(request->packet->vps, PW_CONNECT_INFO);
if (vp) {
type = auxiliar (vp->strvalue);
}
Alan DeKok.
More information about the Freeradius-Devel
mailing list