OpenNSL API Guide and Reference Manual
Layer 2 Address Management

Overview

The Layer 2 (L2) API allows network application developers to manage Layer 2 network forwarding behavior within the network switch. In addition to allowing programming of the Address Resolution (ARL) tables, it provides a mechanism for changing in general, the behavior of the ARL controller.

Fundamental to the use of L2 address table entries is a type, opennsl_l2_addr_t, which is used to communicate the L2 entry to the network switch device.

In other API routines, either a MAC address and/or VLAN ID are used for manipulation of the address table.

When creating a new L2 entry (opennsl_l2_addr_t), use the opennsl_l2_addr_t_init() routine. This sets up a new L2 entry with the user-provided MAC address and VLAN identifier.