Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Port Mirroring APIs

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

All 'Set', 'Add' and 'Remove' operations would affect the Switch behavior and configuration.

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

mirror_example

mirror_example.c is a sample application that demonstrates the use of the Port Mirroring OpEN API. mirror_example is started from the command line and exercises all the Port Mirroring OpEN APIs one by one.

Port Mirroring CLI/API Cross Reference

CLI Command OpEN API Reference
(Priv-User Mode)#
show monitor session
openapiSwPortMonitorSourcePortsListGet()
openapiMirrorSourcePortDirectionGet()
openapiSwPortMonitorDestPortGet()
openapiSwPortMonitorModeGet()
openapiSwMonitorSrcTypeGet()
openapiSwMonitorDstTypeGet()
openapiSwMonitorRemoteSrcVlanGet()
openapiSwMonitorRemoteDstVlanGet()
openapiSwMonitorIpAclGet()
openapiSwMonitorMacAclGet()
(Config Mode)#
[no]monitor session
openapiSwPortMonitorSourcePortAdd()
openapiSwPortMonitorSourcePortRemove()
openapiSwPortMonitorDestPortSet()
openapiSwPortMonitorDestPortRemove()
openapiSwPortMonitorModeSet()
openapiSwPortMonitorConfigRemove()
openapiSwPortMonitorSessionRemove()
openapiSwMonitorVlanListSet()
openapiSwRemoteMonitorSrcVlanSet()
openapiSwRemoteMonitorDstVlanSet()
openapiSwMonitorReflectorPortSet()
(Config Mode)#
[no] monitor session
openapiSwMonitorIpAclSet()
openapiSwMonitorMacAclSet()
(Priv-User Mode)#
show vlan remote-span
openapiRemoteSpanVlanGet()
openapiRemoteSpanVlanNextGet()
openapiRemoteSpanVlanListGet()
(VLAN-Config Mode)#
[no] remote-span
openapiRemoteSpanVlanSet()
(Priv-User Mode)#
show vlan
openapiMirrorIsRspanVlan()