RadSetAttributeNumber Function

Action

Sets a numeric attribute in the list of attributes that is sent to the RADIUS server during authentication.

Include file

radius.bdh

Syntax

RadSetAttributeNumber( in nAttributeId    : number,
                       in nAttributeValue : number );
Parameter Description
nAttributeId

Attribute identification. Valid values are:

  • RAD_NasPort

  • RAD_ServiceType

  • RAD_FramedProtocol

  • RAD_FramedCompression

  • RAD_NasPortType

  • RAD_PortLimit

  • RAD_AcctStatusType

  • RAD_AcctDelayTime

  • RAD_AcctInputOctets

  • RAD_AcctOutputOctets

  • RAD_AcctAuthentic

  • RAD_AcctSessionTime

  • RAD_AcctInputPackets

  • RAD_AcctOutputPackets

  • RAD_AcctTerminateCause

  • RAD_AcctLinkCount

nAttributeValue Numeric value of the attribute to set.

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;