Solaris Bandwidth Manager 1.6 の開発

ba_get_interface_config()

名前

ba_get_interface_config() - インタフェースの設定情報を取得します。

形式

#include <netinet/ba_stat.h>

int ba_get_interface_config(
	 const char *interface, /*interface name*/
	 ba_interface_t *config /*configuration information*/
);

説明

ba_get_interface_config() 関数は、指定されたインタフェースの設定情報を取得します。

引数

ba_get_interface_config() 関数には次の引数を渡します。

interface

管理されるインタフェース名を含む文字列を指すポインタ (le0hme0 など)

ba_interface_t 型の構造体は次のように定義されています。


typedef struct {
	ba_name_t					name_suffix;
	uint_t					activate;
	uint_t					rate;
} ba_interface_t;

name_suffix は、インタフェースが着信トラフィックを処理することを示す in、または発信トラフィックを処理することを示す out のどちらかです。

戻り値

ba_get_interface_config() 関数は、正常に終了した場合には 0、エラー時には -1 を返します。

エラー

ba_get_interface_config() 呼び出しの際にエラーが発生すると、変数 ba_errno表 4-2 に示したエラーコードの 1 つに設定されます。