yp-system Introduction
This document contains a quick reference for the API callback interface for the yp-system component in the netconfd-pro server.
The netconfd-pro server supports an external vendor library that is loaded at boot-time by the server, similar to a SIL for a YANG module. This library code is run in the context of the main server process. It is used to hook vendor-specific functions into the server,.
The following tasks are supported by the yp-system library interface:
yp-system External Interface : Creating and using the general system SIL library
YP-HA Interface : Provide an external controller for changing the YP-HA server role
Access Control Model Interface : Provide an external access control system instead of NACM
SYSLOG Interface : Provide an external syslog interface instead of the Linux API
System Callback Functions : Provide server callbacks not specific to a single YANG module
The default system library is located in called libyp_system.so, and
it is located in the library path, such as
/usr/lib/yumapro/libyp_system.so
.
There is an example yp-system library in the 'libsystem' directory
of the YumaPro source tree. This file in the 'src' directory called
example-system.c
contains some stub code showing how this library
is used.
Copy and Setup the libsystem subtree
The default library created by building libsystem is libyp_system-example.so
.
This is not the correct filename, in order to prevent the real yp-server library
from being overwritten by the empty example library, if “make install” is run.
The 'libsystem' subtree should be copied to your own development area and modified.
#
# to make a real library, copy this directory contents
# to a new location and change yp-system-example to yp_system
# in the SUBDIR_NM macro below
#
# SUBDIR_NM=yp_system
#
SUBDIR_NM=yp_system-example
Change the string yp-system-example
to yp-system
in the
src/Makefile
in the copy of libsystem.