| Miroslav Dolecek 2004-05-31, 4:51 pm |
| Hi all,
I want to set VLAN on cisco switch according to membership in Organization
Unit(Active Directory) after user is authenticated by RADIUS server (IAS).
I tried to use RadiusExtensionProcess2 functions on win2k3, but
unsuccessfully. My DLL is made in Visual Studio 2003 and cooperation with
IAS looks good. I need to add IAS string attribute 81
(Tunnel-Pvt-Group-ID) to response packet that is sent to CISCO. If I add
static attribute manually on IAS, everything works fine(I see the value on
CISCO). But when I try to add attribute by IAS extension dll, nothing
appears in cisco debug console. In IAS has attribute 81 data type
octetstring - I don't know what type of string (8bit, 16bit..?) I need
assign to lpValue. I attach part of my test code. Could you write me
please, where I have mistake? Any help
would be greatly appreciated.
Thx Mira
---------------------------------------------------------------------------------
#define _WIN32_WINNT 0x0502 //Win 2K3
#include <windows.h>
#include <authif.h>
#include <string.h>
__declspec(dllexport) DWORD WINAPI RadiusExtensionProcess2(
PRADIUS_EXTENSION_CONTROL_BLOCK pECB
)
{
DWORD dwRet;
RADIUS_ATTRIBUTE raNewAtt;
PRADIUS_ATTRIBUTE_ARRAY pOutAttrs;
CHAR szOUName[5];
if (pECB->repPoint != repAuthentication)
{
return NO_ERROR;
}
if (pECB->rcResponseType == rcAccessReject)
{
return NO_ERROR;
}
pOutAttrs = pECB->GetResponse(pECB, rcAccessAccept);
strcpy (szOUName, "Test");
raNewAtt.dwAttrType=81;
raNewAtt.fDataType=rdtString;
raNewAtt.cbDataLength=sizeof(szOUName);
raNewAtt.lpValue = (const char *)szOUName;
dwRet = pOutAttrs->Add(pOutAttrs, &raNewAtt);
return dwRet;
}
---------------------------------------------------------------------------------
|