ba_open() -- open driver file and get file descriptor
#include <netinet/ba_stat.h> int ba_open();
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().
The function ba_open() returns the file descriptor on success, and --1 on error.
If an error occurs during a call to ba_open(), the variable ba_errno is set to:
|
BA_SYSERR |
OS error: check errno |