Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
MACAL API

This document provides a brief description of the Macal OpEN APIs. It provides the following services:

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

macal_example

macal_example.c is a sample application that demonstrates the use of OpEN's Macal APIs. macal_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.

Sample Output

Macal CLI/API Cross Reference

CLI Command OpEN API Reference
(Config)#
[no] management access-list <listName>
openapiMacalListCreate()
openapiMacalListDelete()
(Config)#
[no] management access-list vrf <vrfName> <listName>
openapiMacalListVrfSet()
openapiMacalListDelete()
openapiMacalVrfNameValid()
(Priv-User Mode)#
show management access-list
openapiMacalListVrfGet()
openapiMacalRuleIsServicePortSet()
openapiMacalNameGet()
openapiMacalActiveListGet()
openapiMacalRuleFirstGet()
openapiMacalRuleNextGet()
openapiMacalRuleExists()
openapiMacalRuleActionGet()
openapiMacalRuleSrcIpMaskGet()
openapiMacalRuleInterfaceGet()
openapiMacalRuleVlanGet()
openapiMacalRuleServiceGet()
openapiMacalRuleTcpUdpPortNumberGet()
openapiMacalStatsPacketsFilteredGet()
(Config)#
[no] management access-class <listName>
openapiMacalActivate()
openapiMacalDeactivate()
(config-macal)#
[no] permit service <serviceType> [priority]
openapiMacalRuleEntryAdd()
openapiMacalRuleRemove()
openapiMacalRuleActionAdd()
openapiMacalRuleServiceAdd()
openapiMacalRuleTcpUdpPortNumberAdd()
(config-macal)#
[no] permit ip-source <IP address> mask <net mask>
openapiMacalRuleSrcIpMaskAdd()
(config-macal)#
[no] permit ethernet <slot/port>
openapiMacalRuleInterfaceAdd()
(config-macal)#
[no] permit vlan <vlanId>
openapiMacalRuleVlanAdd()
(config-macal)#
[no] permit serviceport
openapiMacalRuleServicePortSet()
(Priv-User Mode)#
show management access-list serviceport statistics
openapiMacalServicePortRuleStatisticsGet()
openapiMacalIsFieldConfigured()
(Priv-User Mode)#
clear management access-list serviceport statistics
openapiMacalClearServicePortStatistics()