Thanks for you prompt reply, Alan. I'll follow your advice. The reason I havent used the "pair" functions is because although I spotted the API header, havent spotted any instructions on how they are used? The check for return values were removed from this example, as I wish to make it as short as possible. This test program is to be the basis of a client app, which is the reason im not using radclient. If fact I compared the data structure of the example packet I generate, with that created by radclient using the same data - They look identical except the vector value is different. This lack of difference is what i can't explain.

Many thanks,

Arun Mundray.


----- Original Message ----- From: "Alan DeKok" <[EMAIL PROTECTED]>
To: <freeradius-users@lists.freeradius.org>
Sent: Friday, May 20, 2005 5:09 PM
Subject: Re: Its so simple, but it doesn't work!



"Arun Mundray" <[EMAIL PROTECTED]> wrote:
I was hoping someone could explain to me why this very basic radius client
test program does not work.

What's wrong with using "radclient"?

vp1 = (VALUE_PAIR *)malloc(sizeof(VALUE_PAIR));

What's wrong with calling pairmake()?

 ppacket->vps = vp1;
 vp1->next = vp2;
 vp2->next = NULL;

What's wrong with calling pairadd()?

 These functions exist for a reason.  Use them.

rad_send(ppacket, NULL, secret);

So... what does radsend when you set the debuging flags?

 close (ppacket->sockfd);
 rad_free(&ppacket);

And you don't look for a response. Hm...

 Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html





- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to