ba_get_num_classes() -- retrieve the number of classes for a managed interface.
#include <netinet/ba_stat.h> int ba_get_num_classes ( const char *interface /* interface name*/ );
The function ba_get_num_classes() retrieves the number of configured classes per managed interface.
The function ba_get_num_classes() is passed the following argument:
|
interface |
Pointer to a character string that contains the name of the managed interface. For example, le0, hme0. To specify the direction for which you want class information, append _in or _out to the interface name. If you do not specify the direction, it is assumed to be _out. |
The function ba_get_num_classes() returns the number of classes on success, and -1 on error.
If an error occurs during a call to ba_get_num_classes(), the variable ba_errno is set to one of the error codes listed in Table 4-2.