The JUNOS spd daemon reads the configuration and parses it, assigning a service set ID and pushing a service-set resolution blob (SSRB) into the kernel. The SSRB stores the mapping of service set name to a unique service set ID and any configured next hops in a database that is accessible to external applications.
The application's management component on the Routing Engine uses the libsvcs-mgmt functions to access the SSRB database.
Applications normally register with the kernel communication / generic configuration (KCOM GENCFG) infrastructure and read the SSRBs synchronously during application startup, if there are already any residing in the kernel (see Using the GENCFG/SSRB Library for details). An application also registers an asynchronous event handler that acts upon notification of blob additions, deletions, or changes. Accordingly, libsvcs-mgmt provides two sets of functions that an application can invoke during startup, to do the following:
For sample code that uses this functionality, see Using the libsvcs-mgmt Library.
For a sample plugin that takes advantage of reliable configuration download, see The Sync Equilibrium Application Using Plugins. For a plugin that uses libconn, see Writing a Plugin. These applications do not yet use the libsvcs-mgmt functions; instead, they register with the KCOM GENCFG infrastructure to receive notification whenever there is an SSRB addition, deletion, or change, and call additional KCOM synchronization functions to retrieve all the SSRBs in the kernel. They then parse the SSRBs to get the service-set ID for each service set before pushing the policies to the PIC. The libsvcs-mgmt functions introduced in this release provide a wrapper around these lower-level operations.