Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Accounting

Accounting is the process of keeping track of a user's activity while accessing the network resources, including the amount of time spent in the network, the services accessed while there and the amount of data transferred during the session. Accounting data is used for trend analysis, capacity planning, billing, auditing and cost allocation.

Accounting OpEN API

This document provides a brief description of the Accounting OpEN APIs. The Accounting OpEN APIs allow processes outside of the ICOS main process (switchdrvr) access to Accounting services. It provides the following services:

All 'Set' operations may affect the Switch behavior and configuration.

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

accounting_example

accounting_example.c is a sample application that demonstrates the use of the Accounting OpEN APIs. accounting_example is started from the command line and has the following usage syntax:

Usage: accounting_example <test#> <arg1> <arg2> ...

It exercises all the Accounting OpEN APIs with appropriate arguments to manage the Accounting feature in the ICOS main process (switchdrvr).

Accounting CLI/API Cross Reference

CLI Command OpEN API Reference
(Config)#
aaa accounting {commands | exec} {<list-name> | default} {none | start-stop | stop-only} <method1> <method2>....<methodn>
openapiAccountingListCreate()
openapiAccountingMethodsAdd()
openapiAccountingListFirstGet()
openapiAccountingListNextGet()
openapiAccountingListRecordTypeGet()
openapiAccountingMethodListGet()
(Config)#
no aaa accounting {commands | exec} {<list-name> | default}
openapiAccountingListDelete()
(Line-Config Mode)#
accounting {commands | exec} {<list-name> | default}
openapiAccountingListLineSet()
openapiAccountingListLineGet()
(Line-Config Mode)#
no accounting {commands | exec}
openapiAccountingListLineDelete()