RadSetAttributeBinary Function

Action

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

Include file

radius.bdh

Syntax

RadSetAttributeBinary( in nAttributeId    : number
                       in sAttributeValue : string,
                       in nLen            : number optional );
Parameter Description
nAttributeId Attribute identification. Any attribute value can be set as a binary data, although it is more comfortable to set them using the related typed function.
sAttributeValue Binary value of the attribute to be set.
nLen Number of character to be set (optional).

Example

dcltrans
  transaction TRun
  var
    nCode : number;
  begin
    RadSetAttributeNumber(RAD_NasPort, 1234);
    RadSetAttributeString(RAD_CallingStationId, "+1 1234 123 1234");
    RadSetAttributeBinary(RAD_VendorSpecific, "\h000001370b0a153ea6378f1b7012");
    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;