RadGetAttributeString Function

Action

Retrieves a string attribute value from the list of attributes that's returned by the RADIUS server during authentication.

Include file

radius.bdh

Syntax

RadGetAttributeString( in nAttributeId  : number ): string;

Return value

  • String value of the attribute

Parameter Description
nAttributeId

Attribute identification. Valid values are:

  • RAD_LoginIpHost

  • RAD_FilterId

  • RAD_ReplyMessage

  • RAD_CallbackNumber

  • RAD_CallbackId

  • RAD_FramedRoute

  • RAD_State

  • RAD_Class

  • RAD_ProxyState

  • RAD_LoginLatService

  • RAD_LoginLatNode

  • RAD_LoginLatGroup

  • RAD_FramedAppleTalkZone

  • RAD_LoginLatPort

Example

dcltrans
  transaction TRun
  var
    nCode : number;
  begin
    RadSetAttributeNumber(RAD_NasPort, 1234);
    RadSetAttributeString(RAD_CallingStationId, "+1 1234 123 1234");
    nCode := RadAuthenticate(RAD_AUTH_MSCHAP2, "user", "pass");
    if nCode = RAD_AccessAccept then
      Print("Authentication successful");
      Print("Service Type = " + string(RadGetAttributeNumber(RAD_ServiceType)));
      Print("Framed_Protocol = " + string(RadGetAttributeNumber(RAD_FramedProtocol)));
      Print("Login_IP_Host = " + RadGetAttributeString(RAD_LoginIpHost));
      Print("Login_TCP_Port = " + string(RadGetAttributeNumber(RAD_LoginTcpPort)));
      Print("Reply_Message = " + RadGetAttributeString(RAD_ReplyMessage));
    else
      Print("Authentication failed");
    end;
  end TRun;