Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
The Link Layer Discovery Protocol (LLDP) is defined in the IEEE 802.1AB specification. It is a Link Layer protocol which is used by network devices to advertise their identity, system description and capabilities to other devices connected in the network. The received information is stored by the devices as LLDP Neighbor Information. This information database can be accessed by a Network Management System (NMS) to build a view of the Network Topology.
This document provides a brief description of the LLDP OpEN APIs. The LLDP OpEN APIs allows processes outside of the ICOS main process (switchdrvr) access to LLDP Management services. It provides the following services:
All 'Set' operations may affect the Switch behavior and configuration.
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
lldp_example.c is a sample application that demonstrates the use of the LLDP OpEN API's. lldp_example is started from the command line and has the following usage syntax:
Usage: lldp_example <test#> <interface> <arg1> <arg2> ...
It exercises all the LLDP OpEN APIs with appropriate arguments to manage the LLDP component in the ICOS main process (switchdrvr). lldp_example exercises the LLDP OpEN APIs individually or in related sets based on how it is invoked. While most of the LLDP OpEN APIs are pretty straightforward as is illustrated in lldp_example, a few of them may need extra attention. These are described in brief below.
LLDP Remote Device details
lldpIntfRemoteDeviceDetailsGet() in lldp_example gets LLDP Remote Device details from the LLDP Remote Device database. The example iterates through all the LLDP Neighbors and gets the Neighbor details one by one. The APIs need to be invoked with appropriate parameters as demonstrated.
LLDP Local Device details
lldpIntfLocalDeviceGet() in lldp_example gets LLDP Local Device details. The APIs need to be invoked with appropriate parameters as demonstrated.