How to embed WinRadiusClient to your application

home

Background knowledge

RadiusClientApi is the API for RADIUS clients. It can send ACCESS-REQUEST, ACCOUNT_REQUEST to RADIUS server and get the response.

RadiusClient provide 5 APIs:

Definition:

BOOL RadiusStart (char* serverIP, int authPort, int acctPort, char* secret)
BOOL RadiusStop ()
BOOL RadiusSendAuth (char* username, char* password, BOOL waitAnswer)
BOOL RadiusSendStart (char* username, BOOL waitAnswer)
BOOL RadiusSendStop (char* username, BOOL waitAnswer)

Usage:

You shall call RadiusStart before calling all other APIs.
You shall call RadiusStop at last before close your application.
If you enable waitAnswer, the API will not return until it receive a response or timer out.


Sample:

int main ()
{
RadiusStart ("127.0.0.1", 1812, 1813, "WinRadius");
RadiusSendAuth ("test", "1234", TRUE);
RadiusSendStart ("test", TRUE);
RadiusSendStop ("test", TRUE);
RadiusStop ();
return 0;
}

Now, you can download WinRadiusClient (a Win32 DLL) and use it without any charge.

For more information, please contact with us.