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

Overview

The OpEN Syncdb feature provides access to the ICOS database which is used for sharing information between the different processes inside ICOS as well as between ICOS and external applications.

The Syncdb is used internally by some of the OpEN API functions. In some cases enabling the external applications to access the Syncdb database directly is more efficient than going through the Open API functions. Therefore the Syncdb interface and certain data structures are exposed to the external users.

The Syncdb is an in-memory database maintained by a dedicated Linux process. The applications can create record tables and AVL trees. The record table is just a single structure. The AVL tree is some number of structures sorted in the AVL tree based on a user-defined key field. The maximum size of the AVL tree is defined when the AVL tree is created.

In order to use the Syncdb, the application creates a syncdb client handle. Multi-threaded applications may share the same client handle or create separate client handles for each thread.

Applications may read and write fields in the database as well as register for database change notifications.

As of now only a subset of the Syncdb database features is intended for external use.

As of the current release the Syncdb is intended to be used for monitoring BFD sessions. The user is only expected to register for changes to the BFD session table and to read the BFD session data. The use of Syncdb APIs should be limited to the APIs used in the bfd_monitor.c example program.

The example below shows how to start the bfd_monitor program and the output to expect. The bfd_monitor waits until there is a change in BFD session status. The example below shows three status changes for the same BFD session. The first event is the BFD session being created, the second event is the BFD session going "UP", and the third event is the BFD session going "DOWN".

root-xp:/broadcom/open_adk/examples/mpls# ./bfd_monitor

Event Type: Add/Change Session State:1 Diag Code:0 Session ID:1 SA Family:1 Source IP Address:172.21.0.1 Destination IP Address:172.31.0.1 Next Hop IP Address:172.16.6.1 MPLS Label Stack:10003 0 0

Event Type: Add/Change Session State:3 Diag Code:0 Session ID:1 SA Family:1 Source IP Address:172.21.0.1 Destination IP Address:172.31.0.1 Next Hop IP Address:172.16.6.1 MPLS Label Stack:10003 0 0

Event Type: Add/Change Session State:1 Diag Code:1 Session ID:1 SA Family:1 Source IP Address:172.21.0.1 Destination IP Address:172.31.0.1 Next Hop IP Address:172.16.6.1 MPLS Label Stack:10003 0 0