Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Various APIs are provided to configure the Management Information Base (MIB-II) System Group (sysContact, sysName, sysLocation, and sysDescr).
This document provides a brief description of the System Group (RFC1213) OpEN APIs. The System Group (RFC1213) OpEN APIs allow processes outside of the ICOS main process (switchdrvr) access to the Management Information Base (MIB-II) System Group. 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.
rfc1213_example.c is a sample application that demonstrates the use of the System Group (RFC1213) OpEN APIs. rfc1213_example is started from the command line.
# ./rfc1213_example
System description retrieved successfully. system_descr="Emulation, 11.2.15.26, Linux 2.6.23.17-88.fc7" size=46 (result = 0)
System Description Get test – PASS
System name retrieved successfully. Configured system name="" size=1 (result = 0)
Trying to set the system name to DummyName
System name set is successful. (result = 0)
System name retrieved successfully. system name=DummyName size=10 (result = 0)
System Name Set test – PASS
System location retrieved successfully. Configured system location="" size=1 (result = 0)
Trying to set the system location to DummyLocation
System location set is successful. (result = 0)
System location retrieved successfully. system location="DummyLocation" size=14 (result = 0)
System Location Set test – PASS
System contact retrieved successfully. Configured system contact="" size=1 (result = 0)
Trying to set the system contact to DummyContact
System contact set is successful. (result = 0)
System contact retrieved successfully. system contact="DummyContact" size=13 (result = 0)
System Contact Set test – PASS
CLI Command | OpEN API Reference |
---|---|
(Priv-User Mode)# show sysinfo | openapi1213SystemSysDescrGet() openapi1213SystemSysNameGet() openapi1213SystemSysLocationGet() openapi1213SystemSysContactGet() |
(Config)# snmp-server sysname <name> | openapi1213SystemSysNameSet() |
(Config)# snmp-server location <loc> | openapi1213SystemSysLocationSet() |
(Config)# snmp-server contact <name> | openapi1213SystemSysContactSet() |