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

System configuration allows to manage a switch by providing APIs that help in establishing network connectivity, configuration of hostname, terminal length, serial connection timeout.

System OpEN API

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

All 'Set' operations may affect the Switch behavior and configuration.

Example C Application system_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.

system_example

system_example.c is a sample application that demonstrates the use of the System OpEN APIs. system_example is started from the command line and has the following usage syntax:

Usage: system_example <test#> <arg1> <arg2> ...

It exercises all the System OpEN APIs with appropriate arguments to manage the System in the ICOS main process (switchdrvr).

System CLI/API Cross Reference

CLI Command OpEN API Reference
(Priv-User Mode)#
network parms {<ip-address>} {<netmask>} [<gateway>]
openapiNetworkPortIPv4ParametersSet()
openapiNetworkPortIPv4AddrGet()
openapiNetworkPortGatewayIPv4AddrGet()
(Priv-User Mode)#
network parms none
openapiNetworkPortIPv4ParametersDelete()
(Priv-User Mode)#
network protocol {none | dhcp | bootp}
openapiNetworkPortIPv4ProtocolModeSet()
openapiNetworkPortIPv4ProtocolModeGet()
(Priv-User Mode)#
network ipv6 address <prefix>/<prefix-length>
openapiNetworkPortIPv6PrefixSet()
openapiNetworkPortIPv6AddressesNextGet()
(Priv-User Mode)#
no network ipv6 address [<prefix>/<prefix-length>]
openapiNetworkPortIPv6PrefixDelete()
(Priv-User Mode)#
[no]network ipv6 addres autoconfig
openapiNetworkPortIPv6AutoConfigModeSet()
openapiNetworkPortIPv6AutoConfigModeGet()
(Priv-User Mode)#
[no]network ipv6 address dhcp
openapiNetworkPortIPv6ProtocolModeSet()
openapiNetworkPortIPv6ProtocolModeGet()
(Priv-User Mode)#
[no]network ipv6 enable
openapiNetworkPortIPv6AdminModeSet()
openapiNetworkPortIPv6AdminModeGet()
(Priv-User Mode)#
[no]network ipv6 gateway <gateway>
openapiNetworkPortIPv6GatewaySet()
openapiNetworkPortIPv6GatewayGet()
(Priv-User Mode)#
serviceport protocol {none | dhcp | bootp}
openapiServicePortIPv4ProtocolModeSet()
openapiServicePortIPv4ProtocolModeGet()
(Priv-User Mode)#
serviceport ip {<ip-address>} {<netmask>} [<gateway>]
openapiServicePortIPv4ParametersSet()
openapiServicePortIPv4AddrGet()
openapiServicePortGatewayIPv4AddrGet()
(Priv-User Mode)#
serviceport ip none
openapiServicePortIPv4ParametersDelete()
(Priv-User Mode)#
serviceport protocol {none | dhcp | bootp}
openapiServicePortIPv4ProtocolModeSet()
openapiServicePortIPv6ProtocolModeGet()
(Priv-User Mode)#
serviceport ipv6 address <prefix>/<prefix-length>
openapiServicePortIPv6PrefixSet()
openapiServicePortIPv6AddressesNextGet()
(Priv-User Mode)#
no serviceport ipv6 address [<prefix>/<prefix-length>]
openapiServicePortIPv6PrefixDelete()
(Priv-User Mode)#
[no]serviceport ipv6 addres autoconfig
openapiServicePortIPv6AutoConfigModeSet()
openapiServicePortIPv6AutoConfigModeGet()
(Priv-User Mode)#
[no]serviceport ipv6 addres dhcp
openapiServicePortIPv6ProtocolModeSet()
openapiServicePortIPv6ProtocolModeGet()
(Priv-User Mode)#
[no]serviceport ipv6 enable
openapiServicePortIPv6AdminModeSet()
openapiServicePortIPv6AdminModeGet()
(Priv-User Mode)#
[no]serviceport ipv6 gateway <gateway>
openapiServicePortIPv6GatewaySet()
openapiServicePortIPv6GatewayGet()
(Priv-User Mode)#
[no] ip telnet server enable
openapiTelnetServerAdminModeSet()
openapiTelnetServerAdminModeGet()
(Priv-User Mode)#
[no] hostname <name>
openapiSystemHostnameSet()
openapiSystemHostnameGet()
(Priv-User Mode)#
show hardware version <name>
openapiHardwareVersionGet()
(Priv-User Mode)#
show process memory | include KB
openapiSystemMemoryInfoGet()
(Priv-User Mode)#
set prompt <prompt-string>
openapiSystemPromptSet()
(Line-Config Mode)#
serial timeout <timeout>
openapiSerialTimeoutSet()
openapiSerialTimeoutDefaultSet()
openapiSerialTimeoutGet()
(Line-Config Mode)#
length <terminal-length>
openapiLineTerminalLengthSet()
openapiLineTerminalLengthGet()
(Priv-User Mode)#
show arp switch
openapiArpInfoNextGet()