RadGetAttributeNumber Function

Action

Retrieves a numeric attribute value from the list of attributes that is returned from the RADIUS server during authentication.

Include file

radius.bdh

Syntax

RadGetAttributeNumber( in nAttributeId  : number ) : number;

Return value

  • Numeric value of the attribute.

Parameter Description
nAttributeId

Attribute identification. Valid values are:

  • RAD_ServiceType

  • RAD_FramedProtocol

  • RAD_LoginTcpPort

  • RAD_FramedRouting

  • RAD_FramedMtu

  • RAD_FramedCompression

  • RAD_LoginService

  • RAD_FramedIpxNetwork

  • RAD_SessionTimeout

  • RAD_IdleTimeout

  • RAD_TerminationAction

  • RAD_FramedAppleTalkLink

  • RAD_FramedAppleTalkNetwork

  • RAD_PortLimit

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;