KasperskyOS Community Edition

Creating IPC channels

May 21, 2024

ID ipc_channels

There are two methods for creating IPC channels: static and dynamic.

Static creation of IPC channels is simpler to implement because you can use the init description for this purpose.

Dynamic creation of IPC channels lets you change the topology of interaction between processes on the fly. This is necessary if it is unknown which specific server provides the endpoint required by the client. For example, you may not know which specific drive you will need to write data to.

Statically creating an IPC channel

Static creation of IPC channels has the following characteristics:

  • The client and server are not yet running when the IPC channel is created.
  • Creation of an IPC channel is performed by the parent process that starts the client and server (this is normally Einit).
  • A deleted IPC channel cannot be restored.
  • To get the IPC handle and the endpoint ID (riid) after an IPC channel is created, the client and server must use the API defined in the header file sysroot-*-kos/include/coresrv/sl/sl_api.h from the KasperskyOS SDK.

The IPC channels defined in the init description are statically created.

Dynamically creating an IPC channel

Dynamic creation of IPC channels has the following characteristics:

  • The client and server are already running when the IPC channel is created.
  • The IPC channel is jointly created by the client and server.
  • A new IPC channel may be created in place of a deleted one.
  • The client and server get the IPC handle and endpoint ID (riid) immediately after the IPC channel is successfully created.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.