OpenNSL API Guide and Reference Manual
Port Configuration

Overview

The port related APIs provide control over a significant number of port attributes.

Each port known to the API has certain abilities. These abilities are determined during the initialization of the port module. For a given port, the overall capabilities for a port are determined by taking the least common denominator of all the factors. These attributes can be broken by their functionality as follows:

API calls are supplied to set and get port characteristics independently. However, it is often useful to set or get a group of characteristics for a port at the same time. Several functions in the port module accept a pointer to a port information structure or opennsl_port_info_t. This structure is used as in input parameter on some calls and an output parameter on other calls.

Calls using this structure can be generally thought of as making a series of individual calls to the API for port or rate configuration. To allow a subset of the complete list of possible calls, the first field in opennsl_port_info_t is an action mask (action_mask). This mask can be used to control which subset of the possible calls are performed. This applies to both setting and retrieving state. See opennsl_port_info_get for more information.

For both input and output usages, the first fields in the structure are action masks (action_mask, action_mask2). These masks indicate which operations should be performed (as well as which fields are valid). The structure opennsl_port_info_t describes the fields along with an indication of the mask value associated with that field.