Solaris Bandwidth Manager 1.6 Developer Guide

ba_open()

Name

ba_open() -- open driver file and get file descriptor

Synopsis

#include <netinet/ba_stat.h>

int ba_open();

Description

The function ba_open() opens the driver file /dev/ipqos, which is used to access the ipqos module, and returns the file descriptor. There can only be one instance of the ipqos module per user process; therefore, if the file has already been opened by a previous function call, ba_open() returns the current file descriptor.

If the device driver has been closed previously with a call to ba_close(), the event mask is reset to the default value (0). You must set the event mask again for events to be detected by ba_get_next_event().

Returns

The function ba_open() returns the file descriptor on success, and --1 on error.

Errors

If an error occurs during a call to ba_open(), the variable ba_errno is set to:

BA_SYSERR

OS error: check errno