The KasperskyOS SDK provides the DCM (Dynamic Connection Manager) system program, which lets you dynamically create IPC channels. This program enables servers to notify clients about their provided endpoints, and pass callable handles for using these endpoints.
To use the DCM program, the KasperskyOS SDK provides the following files:
sysroot-*-kos/include/coresrv/dcm/dcm_api.h – header file that defines the basic APIsysroot-*-kos/include/coresrv/dcm/helpers/connect.h – header file that defines the auxiliary API for clientssysroot-*-kos/include/coresrv/dcm/groups/pub.h – header file that defines the additional API for serverssysroot-*-kos/include/coresrv/dcm/groups/subscr.h – header file that defines the additional API for clientssysroot-*-kos/include/coresrv/dcm/dcm.h – header file for including clients and servers into source codesysroot-*-kos/bin/dcm – executable filesysroot-*-kos/include/kl/core/DCM.*dl – formal specification filesTo use the DCM program, you need to include it in the solution image. To do so, you can, for example, specify dcm::entity in the list of files defined through the IMAGE_FILES parameter of the CMake commands build_kos_qemu_image() and build_kos_hw_image(). The CMake package is named dcm.
IPC channels from clients and servers to the DCM must be statically created. The libkos library serves as the client library of the DCM program.
You can run multiple DCM processes. Each client and server can be connected to only one DCM process.
The DCM API uses IDs known as DCM handles . DCM handles identify objects that provide the following capabilities to clients and servers that use DCM:
The names of components, endpoints, and endpoint interfaces should be defined according to the formal specifications of solution components. (For information about the qualified name of an endpoint and component instance, see Binding methods of security models to security events.) Instead of the qualified name of an endpoint or component instance, you can use any conditional name. The names of clients and servers are defined in the init description.