Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
System Registry

Various APIs are provided to retrieve information from the System Registry.

System Registry OpEN API

This document provides a brief description of the Registry OpEN APIs. The Registry OpEN APIs allow processes outside of the ICOS main process (switchdrvr) access to the System Registry parameters. It provides the following services:

Example C Application registry_example

Initialization

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.

registry_example

registry_example.c is a sample application that demonstrates the use of the System Registry OpEN APIs. registry_example is started from the command line.

Sample Output

# ./registry_example

Bad return code trying to get serial number. (result = 1)
Model number retrieved successfully. model_num=BCM-56850 size=10 (result = 0)
Model type retrieved successfully. machine_type="Broadcom Trident2 56850 Development System - 72 10G + 6 QSFP" size=61 (result = 0)
Code version retrieved successfully. code_version="8.21.19.6" size=10 (result = 0)

Registry CLI/API Cross Reference

CLI Command OpEN API Reference
(Priv-User Mode)#
show sysinfo
openapiSystemRegSerialNumGet()
openapiSystemRegMachineModelGet()
openapiSystemRegMachineTypeGet()
(Priv-User Mode)#
show hardware
openapiSystemRegCodeVersionGet()