net_get_interfaces

ネットワークインターフェイスを取得する

説明

arrayfalse net_get_interfaces()

ローカルマシン上にあるネットワークインターフェイス(アダプタ) の一覧を返します。

パラメータ

この関数にはパラメータはありません。

戻り値

Returns an associative array where the key is the name of the interface and the value an associative array of interface attributes, 失敗した場合に false を返します.

Each interface associative array contains:

インターフェイスの属性
名前 説明
description インターフェイスの説明を示すオプションの値。 Windows でのみ有効です。
mac インターフェイスのMACアドレスを示すオプションの値。 Windows でのみ有効です。
mtu インターフェイスのMTUを示す整数値。 Windows でのみ有効です。
unicast 連想配列の配列。 詳細は以下のユニキャストに関する属性を参照ください。
up インターフェイスの状態 (on/off) を示す Boolean の値。

Unicast attributes
名前 説明
flags 整数値。
family 整数値。
address IPv4 または IPv6 形式の、アドレスを示す文字列。
netmask IPv4 または IPv6 形式の、ネットマスクを示す文字列。

エラー / 例外

インターフェイス情報を取得できなかった場合は、 E_WARNING が発生します。