|
Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.12.0.1
|
This document provides a brief description of the DiffServ Class OpEN APIs. It provides the following services:
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.
diffserv_class_conf_example.c is a sample application that demonstrates the use of the DiffServ Class OpEN APIs. diffserv_class_conf_example is started from the command line and has the following usage syntax:
| CLI Command | OpEN API Reference |
|---|---|
| (Config)# class-map [match-all | match-any] <class-map-name> [ipv4 | ipv6] | openapiDiffServClassCreate() |
| (Config)# no class-map <class-map-name> | openapiDiffServClassDelete() |
| (Config-classmap)# match [any | class-map <refclassname> | cos <0-7> | destination-address mac <address> <mac-mask> | dstip <ipaddr> <ipmask> | dstip6 <destination-ipv6-prefix/prefix-length> | dstl4port <0-65535> | <port-key> | ethertype <0x0600-0xffff> | <keyword> | ip [dscp |tos | precedence] | ip6flowlbl <label> | protocol <0-255> | secondary-cos <0-7> | secondary-vlan <1-4093> | source-address <address> <mac-mask> | srcip <ipaddr> <ipmask> | srcip6 <source-ipv6-prefix/prefix-length>| srcl4port <0-65535>| vlan <1-4093>] | openapiDiffServClassRuleCreate() |
| (Config-classmap)# no match class-map <refclassname> | openapiDiffServClassRuleMatchRefClassRemove() |
| (Priv-User Mode)# show class-map | openapiDiffServClassGetNext() openapiDiffServClassNameGet() openapiDiffServClassTypeGet() openapiDiffServClassL3ProtoGet() |
| (Priv-User Mode)# show class-map <class-name> | openapiDiffServClassNameToIndex() openapiDiffServClassTypeGet() openapiDiffServClassRuleCountGet() openapiDiffServClassRuleGetNext() openapiDiffServClassRuleMatchEntryTypeGet() openapiDiffServClassRuleMatchEntryValueGet() |