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 |
管理されるインタフェース名を含む文字列を指すポインタ (le0、hme0 など) |
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 つに設定されます。