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

MAB OpEN API

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

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

mab_example

mab_example.c is a sample application that demonstrates the use of the MAB OpEN API. mab_example is started from the command line. It then exercises all the MAB OpEN APIs one by one with appropriate arguments to manage the MAB component in the ICOS main process (switchdrvr).

Sample Output (LiNe/LinuxHost platform)

# ./mab_example

Usage: mab_example <test#> <arg1> <arg2> ...
Test 0: Get MAB port MAB enable configuration.: mab_example 0 <interface>
Test 1: Set MAB port MAB enable configuration.: mab_example 1 <interface> <'true'|'false'>
Test 2: Get MAB port MAB mode.: mab_example 2 <interface>
Test 3: Set MAB MAB authentication type.: mab_example 3 <interface> <mode>
Test 4: Get MAB MAB authentication type.: mab_example 4 <interface>

MAB CLI/API Cross Reference

CLI Command OpEN API Reference
(Interface-Config Mode)#
[no]mab
openapiMabPortMabEnabledSet()
openapiMabPortMabEnabledGet()
(Interface-Config Mode)#
[no]mab auth-type {chap | eap-md5 | pap}
openapiMabPortMABAuthTypeSet()
openapiMabPortMABAuthTypeGet()
(Priv-User Mode)#
show authentication interface {<interface> | all}
openapiMabPortOperationalMabModeGet()