radius_put_attr

(PECL radius >= 1.1.0)

radius_put_attr — 이진 속성을 첨부합니다.


설명

radius_put_attr(
    resource $radius_handle,
    int $type,
    string $value,
    int $options = 0,
    int $tag = ?
): bool
                

현재 RADIUS 요청에 이진 속성을 연결합니다.

메모: 이 함수를 호출하려면 먼저 radius_create_request()를 통해 요청을 생성해야 합니다.


매개변수

radius_handle
The RADIUS resource.
type
The attribute type.
value
The attribute value, which will be treated as a raw binary string.
options
속성 옵션의 비트마스크. 사용 가능한 옵션에는 RADIUS_OPTION_TAGGEDRADIUS_OPTION_SALT가 있습니다.
tag
속성 태그. RADIUS_OPTION_TAGGED 옵션이 설정되어 있지 않으면 이 매개변수는 무시됩니다.

반환 값

성공 시 true을 반환하고 오류 시 false를 반환합니다.


변경 로그

버전 설명
PECL radius 1.3.0 optionstag 매개 변수가 추가되었습니다.

Examples

예제 #1 radius_put_attr() 예제

                  
<?php
mt_srand(time());
$chall = mt_rand();
$chapval = md5(pack('Ca*',1 , 'sepp' . $chall));
$pass = pack('CH*', 1, $chapval);
if (!radius_put_attr($res, RADIUS_CHAP_PASSWORD, $pass)) {
    echo 'RadiusError:' . radius_strerror($res). "\n<br />";
    exit;
}
?>
                  
                

기타