Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
This document provides a brief description of the Routing ARP OpEN API. The Routing ARP OpEN API allows processes outside of the ICOS main process (switchdrvr) access to ARP tables. The API provides access to the most of the data that is obtainable at the CLI using the "show arp" command and subcommands. It provides the following services:
arptable_example.c is a sample application that demonstrates the use of the Routing ARP OpEN APIs. arptable_example is started from the command line and has the following usage syntax:
Usage: arptable_example [-v vrfname] [-a aclname]
-v vrfname: enumlate the cli command "show arp vrf vrfname"
-a aclname: enumlate the cli command "show arp acl aclname"
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.
The mapping between the OpEN APIs and CLI commands is shown below. Additional OpEN APIs are used by the sample application, refer to the source code for more details.
CLI Command | OpEN API Functions
--------------------------------------—
(Config)# show arp | openapiArpEntryVrfNextGet()
(Config)# show arp vrf <vrfname> | openapiArpEntryVrfNextGet()
(Config)# show arp brief | openapiArpAgeTimeGet(), openapiArpResponseTimeGet(), openapiArpNumRetriesGet(), openapiArpCacheSizeGet(), openapiArpDynamicRenewModeGet(), openapiArpTotalEntryCountInfoGet(), openapiArpStaticEntryCountInfoGet()