PHP 8.3.4 Released!

radius_get_vendor_attr

(PECL radius >= 1.1.0)

radius_get_vendor_attrベンダ固有の属性を取得する

説明

radius_get_vendor_attr(string $data): array

radius_get_attr()RADIUS_VENDOR_SPECIFIC を返す場合に、 ベンダを特定するために radius_get_vendor_attr() をコールします。

パラメータ

data

入力値

戻り値

属性の型、ベンダおよびデータを含む連想配列か、エラー時には false を返します。

例1 radius_get_vendor_attr() の例

<?php
while ($resa = radius_get_attr($res)) {

if (!
is_array($resa)) {
printf ("属性取得エラー: %s\n", radius_strerror($res));
exit;
}

$attr = $resa['attr'];
$data = $resa['data'];
printf("属性を取得:%d %d Bytes %s\n", $attr, strlen($data), bin2hex($data));
if (
$attr == RADIUS_VENDOR_SPECIFIC) {

$resv = radius_get_vendor_attr($data);
if (
is_array($resv)) {
$vendor = $resv['vendor'];
$attrv = $resv['attr'];
$datav = $resv['data'];
printf("ベンダ属性を取得:%d %d Bytes %s\n", $attrv, strlen($datav), bin2hex($datav));
}

}
}
?>

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top