Solaris Bandwidth Manager 1.6 Developer Guide

ba_get_interface_config()

Name

ba_get_interface_config() -- retrieve the interface configuration information

Synopsis

#include <netinet/ba_stat.h>

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

Description

The function ba_get_interface_config() retrieves the configuration information for the specified interface.

Arguments

The function ba_get_interface_config() is passed the following argument:

interface

Pointer to a character string that contains the name of the managed interface. For example, le0, hme0.

Structures of type ba_interface_t are defined as follows:

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

Where suffix is either in to indicate that the interface handles incoming traffic, or out to indicate that it handles outgoing traffic.

Returns

The function ba_get_interface_config() returns 0 on success, and -1 on error.

Errors

If an error occurs during a call to ba_get_interface_config(), the variable ba_errno is set to one of the error codes listed in Table 4-2.